Defined in: format.ts:276
Options for formatting hotkeys for display.
optional keyLabels?: Readonly<Record<string, string>>;Defined in: format.ts:294
Final display overrides for logical keys or physical codes; take precedence over layoutMap. Never changes matching.
optional layoutMap?: object;Defined in: format.ts:292
An already-resolved code-to-key map, such as KeyboardLayoutMap or Map. Used only for physical bindings. Mapped keys receive normal display formatting; missing or empty entries use conventional fallback labels. The caller owns loading and refreshing the map; this formatter never calls browser APIs.
get: (code) => string | undefined;string
string | undefined
optional parts?: boolean;Defined in: format.ts:285
Return individual key labels instead of a joined string. Default: false.
optional platform?: HotkeyPlatform;Defined in: format.ts:281
The target platform. Without it, formatForDisplay detects the platform in the browser and uses 'linux' on a server.
optional separatorToken?: string | null;Defined in: format.ts:296
Override the separator between display tokens. Defaults to platform-specific formatting when null/undefined.
optional sequenceSeparator?: string;Defined in: format.ts:298
Separator between sequence steps. Default: a space.
optional useSymbols?:
| boolean
| {
keys?: boolean;
modifiers?: boolean;
};Defined in: format.ts:283
Whether to use symbols for the display. Defaults to true.