TanStack
Hotkey Recorder API Reference

useHotkeyRecorder

Call Signature

ts
function useHotkeyRecorder(owner, options): EmberHotkeyRecorder<HotkeyChord>;

Defined in: packages/ember-hotkeys/src/useHotkeyRecorder.ts:24

Creates an owned recorder with autotracked state and current callback options. 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

owner

object

options

HotkeyChordRecorderOptions

Returns

EmberHotkeyRecorder<HotkeyChord>

Call Signature

ts
function useHotkeyRecorder(owner, options): EmberHotkeyRecorder;

Defined in: packages/ember-hotkeys/src/useHotkeyRecorder.ts:28

Creates an owned recorder with autotracked state and current callback options. 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

owner

object

options

HotkeySequenceRecorderOptions

Returns

EmberHotkeyRecorder

Call Signature

ts
function useHotkeyRecorder(owner, options): EmberHotkeyRecorder;

Defined in: packages/ember-hotkeys/src/useHotkeyRecorder.ts:34

Creates an owned recorder with autotracked state and current callback options. 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

owner

object

options

() => HotkeySequenceRecorderOptions

Returns

EmberHotkeyRecorder

Call Signature

ts
function useHotkeyRecorder(owner, options): EmberHotkeyRecorder<HotkeyChord>;

Defined in: packages/ember-hotkeys/src/useHotkeyRecorder.ts:38

Creates an owned recorder with autotracked state and current callback options. 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

owner

object

options

() => HotkeyChordRecorderOptions

Returns

EmberHotkeyRecorder<HotkeyChord>

Call Signature

ts
function useHotkeyRecorder(owner, options): EmberHotkeyRecorder;

Defined in: packages/ember-hotkeys/src/useHotkeyRecorder.ts:42

Creates an owned recorder with autotracked state and current callback options. 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

owner

object

options

() => HotkeyRecorderOptions

Returns

EmberHotkeyRecorder