shortcutFromEvent
ai-research-agent / editor/modules/shortcutFromEvent
Functions
addShortcutsToEvent()
function addShortcutsToEvent(event): KeyboardEventWithShortcut
Parameters
Parameter | Type |
---|---|
|
Returns
shortcutFromEvent()
function shortcutFromEvent(event): string
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
Classes
ShortcutEvent
Extends
KeyboardEvent
Constructors
new ShortcutEvent()
new ShortcutEvent(type, init?): ShortcutEvent
Parameters
Parameter | Type |
---|---|
|
|
|
Returns
Overrides
KeyboardEvent.constructor
Methods
fromKeyboardEvent()
static fromKeyboardEvent(event): ShortcutEvent
Parameters
Parameter | Type |
---|---|
|
|
Returns
Properties
modShortcut
readonly modShortcut: string;
osShortcut
readonly osShortcut: string;
shortcut
readonly shortcut: string;
Interfaces
KeyboardEventWithShortcut
Extends
KeyboardEvent
Properties
modShortcut?
optional modShortcut: string;
osShortcut?
optional osShortcut: string;
shortcut?
optional shortcut: string;
ShortcutEventInit
Extends
KeyboardEventInit
Properties
shortcut?
optional shortcut: string;