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 & held keys API Reference
Hotkey Recorder API Reference
Hotkey Sequence Recorder API Reference
Normalization & format API Reference

isModifierKey

Function: isModifierKey()

ts
function isModifierKey(key): key is string;

Defined in: parse.ts:242

Checks if a string is a recognized modifier token (including aliases).

For a KeyboardEvent, use isModifier(normalizeKeyName(event.key)) so DOM spellings like OS / Win match the same alias table.

Parameters

key

Key name or alias (e.g. from a hotkey string or event.key)

Key | string & object

Returns

key is string

True if the string is a recognized modifier