function validateHotkey(hotkey): ValidationResult;Defined in: validate.ts:39
Validates a hotkey and returns any warnings or errors. Each issue has a reason code, so apps can write their own messages. Issues in a sequence carry the index of their step.
Checks for:
The hotkey string to validate
A ValidationResult with validity status, warnings, and errors
validateHotkey('Mod+S')
// { valid: true, warnings: [], errors: [] }
validateHotkey('')
// { valid: false, warnings: [], errors: [{ reason: 'empty' }] }
validateHotkey(['G', 'Foo+H'])
// { valid: false, warnings: [], errors: [{ reason: 'unknown-modifier', part: 'Foo', step: 1 }] }