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.
AnyChord
A chord string such as 'Mod+S', a chord object, or a sequence
Platform
The target platform for resolving 'Mod' (defaults to auto-detection)
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, ... }]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.
readonly AnyChord[]
A chord string such as 'Mod+S', a chord object, or a sequence
Platform
The target platform for resolving 'Mod' (defaults to auto-detection)
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, ... }]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.
AnyChord | readonly AnyChord[]
A chord string such as 'Mod+S', a chord object, or a sequence
Platform
The target platform for resolving 'Mod' (defaults to auto-detection)
| ParsedHotkeyChord | ParsedHotkeyChord[]
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, ... }]