shortcutFromEvent
Documentation / editor/modules/shortcutFromEvent
ShortcutEvent​
Defined in: editor/modules/shortcutFromEvent.ts:15
Extends​
KeyboardEvent
Constructors​
Constructor​
new ShortcutEvent(type: string, init?: ShortcutEventInit): ShortcutEvent;
Defined in: editor/modules/shortcutFromEvent.ts:20
Parameters​
Parameter | Type |
---|---|
|
|
|
Returns​
Overrides​
KeyboardEvent.constructor
Properties​
modShortcut​
readonly modShortcut: string;
Defined in: editor/modules/shortcutFromEvent.ts:18
osShortcut​
readonly osShortcut: string;
Defined in: editor/modules/shortcutFromEvent.ts:17
shortcut​
readonly shortcut: string;
Defined in: editor/modules/shortcutFromEvent.ts:16
Methods​
fromKeyboardEvent()​
static fromKeyboardEvent(event: KeyboardEvent): ShortcutEvent;
Defined in: editor/modules/shortcutFromEvent.ts:27
Parameters​
Parameter | Type |
---|---|
|
|
Returns​
KeyboardEventWithShortcut​
Defined in: editor/modules/shortcutFromEvent.ts:33
Extends​
KeyboardEvent
Properties​
Property | Type | Defined in |
---|---|---|
| editor/modules/shortcutFromEvent.ts:36 | |
| editor/modules/shortcutFromEvent.ts:35 | |
| editor/modules/shortcutFromEvent.ts:34 |
ShortcutEventInit​
Defined in: editor/modules/shortcutFromEvent.ts:11
Extends​
KeyboardEventInit
Properties​
Property | Type | Defined in |
---|---|---|
| editor/modules/shortcutFromEvent.ts:12 |
addShortcutsToEvent()​
function addShortcutsToEvent(event: KeyboardEventWithShortcut): KeyboardEventWithShortcut;
Defined in: editor/modules/shortcutFromEvent.ts:39
Parameters​
Parameter | Type |
---|---|
|
Returns​
shortcutFromEvent()​
function shortcutFromEvent(event: KeyboardEvent): string;
Defined in: editor/modules/shortcutFromEvent.ts:58
Returns the textual representation of a shortcut given a keyboard event. Examples of shortcuts: Cmd+L Cmd+Shift+M Ctrl+O Backspace T Right Shift+Down Shift+F1 Space
Parameters​
Parameter | Type |
---|---|
|
|
Returns​
string