blockly > ShortcutRegistry > KeyboardShortcut
ShortcutRegistry.KeyboardShortcut interface
Interface defining a keyboard shortcut.
Signature:
interface KeyboardShortcut
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
boolean | (Optional) Value of N.B.: this is only used for binding keycodes at the time this shortcut is initially registered, not for any subsequent | ||
(workspace: WorkspaceSvg, e: Event, shortcut: KeyboardShortcut, scope: Scope) => boolean | (Optional) The function to be called when the shorctut is invoked. | ||
(number | string)[] | (Optional) Optional list of key codes to be bound (via ShortcutRegistry.prototype.addKeyMapping) to this shortcut. | ||
object | (Optional) Optional arbitray extra data attached to the shortcut. | ||
string | The name of the shortcut. Should be unique. | ||
(workspace: WorkspaceSvg, scope: Scope) => boolean | (Optional) A function to be called when the shortcut is invoked, before calling |