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
Hotkey Recorder API Reference

useHotkeyRecorder

Call Signature

ts
function useHotkeyRecorder(options): OctaneHotkeyRecorder<HotkeyChord>;
function useHotkeyRecorder(options): OctaneHotkeyRecorder<HotkeyChord>;

Defined in: useHotkeyRecorder.ts:20

Records a shortcut and destroys the recorder on unmount. With the default maxSteps: 1, the first valid chord is recorded. With a larger maxSteps, each chord adds a step; the recording commits on Enter (unless commitKeys: 'none'), after idleTimeoutMs, or at maxSteps, and onRecord receives a chord (one step) or a sequence.

Parameters

options

HotkeyChordRecorderOptions

Returns

OctaneHotkeyRecorder<HotkeyChord>

Call Signature

ts
function useHotkeyRecorder(options): OctaneHotkeyRecorder;
function useHotkeyRecorder(options): OctaneHotkeyRecorder;

Defined in: useHotkeyRecorder.ts:23

Records a shortcut and destroys the recorder on unmount. With the default maxSteps: 1, the first valid chord is recorded. With a larger maxSteps, each chord adds a step; the recording commits on Enter (unless commitKeys: 'none'), after idleTimeoutMs, or at maxSteps, and onRecord receives a chord (one step) or a sequence.

Parameters

options

HotkeySequenceRecorderOptions

Returns

OctaneHotkeyRecorder