function resolvePlatformHotkey<T>(hotkey, platform?):
| PlatformHotkeyEntry<NonNullable<T>>
| null;Defined in: platform.ts:104
Resolves a hotkey per platform to the hotkey for one platform: its entry for the platform, or its default. Returns null when the platform has no hotkey. A chord, a sequence, or a chord object is returned as is, and no hotkey (null or undefined) returns null.
Registration and formatting resolve these objects themselves. Call this to read the hotkey yourself, such as an app hotkey's in a settings screen.
T
T
A hotkey per platform, or any other hotkey
The target platform. Defaults to auto-detection.
| PlatformHotkeyEntry<NonNullable<T>> | null
resolvePlatformHotkey({ default: 'Mod+Y', mac: 'Mod+Shift+Z' }, 'mac') // 'Mod+Shift+Z'
resolvePlatformHotkey({ default: null, mac: 'Mod+,' }, 'windows') // null
resolvePlatformHotkey('Mod+S', 'mac') // 'Mod+S'