useHotkeys
functionSource L69Open-code aq-ui React hook for Use Hotkeys.
function useHotkeys(hotkeys: string | string[], callback: (event: KeyboardEvent, hotkey: string) => void, { target, enabled = true, preventDefault = true, stopPropagation = false, allowInInputs = false, exactModifiers = true, }: UseHotkeysOptions = {}): void- Returns
void
Parameters
| Name | Type | Default |
|---|---|---|
hotkeys | string | string[] | — |
callback | (event: KeyboardEvent, hotkey: string) => void | — |
options? | UseHotkeysOptions | {} |