UseHotkeyOptions
Defined in: src/hooks/useHotkey/useHotkey.types.ts:5
Properties
Section titled “Properties”enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: src/hooks/useHotkey/useHotkey.types.ts:10
When false, the binding is not active.
Default
Section titled “Default”trueenableInInputs?
Section titled “enableInInputs?”
optionalenableInInputs?:boolean
Defined in: src/hooks/useHotkey/useHotkey.types.ts:16
Whether to fire when focus is inside an editable element
(<input>, <textarea>, [contenteditable]).
Default
Section titled “Default”falsepreventDefault?
Section titled “preventDefault?”
optionalpreventDefault?:boolean
Defined in: src/hooks/useHotkey/useHotkey.types.ts:21
Call event.preventDefault() before invoking the handler.
Default
Section titled “Default”truestopPropagation?
Section titled “stopPropagation?”
optionalstopPropagation?:boolean
Defined in: src/hooks/useHotkey/useHotkey.types.ts:26
Call event.stopPropagation() after the handler runs.
Default
Section titled “Default”falsetarget?
Section titled “target?”
optionaltarget?:HotkeyTarget
Defined in: src/hooks/useHotkey/useHotkey.types.ts:34
Override the target element. Accepts either an EventTarget directly
(e.g. document, an HTMLElement) or a RefObject whose .current
resolves to one. The latter form re-attaches the listener once the ref
mounts, so passing ref directly works without waiting a render. Defaults
to window.