Optional
action?: ((node: E, e: KeyboardEvent) => unknown)Callback to be triggered when shortcut is activated.
Optional
endCallback to be triggered when key is released.
Optional
ignoreElement types that prevents the shortcut from triggering.
Defaults to ['INPUT', 'TEXTAREA'].
Optional
repeats?: booleanShould keep triggering if key is still pressed ?
Defaults to true.
Optional
shortcuts?: KeyboardShortcut[] | ((e: KeyboardEvent) => boolean) | KeyboardShortcutList of shortcuts that trigger the action.
Can be a single shortcut or an array of shortcuts. If a function is provided, it should return a boolean indicating whether the shortcut is triggered based on the keyboard event.
Settings for a keyboard shortcut.