| id | normalizeHotkey |
|---|---|
| title | normalizeHotkey |
function normalizeHotkey(hotkey, platform): string;Defined in: parse.ts:168
Normalizes a hotkey string to its canonical form.
The canonical form uses:
- Full modifier names (Control, Alt, Shift, Meta)
- Modifiers in order: Control+Alt+Shift+Meta
- Uppercase letters for single-character keys
- Proper casing for special keys (Escape, not escape)
The hotkey string to normalize
Key | string & object
The target platform for resolving 'Mod' (defaults to auto-detection)
"mac" | "windows" | "linux"
string
The normalized hotkey string
normalizeHotkey('mod+shift+s') // On Mac: 'Shift+Meta+S'
normalizeHotkey('ctrl+a') // 'Control+A'
normalizeHotkey('esc') // 'Escape'