IHotkeyOptions
interface
Directives & Utilities
Configuration options for the useHotkey composable and the v-hotkey directive — controls the listened event type, whether inputs are excluded and sequence timing.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- eventMaybeRef<'keydown' | 'keyup'>
- Keyboard event to listen on — 'keydown' (default) or 'keyup'.
- inputsMaybeRef<boolean>
- When true, the hotkey fires even when focus is inside an input, textarea or select element. Defaults to false.
- preventDefaultMaybeRef<boolean>
- When true, calls event.preventDefault() before invoking the handler. Defaults to false.
- sequenceTimeoutMaybeRef<number>
- Milliseconds allowed between successive keys in a sequence binding before the sequence resets. Defaults to 1000.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Passing options to useHotkey