The keystroke string. In its basic form, it must be a combination of known key names
joined by the +
sign, the same as the keystroke format accepted by the
KeystrokeHandler#set()
method used to register most of the
keystroke interactions in the editor.
- The keystroke string can represent a single keystroke, for instance:
keystroke: 'Ctrl+B'
, keystroke: 'Shift+Enter'
,
keystroke: 'Alt+F10'
, etc.
- The keystroke can be activated by successive press of multiple keys. For instance
keystroke: [ [ 'arrowleft', 'arrowleft' ] ]
will indicate that a specific action will be performed by pressing ← twice in a row.
- Keystrokes can have alternatives. For instance
keystroke: [ [ 'Ctrl+Y' ], [ 'Ctrl+Shift+Z' ] ]
will indicate that
a specific action can be performed by pressing either Ctrl + Y or
Ctrl + Shift + Z.
Please note that the keystrokes are automatically translated to the environment-specific form. For example, Ctrl+A
will be rendered as ⌘A
in the Mac environment. Always use the IBM PC keyboard
syntax, for instance Ctrl
instead of ⌘
, Alt
instead of ⌥
, etc.