function injectHotkeyRecorder(options): AngularHotkeyRecorder<HotkeyChord>;Defined in: injectHotkeyRecorder.ts:70
Angular inject-based API for recording keyboard shortcuts.
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. Escape cancels; Backspace/Delete removes the last step or clears.
HotkeyChordRecorderOptions
Configuration options for the recorder (or getter)
AngularHotkeyRecorder<HotkeyChord>
Object with recording state signals and control functions
@Component({ ... })
export class ShortcutSettingsComponent {
shortcut = signal<Hotkey>('Mod+S')
recorder = injectHotkeyRecorder({
onRecord: (hotkey) => this.shortcut.set(hotkey),
onCancel: () => console.log('Recording cancelled'),
})
constructor() {
injectHotkey(
() => this.shortcut(),
() => this.handleSave(),
)
}
}function injectHotkeyRecorder(options): AngularHotkeyRecorder;Defined in: injectHotkeyRecorder.ts:73
Angular inject-based API for recording keyboard shortcuts.
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. Escape cancels; Backspace/Delete removes the last step or clears.
HotkeySequenceRecorderOptions
Configuration options for the recorder (or getter)
Object with recording state signals and control functions
@Component({ ... })
export class ShortcutSettingsComponent {
shortcut = signal<Hotkey>('Mod+S')
recorder = injectHotkeyRecorder({
onRecord: (hotkey) => this.shortcut.set(hotkey),
onCancel: () => console.log('Recording cancelled'),
})
constructor() {
injectHotkey(
() => this.shortcut(),
() => this.handleSave(),
)
}
}function injectHotkeyRecorder(options): AngularHotkeyRecorder;Defined in: injectHotkeyRecorder.ts:78
Angular inject-based API for recording keyboard shortcuts.
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. Escape cancels; Backspace/Delete removes the last step or clears.
() => HotkeySequenceRecorderOptions
Configuration options for the recorder (or getter)
Object with recording state signals and control functions
@Component({ ... })
export class ShortcutSettingsComponent {
shortcut = signal<Hotkey>('Mod+S')
recorder = injectHotkeyRecorder({
onRecord: (hotkey) => this.shortcut.set(hotkey),
onCancel: () => console.log('Recording cancelled'),
})
constructor() {
injectHotkey(
() => this.shortcut(),
() => this.handleSave(),
)
}
}function injectHotkeyRecorder(options): AngularHotkeyRecorder<HotkeyChord>;Defined in: injectHotkeyRecorder.ts:81
Angular inject-based API for recording keyboard shortcuts.
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. Escape cancels; Backspace/Delete removes the last step or clears.
() => HotkeyChordRecorderOptions
Configuration options for the recorder (or getter)
AngularHotkeyRecorder<HotkeyChord>
Object with recording state signals and control functions
@Component({ ... })
export class ShortcutSettingsComponent {
shortcut = signal<Hotkey>('Mod+S')
recorder = injectHotkeyRecorder({
onRecord: (hotkey) => this.shortcut.set(hotkey),
onCancel: () => console.log('Recording cancelled'),
})
constructor() {
injectHotkey(
() => this.shortcut(),
() => this.handleSave(),
)
}
}function injectHotkeyRecorder(options): AngularHotkeyRecorder;Defined in: injectHotkeyRecorder.ts:84
Angular inject-based API for recording keyboard shortcuts.
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. Escape cancels; Backspace/Delete removes the last step or clears.
() => HotkeyRecorderOptions
Configuration options for the recorder (or getter)
Object with recording state signals and control functions
@Component({ ... })
export class ShortcutSettingsComponent {
shortcut = signal<Hotkey>('Mod+S')
recorder = injectHotkeyRecorder({
onRecord: (hotkey) => this.shortcut.set(hotkey),
onCancel: () => console.log('Recording cancelled'),
})
constructor() {
injectHotkey(
() => this.shortcut(),
() => this.handleSave(),
)
}
}