Skip to content

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.

TKeyboardEvent extends Pick<KeyboardEvent, "key" | "code" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey"> = Pick<KeyboardEvent, "key" | "code" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey">

guard: (event) => boolean

Defined in: keyboard-shortcuts.ts:55

TKeyboardEvent

boolean


keys: ReadonlyArray<string>

Defined in: keyboard-shortcuts.ts:56