Skip to content

useHotkeyRecorder

Call Signature

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

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. Pass a scope from createHotkeysScope to apply its hotkeyRecorder defaults.

Parameters

owner

object

options

HotkeyChordRecorderOptions

scope?

EmberHotkeysScope

Returns

EmberHotkeyRecorder<HotkeyChord>

Call Signature

ts
function useHotkeyRecorder(
   owner, 
   options, 
   scope?): EmberHotkeyRecorder;

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

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. Pass a scope from createHotkeysScope to apply its hotkeyRecorder defaults.

Parameters

owner

object

options

HotkeySequenceRecorderOptions

scope?

EmberHotkeysScope

Returns

EmberHotkeyRecorder

Call Signature

ts
function useHotkeyRecorder(
   owner, 
   options, 
   scope?): EmberHotkeyRecorder;

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

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. Pass a scope from createHotkeysScope to apply its hotkeyRecorder defaults.

Parameters

owner

object

options

() => HotkeySequenceRecorderOptions

scope?

EmberHotkeysScope

Returns

EmberHotkeyRecorder

Call Signature

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

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

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. Pass a scope from createHotkeysScope to apply its hotkeyRecorder defaults.

Parameters

owner

object

options

() => HotkeyChordRecorderOptions

scope?

EmberHotkeysScope

Returns

EmberHotkeyRecorder<HotkeyChord>

Call Signature

ts
function useHotkeyRecorder(
   owner, 
   options, 
   scope?): EmberHotkeyRecorder;

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

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. Pass a scope from createHotkeysScope to apply its hotkeyRecorder defaults.

Parameters

owner

object

options

() => HotkeyRecorderOptions

scope?

EmberHotkeysScope

Returns

EmberHotkeyRecorder