Interface

KeystrokeInfoDefinition (core)

@ckeditor/ckeditor5-core/src/accessibility

interface

A keystroke info definition in keystrokeInfos

Filtering

Properties

  • keystroke : string | Array<string> | Array<Array<string>>

    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.

  • label : string

    The label of the keystroke. It should briefly describe the action that the keystroke performs. It may contain HTML.

  • mayRequireFn : boolean | undefined

    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.