KeystrokeInfoDefinition
A keystroke info definition in keystrokeInfos
Properties
-
keystroke : string | Array<string> | Array<Array<string>>
module:core/accessibility~KeystrokeInfoDefinition#keystroke
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 theKeystrokeHandler#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 instanceCtrl
instead of⌘
,Alt
instead of⌥
, etc. - The keystroke string can represent a single keystroke, for instance:
-
label : string
module:core/accessibility~KeystrokeInfoDefinition#label
The label of the keystroke. It should briefly describe the action that the keystroke performs. It may contain HTML.
-
mayRequireFn : boolean | undefined
module:core/accessibility~KeystrokeInfoDefinition#mayRequireFn
This (optional) flag suggests that the keystroke(s) may require a function (Fn) key to be pressed in order to work in the Mac environment. If set
true
, an additional information will be displayed next to the keystroke.