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

MODIFIER_ALIASES

Variable: MODIFIER_ALIASES

ts
const MODIFIER_ALIASES: Record<string, CanonicalModifier | "Mod">;
const MODIFIER_ALIASES: Record<string, CanonicalModifier | "Mod">;

Defined in: constants.ts:94

Maps modifier key aliases to their canonical form or platform-adaptive 'Mod'.

This map allows users to write hotkeys using various aliases (e.g., 'Ctrl', 'Cmd', 'Option') which are then normalized to canonical names ('Control', 'Meta', 'Alt') or the platform-adaptive 'Mod' token.

The 'Mod' and 'CommandOrControl' aliases are resolved at runtime via resolveModifier() based on the detected platform (Command on Mac, Control elsewhere).

Remarks

Case-insensitive lookups are supported via lowercase variants

Example

ts
MODIFIER_ALIASES['Ctrl'] // 'Control'
MODIFIER_ALIASES['Cmd'] // 'Meta'
MODIFIER_ALIASES['Mod'] // 'Mod' (resolved at runtime)
MODIFIER_ALIASES['Ctrl'] // 'Control'
MODIFIER_ALIASES['Cmd'] // 'Meta'
MODIFIER_ALIASES['Mod'] // 'Mod' (resolved at runtime)