Hotkeys API Reference
- HotkeyManager
- getHotkeyManager
- Hotkey
- HotkeyChord
- HotkeySequence
- RegisterableHotkey
- RegisterableHotkeyChord
- RegisterableHotkeySequence
- RawHotkeyChord
- HotkeyOptions
- HotkeyChordOptions
- HotkeySequenceOptions
- HotkeyOptionsFor
- HotkeyRegistrationHandle
- HotkeyRegistrationView
- HotkeyChordRegistrationView
- HotkeySequenceRegistrationView
- toHotkeyRegistrationView
- HotkeyCallback
- HotkeyCallbackContext
- HotkeyChordCallbackContext
- HotkeySequenceCallbackContext
- HotkeyCallbackContextFor
- HotkeyMeta
- ConflictBehavior
- isHotkeySequence
- simplifyHotkey
- createSequenceMatcher
- DEFAULT_SEQUENCE_TIMEOUT
- HotkeysProvider
- useDefaultHotkeysOptions
- useHotkey
- useHotkeyRegistrations
- useHotkeys
- useHotkeysContext
- HotkeysProviderOptions
- HotkeysProviderProps
- UseHotkeyChordOptions
- UseHotkeyCommonOptions
- UseHotkeyDefinition
- UseHotkeyOptions
- UseHotkeyOptionsFor
- UseHotkeySequenceOptions
- UseHotkeyTarget
App Hotkeys API Reference
- defineAppHotkeys
- AppHotkeysStore
- provideAppHotkeys
- publishAppHotkeysStore
- AppHotkey
- AppHotkeyInput
- AppHotkeyOptions
- AppHotkeyListItem
- AppHotkeyStatus
- AppHotkeysState
- AppHotkeysStoreOptions
- CustomHotkeys
- Register
- AppHotkeyId
- RegisteredAppHotkeys
- isAppHotkey
- isCustomHotkey
- resolveAppHotkey
- useAppHotkeyList
- useAppHotkeys
- useCustomHotkeys
- UseCustomHotkeysResult
- UseAppHotkeyOptions
Key hold & held keys API Reference
Hotkey Recorder API Reference
- HotkeyRecorder
- HotkeyRecorderOptions
- HotkeyChordRecorderOptions
- HotkeySequenceRecorderOptions
- HotkeyRecorderState
- HotkeyRecorderCommitKeys
- HotkeyRecorderValidationContext
- HotkeyChordRecorderValidationContext
- HotkeySequenceRecorderValidationContext
- RecorderOptions
- RecorderRejection
- RecorderKeyMode
- findHotkeyConflicts
- HotkeyConflict
- HotkeyConflictOptions
- useHotkeyRecorder
- ReactHotkeyRecorder
Normalization & format API Reference
- formatForDisplay
- FormatDisplayOptions
- DisplayHotkey
- DisplayHotkeyChord
- formatHotkey
- normalizeHotkey
- parseHotkey
- parseKeyboardEvent
- ParsedHotkeyChord
- matchesKeyboardEvent
- areHotkeysEqual
- validateHotkey
- checkHotkey
- assertValidHotkey
- ValidationResult
- ValidatableHotkey
- LogicalKey
- PhysicalKey
- PhysicalKeyCode
- KEY_DISPLAY_SYMBOLS
- PUNCTUATION_KEY_DISPLAY_LABELS
- MAC_MODIFIER_SYMBOLS
- MAC_MODIFIER_LABELS
- WINDOWS_MODIFIER_LABELS
- LINUX_MODIFIER_LABELS
- MODIFIER_ALIASES
- MODIFIER_ORDER
- MODIFIER_KEYS
parseHotkey
Call Signature#
function parseHotkey(hotkey, platform?): ParsedHotkeyChord;Defined in: parse.ts:211
Parses a hotkey, resolving Mod for the platform. A chord, written as a string or an object, returns one parsed chord. A sequence returns one parsed chord per step. Physical tokens such as [KeyQ] keep code; they never become a logical Q.
Parameters#
hotkey#
AnyChord
A chord string such as 'Mod+S', a chord object, or a sequence
platform?#
Platform
The target platform for resolving 'Mod' (defaults to auto-detection)
Returns#
Example#
parseHotkey('Mod+S', 'mac') // { key: 'S', ctrl: false, shift: false, alt: false, meta: true, modifiers: ['Meta'] }
parseHotkey({ key: 'S', mod: true }, 'windows') // { key: 'S', ctrl: true, ..., modifiers: ['Control'] }
parseHotkey(['G', 'Shift+G']) // [{ key: 'G', ... }, { key: 'G', shift: true, ... }]Call Signature#
function parseHotkey(hotkey, platform?): ParsedHotkeyChord[];Defined in: parse.ts:215
Parses a hotkey, resolving Mod for the platform. A chord, written as a string or an object, returns one parsed chord. A sequence returns one parsed chord per step. Physical tokens such as [KeyQ] keep code; they never become a logical Q.
Parameters#
hotkey#
readonly AnyChord[]
A chord string such as 'Mod+S', a chord object, or a sequence
platform?#
Platform
The target platform for resolving 'Mod' (defaults to auto-detection)
Returns#
Example#
parseHotkey('Mod+S', 'mac') // { key: 'S', ctrl: false, shift: false, alt: false, meta: true, modifiers: ['Meta'] }
parseHotkey({ key: 'S', mod: true }, 'windows') // { key: 'S', ctrl: true, ..., modifiers: ['Control'] }
parseHotkey(['G', 'Shift+G']) // [{ key: 'G', ... }, { key: 'G', shift: true, ... }]Call Signature#
function parseHotkey(hotkey, platform?):
| ParsedHotkeyChord
| ParsedHotkeyChord[];Defined in: parse.ts:219
Parses a hotkey, resolving Mod for the platform. A chord, written as a string or an object, returns one parsed chord. A sequence returns one parsed chord per step. Physical tokens such as [KeyQ] keep code; they never become a logical Q.
Parameters#
hotkey#
AnyChord | readonly AnyChord[]
A chord string such as 'Mod+S', a chord object, or a sequence
platform?#
Platform
The target platform for resolving 'Mod' (defaults to auto-detection)
Returns#
| ParsedHotkeyChord | ParsedHotkeyChord[]
Example#
parseHotkey('Mod+S', 'mac') // { key: 'S', ctrl: false, shift: false, alt: false, meta: true, modifiers: ['Meta'] }
parseHotkey({ key: 'S', mod: true }, 'windows') // { key: 'S', ctrl: true, ..., modifiers: ['Control'] }
parseHotkey(['G', 'Shift+G']) // [{ key: 'G', ... }, { key: 'G', shift: true, ... }]