This dialog box is displayed by menu item . It allows the user to specify a keyboard shortcut that will invoke a predefined command, last recorded macro-command or a user-defined macro-command. → →
In the above screen shot, the user adds a shortcut for command "insertCharSequence
" with parameter "- mdash
". This command will be invoked after character "-
" (dash) is typed.
Specify a keystroke. A keystroke is either:
A typed character specified the Typed Character field.
A typed character is any character you can type using any combination/sequence of pressed keys. A typed character often does not correspond to a key of your keyboard. For example, on an US keyboard, there is no $ key. You need to press on key 4 and on key Shift at the same time in order to type the '$
' character.
OR a pressed key specified using the Pressed Key combo box.
A pressed key must correspond to a key actually found on your keyboard. For example, do not choose key $ on an US keyboard because there is no such key. On the other hand, you may choose it on a French keyboard which has a $ key[25].
You'll often want to also specify the modifier keys (Ctrl, Shift, etc) which must be pressed at the same time as the main key specified in the Pressed Key combo box. Any combination of modifier keys may be chosen using the Pressed Key Modifiers combo box.
Optionally specify a second keystroke. In such case, the command will be invoked by the sequence: first keystroke immediately followed by second keystroke.
Specify the command invoked by your custom shortcut. There are three possible options for this:
The command invoked by your custom keyboard shortcut is a predefined command (documented in Chapter 6, Commands written in the Java™ programming language in XMLmind XML Editor - Commands).
You may choose one of the last executed commands by using the list displayed by the "
" button.The command invoked by your custom keyboard shortcut is the last recorded macro-command (see ). →
The command invoked by your custom keyboard shortcut is a custom macro-command that you'll type in the text area below the "Other macro-command" radio button.
It is recommended to restrict yourself to specifying one of the last executed commands or last recorded macro. Attempting to use the other options is harmless, but unless you know what you are doing (for example, because you have posted a support request to the <xmleditor-support@xmlmind.com>
public mailing list), the commands specified the hard way will probably not work.
However, if you decide to follow the hard way, you must know that:
The Command field, allowing to specify the name of a command, supports auto-completion.
Clicking on the Documentation link will open in the Web browser the reference manual in XMLmind XML Editor - Commands describing the command of interest[26]. This is almost always needed in order to specify in the Parameter field a valid parameter for the command.
If you type a custom macro-command in the text area, do not bother declaring namespace prefixes. Consider that "http://www.xmlmind.com/xmleditor/schema/configuration
" is declared as being the default namespace, that "cfg
" is declared as a prefix for namespace "http://www.xmlmind.com/xmleditor/schema/configuration
" and that all namespace prefixes declared in the document being edited (see ) are in scope also here. →
Click
.Other example:
In the above screen shot, the user adds a shortcut for command "insert after[implicitElement] #template(figure,screenshot)
". This command will be invoked when the Insert key will be pressed at the same time as the Control and Shift keys.
Previously, by using the Edit tool, the user has inserted in the document being edited a figure
element containing a screenshot
child element[27]. Having done this now allows her/him to pick this command from the list displayed by the " " button, instead of typing the command name and its parameter.
Many keystrokes may not be used to define custom keyboard shortcuts. Clicking on the "Existing Keyboard Shortcuts" tab will give you an idea of this fact. Examples:
Moreover certain keystrokes are reserved by Java™ (e.g. Tab, Alt) or by the operating system (e.g. there are loads of these on the Mac). Attempting to use these keystrokes for your custom keyboard shortcuts will almost certainly not work. |