function formatForDisplay(hotkey, options): string;
Defined in: format.ts:61
Formats a hotkey for display in a user interface.
On macOS, uses symbols (⌘⇧S). On Windows/Linux, uses text (Ctrl+Shift+S).
The hotkey string or ParsedHotkey to format
Hotkey | ParsedHotkey | string & object
FormatDisplayOptions = {}
Formatting options
string
A formatted string suitable for display
formatForDisplay('Mod+Shift+S', { platform: 'mac' })
// Returns: '⇧⌘S'
formatForDisplay('Mod+Shift+S', { platform: 'windows' })
// Returns: 'Ctrl+Shift+S'
formatForDisplay('Escape')
// Returns: 'Esc' (on all platforms)