KeyboardShortcut
KeyboardShortcut<
TKeyboardEvent> =object
Defined in: keyboard-shortcuts.ts:46
A resolved keyboard shortcut for the current platform that has been
processed by createKeyboardShortcut(...) to select the appropriate
platform-specific key combination. The guard function determines if the
shortcut applies to the current KeyboardEvent, while keys contains the
display-friendly key combination for the current platform.
Type Parameters
Section titled “Type Parameters”TKeyboardEvent
Section titled “TKeyboardEvent”TKeyboardEvent extends Pick<KeyboardEvent, "key" | "code" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey"> = Pick<KeyboardEvent, "key" | "code" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey">
Properties
Section titled “Properties”guard()
Section titled “guard()”guard: (
event) =>boolean
Defined in: keyboard-shortcuts.ts:55
Parameters
Section titled “Parameters”TKeyboardEvent
Returns
Section titled “Returns”boolean
keys:
ReadonlyArray<string>
Defined in: keyboard-shortcuts.ts:56