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
API Reference
Hotkeys API Reference
Hotkey Sequence API Reference
Key Hold API Reference
Held Keys API Reference
Hotkey Recorder API Reference
Hotkey Sequence Recorder API Reference
Format for Display API Reference
Format for Display API Reference

FormatKeyDebuggingOptions

Interface: FormatKeyDebuggingOptions

Defined in: format.ts:187

Options for formatting a single key for debugging display.

Properties

platform?

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

Defined in: format.ts:189

The target platform. Defaults to auto-detection.


source?

ts
optional source: "key" | "code";

Defined in: format.ts:198

Whether the input value comes from event.key or event.code.

  • 'key' (default): Applies rich platform-aware formatting (modifier labels, special-key symbols, etc.).
  • 'code': Returns the value unchanged — physical key codes like "MetaLeft" or "KeyA" are already descriptive for debugging.