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
Hotkeys API Reference
App Hotkeys API Reference
Key hold & held keys API Reference
Hotkey Recorder API Reference
Normalization & format API Reference
Key hold & held keys API Reference

useHotkeyHint

ts
function useHotkeyHint(hotkey, options?): boolean;
function useHotkeyHint(hotkey, options?): boolean;

Defined in: useHotkeyHint.ts:24

Returns a boolean indicating whether held modifiers reveal this shortcut. Only visibility changes from held-key updates cause a rerender. Uses the nonempty-subset/AltGr rules of matchesHeldModifiers; exact requires every modifier. A sequence reveals its hint from its first step, and an app hotkey uses its effective hotkey (false while unbound). Combine with the action's enabled state before showing a badge. This helper does not register a shortcut or check whether its target is focused.

Parameters

hotkey

| RegisterableHotkey | AppHotkey<string, HotkeyChord | HotkeySequence | null>

options?

HeldModifierOptions = {}

Returns

boolean