| id | RawHotkey |
|---|---|
| title | RawHotkey |
Defined in: hotkey.ts:341
A raw hotkey object for programmatic registration.
Like ParsedHotkey but without modifiers (derived from booleans)
and with optional modifier booleans (default to false when omitted).
Use with HotkeyManager.register() and useHotkey() when you prefer
object form over a string.
The mod modifier is platform-adaptive: Command on macOS, Control on Windows/Linux.
Pass platform when converting to ParsedHotkey (e.g., via options.platform).
useHotkey({ key: 'S', mod: true }, handler) // Mod+S (cross-platform)
useHotkey({ key: 'S', ctrl: true }, handler) // Control+S
useHotkey({ key: 'Escape' }, handler) // Escape (no modifiers)
useHotkey({ key: 'A', shift: true, meta: true }, handler) // Shift+Meta+A
useHotkey({ key: 'S', mod: true, shift: true }, handler) // Mod+Shift+Soptional alt: boolean;Defined in: hotkey.ts:351
Whether the Alt key is required. Defaults to false.
optional ctrl: boolean;Defined in: hotkey.ts:347
Whether the Control key is required. Defaults to false.
key: Key | string & object;Defined in: hotkey.ts:343
The non-modifier key (e.g., 'S', 'Escape', 'F1').
optional meta: boolean;Defined in: hotkey.ts:353
Whether the Meta (Command) key is required. Defaults to false.
optional mod: boolean;Defined in: hotkey.ts:345
Platform-adaptive modifier: Command on macOS, Control on Windows/Linux. Defaults to false.
optional shift: boolean;Defined in: hotkey.ts:349
Whether the Shift key is required. Defaults to false.