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

PUNCTUATION_CODE_MAP

Variable: PUNCTUATION_CODE_MAP

ts
const PUNCTUATION_CODE_MAP: Record<string, string>;

Defined in: constants.ts:313

Maps KeyboardEvent.code values for punctuation keys to their canonical characters.

On macOS, holding the Option (Alt) key transforms punctuation keys into special characters (e.g., Option+Minus → en-dash '–'), causing event.key to differ from the expected character. However, event.code still reports the physical key (e.g., 'Minus'). This map enables falling back to event.code for punctuation keys, similar to the existing Key*/Digit* fallbacks for letters and digits.