Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Hotkeys API Reference
App Hotkeys API Reference
Key hold & held keys API Reference
Hotkey Recorder API Reference
Normalization & format API Reference
Normalization & format API Reference

FormatDisplayOptions

Defined in: format.ts:218

Options for formatting hotkeys for display.

Properties

keyLabels?

ts
optional keyLabels?: Readonly<Record<string, string>>;
optional keyLabels?: Readonly<Record<string, string>>;

Defined in: format.ts:233

Final display overrides for logical keys or physical codes; take precedence over layoutMap. Never changes matching.


layoutMap?

ts
optional layoutMap?: object;
optional layoutMap?: object;

Defined in: format.ts:231

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

ts
get: (code) => string | undefined;
get: (code) => string | undefined;
Parameters
code

string

Returns

string | undefined


parts?

ts
optional parts?: boolean;
optional parts?: boolean;

Defined in: format.ts:224

Return individual key labels instead of a joined string. Default: false.


platform?

ts
optional platform?: "mac" | "windows" | "linux";
optional platform?: "mac" | "windows" | "linux";

Defined in: format.ts:220

The target platform. Defaults to auto-detection.


separatorToken?

ts
optional separatorToken?: string | null;
optional separatorToken?: string | null;

Defined in: format.ts:235

Override the separator between display tokens. Defaults to platform-specific formatting when null/undefined.


sequenceSeparator?

ts
optional sequenceSeparator?: string;
optional sequenceSeparator?: string;

Defined in: format.ts:237

Separator between sequence steps. Default: a space.


useSymbols?

ts
optional useSymbols?: 
  | boolean
  | {
  keys?: boolean;
  modifiers?: boolean;
};
optional useSymbols?: 
  | boolean
  | {
  keys?: boolean;
  modifiers?: boolean;
};

Defined in: format.ts:222

Whether to use symbols for the display. Defaults to true.