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

checkHotkey

Function: checkHotkey()

ts
function checkHotkey(hotkey): boolean;

Defined in: validate.ts:159

Validates a hotkey and logs warnings to the console. Useful for development-time feedback.

Parameters

hotkey

The hotkey string to validate

Hotkey | string & object

Returns

boolean

True if the hotkey is valid (may still have warnings)

Example

ts
checkHotkey('Alt+C')
// Console: Warning: Alt+C may not work reliably on macOS...
// Returns: true