Docs
CodeRabbit
Cloudflare
Railway
Clerk
SerpAPI
Netlify
WorkOS
OpenRouter
AG Grid
Prisma
Sentry
Unkey
Electric
CodeRabbit
Cloudflare
Railway
Clerk
SerpAPI
Netlify
WorkOS
OpenRouter
AG Grid
Prisma
Sentry
Unkey
Electric
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_ORDER

Variable: MODIFIER_ORDER

ts
const MODIFIER_ORDER: CanonicalModifier[];
const MODIFIER_ORDER: CanonicalModifier[];

Defined in: constants.ts:59

Canonical order for modifiers in normalized hotkey strings.

Defines the standard order in which modifiers should appear when formatting hotkeys. This ensures consistent, predictable output across the library.

Order: Control → Alt → Shift → Meta

Example

ts
// Input: 'Shift+Control+Meta+S'
// Normalized: 'Control+Alt+Shift+Meta+S' (following MODIFIER_ORDER)
// Input: 'Shift+Control+Meta+S'
// Normalized: 'Control+Alt+Shift+Meta+S' (following MODIFIER_ORDER)