hotkeys | MaybeRefOrGetter<readonly Hotkey[]> | — | Shortcut registrations. A plain array, a ref, or a getter all work; the list is read on each key press. Required. |
hotkeys[].keys | string | — | A "+"-separated combo like "mod+k", "shift+/", "escape". mod is ⌘ on macOS and Ctrl elsewhere. Aliases: esc, space, up, down, left, right, return, and plus for a literal +. Without shift in the combo, the shift state is ignored, so a single letter does not care about case. |
hotkeys[].onPress | (event: KeyboardEvent) => void | — | Called when the combo matches, after preventDefault(). |
hotkeys[].allowInInputs | boolean | false | Lets the hotkey fire while typing in an input, textarea, select, or contenteditable region. |
hotkeys[].isDisabled | boolean | false | Temporarily disables this entry without removing the listener. |