Defined in: format.ts:254
Options for formatting hotkeys for display.
Properties#
keyLabels?#
optional keyLabels?: Readonly<Record<string, string>>;
Defined in: format.ts:269
Final display overrides for logical keys or physical codes; take precedence over layoutMap. Never changes matching.
layoutMap?#
optional layoutMap?: object;
Defined in: format.ts:267
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#
get: (code) => string | undefined;
Parameters#
code#
string
Returns#
string | undefined
parts?#
optional parts?: boolean;
Defined in: format.ts:260
Return individual key labels instead of a joined string. Default: false.
platform?#
optional platform?: "mac" | "windows" | "linux";
Defined in: format.ts:256
The target platform. Defaults to auto-detection.
separatorToken?#
optional separatorToken?: string | null;
Defined in: format.ts:271
Override the separator between display tokens. Defaults to platform-specific formatting when null/undefined.
sequenceSeparator?#
optional sequenceSeparator?: string;
Defined in: format.ts:273
Separator between sequence steps. Default: a space.
useSymbols?#
optional useSymbols?:
| boolean
| {
keys?: boolean;
modifiers?: boolean;
};
Defined in: format.ts:258
Whether to use symbols for the display. Defaults to true.