Hotkey Recorder API Reference

HotkeyRecorderOptions

Interface: HotkeyRecorderOptions

Defined in: hotkey-recorder.ts:20

Options for configuring a HotkeyRecorder instance.

Properties

ignoreInputs?

ts
optional ignoreInputs: boolean;

Defined in: hotkey-recorder.ts:34

Whether to ignore keyboard events from input-like elements (text inputs, textarea, select, contenteditable). When true, typing in inputs passes through normally instead of being captured as a hotkey recording. Escape always works regardless of this setting.

Default

ts
true

onCancel()?

ts
optional onCancel: () => void;

Defined in: hotkey-recorder.ts:24

Optional callback when recording is cancelled (Escape pressed)

Returns

void


onClear()?

ts
optional onClear: () => void;

Defined in: hotkey-recorder.ts:26

Optional callback when shortcut is cleared (Backspace/Delete pressed)

Returns

void


onRecord()

ts
onRecord: (hotkey) => void;

Defined in: hotkey-recorder.ts:22

Callback when a hotkey is successfully recorded

Parameters

hotkey

Hotkey

Returns

void