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

HotkeyChordRecorderOptions

Defined in: hotkey-recorder.ts:101

Options for recording a single chord. This is the default (maxSteps: 1).

Extends

  • HotkeyRecorderBaseOptions

Properties

detectConflicts?

ts
optional detectConflicts?: boolean | HotkeyConflictOptions;
optional detectConflicts?: boolean | HotkeyConflictOptions;

Defined in: hotkey-recorder.ts:39

Opt in to live-registry conflicts, including sequence prefixes. Default: false.

Inherited from

ts
HotkeyRecorderBaseOptions.detectConflicts
HotkeyRecorderBaseOptions.detectConflicts

ignoreInputs?

ts
optional ignoreInputs?: boolean;
optional ignoreInputs?: boolean;

Defined in: hotkey-recorder.ts:97

Whether to ignore keyboard events from input-like elements (text inputs, textarea, select, contenteditable) while recording. When true, typing in inputs passes through normally (Escape still cancels). Defaults to true.

Inherited from

ts
HotkeyRecorderBaseOptions.ignoreInputs
HotkeyRecorderBaseOptions.ignoreInputs

maxSteps?

ts
optional maxSteps?: 1;
optional maxSteps?: 1;

Defined in: hotkey-recorder.ts:103

Maximum number of chords to record. Default: 1


onCancel?

ts
optional onCancel?: () => void;
optional onCancel?: () => void;

Defined in: hotkey-recorder.ts:86

Optional callback when recording is cancelled (Escape pressed)

Returns

void

Inherited from

ts
HotkeyRecorderBaseOptions.onCancel
HotkeyRecorderBaseOptions.onCancel

onClear?

ts
optional onClear?: () => void;
optional onClear?: () => void;

Defined in: hotkey-recorder.ts:91

Optional callback when the recording is cleared: Backspace/Delete with no modifiers and no recorded steps

Returns

void

Inherited from

ts
HotkeyRecorderBaseOptions.onClear
HotkeyRecorderBaseOptions.onClear

onRecord

ts
onRecord: (hotkey) => void;
onRecord: (hotkey) => void;

Defined in: hotkey-recorder.ts:110

Callback when a chord is successfully recorded

Parameters

hotkey

HotkeyChord

Returns

void


onReject?

ts
optional onReject?: (rejection) => void;
optional onReject?: (rejection) => void;

Defined in: hotkey-recorder.ts:41

Rejected candidates leave recording active.

Parameters

rejection

RecorderRejection

Returns

void

Inherited from

ts
HotkeyRecorderBaseOptions.onReject
HotkeyRecorderBaseOptions.onReject

platform?

ts
optional platform?: "mac" | "windows" | "linux";
optional platform?: "mac" | "windows" | "linux";

Defined in: hotkey-recorder.ts:37

Platform used for Mod and AltGraph handling. Defaults to platform detection.

Inherited from

ts
HotkeyRecorderBaseOptions.platform
HotkeyRecorderBaseOptions.platform

recordBy?

ts
optional recordBy?: RecorderKeyMode;
optional recordBy?: RecorderKeyMode;

Defined in: hotkey-recorder.ts:35

Physical code recording is the default. Choose key to record logical characters.

Inherited from

ts
HotkeyRecorderBaseOptions.recordBy
HotkeyRecorderBaseOptions.recordBy

validate?

ts
optional validate?: (hotkey, context) => string | boolean;
optional validate?: (hotkey, context) => string | boolean;

Defined in: hotkey-recorder.ts:105

Return true to accept, or false/a message to reject while staying in recording mode.

Parameters

hotkey

HotkeyChord

context

HotkeyChordRecorderValidationContext

Returns

string | boolean