Hotkeys API Reference
- HotkeyManager
- getHotkeyManager
- Hotkey
- HotkeyChord
- HotkeySequence
- RegisterableHotkey
- RegisterableHotkeyChord
- RegisterableHotkeySequence
- RawHotkeyChord
- HotkeyOptions
- HotkeyChordOptions
- HotkeySequenceOptions
- HotkeyOptionsFor
- HotkeyRegistrationHandle
- HotkeyRegistrationView
- HotkeyChordRegistrationView
- HotkeySequenceRegistrationView
- toHotkeyRegistrationView
- HotkeyCallback
- HotkeyCallbackContext
- HotkeyChordCallbackContext
- HotkeySequenceCallbackContext
- HotkeyCallbackContextFor
- HotkeyMeta
- ConflictBehavior
- isHotkeySequence
- simplifyHotkey
- createSequenceMatcher
- DEFAULT_SEQUENCE_TIMEOUT
- injectDefaultHotkeysOptions
- injectHotkey
- injectHotkeyRegistrations
- injectHotkeys
- injectHotkeysContext
- provideHotkeys
- HotkeysContextValue
- HotkeysProviderOptions
- ProvideHotkeysOptions
- InjectHotkeyChordOptions
- InjectHotkeyCommonOptions
- InjectHotkeyDefinition
- InjectHotkeyOptions
- InjectHotkeyOptionsFor
- InjectHotkeySequenceOptions
- InjectHotkeyTarget
- HOTKEYS_INJECTION_TOKEN
App Hotkeys API Reference
- defineAppHotkeys
- AppHotkeysStore
- provideAppHotkeys
- publishAppHotkeysStore
- AppHotkey
- AppHotkeyInput
- AppHotkeyOptions
- AppHotkeyListItem
- AppHotkeyStatus
- AppHotkeysState
- AppHotkeysStoreOptions
- CustomHotkeys
- Register
- AppHotkeyId
- RegisteredAppHotkeys
- isAppHotkey
- isCustomHotkey
- resolveAppHotkey
- injectAppHotkeyList
- injectAppHotkeys
- injectCustomHotkeys
- InjectCustomHotkeysResult
- InjectAppHotkeyOptions
Key hold & held keys API Reference
Hotkey Recorder API Reference
- HotkeyRecorder
- HotkeyRecorderOptions
- HotkeyChordRecorderOptions
- HotkeySequenceRecorderOptions
- HotkeyRecorderState
- HotkeyRecorderCommitKeys
- HotkeyRecorderValidationContext
- HotkeyChordRecorderValidationContext
- HotkeySequenceRecorderValidationContext
- RecorderOptions
- RecorderRejection
- RecorderKeyMode
- findHotkeyConflicts
- HotkeyConflict
- HotkeyConflictOptions
- injectHotkeyRecorder
- AngularHotkeyRecorder
Normalization & format API Reference
- formatForDisplay
- FormatDisplayOptions
- DisplayHotkey
- DisplayHotkeyChord
- formatHotkey
- normalizeHotkey
- parseHotkey
- parseKeyboardEvent
- ParsedHotkeyChord
- matchesKeyboardEvent
- areHotkeysEqual
- validateHotkey
- checkHotkey
- assertValidHotkey
- ValidationResult
- ValidatableHotkey
- LogicalKey
- PhysicalKey
- PhysicalKeyCode
- KEY_DISPLAY_SYMBOLS
- PUNCTUATION_KEY_DISPLAY_LABELS
- MAC_MODIFIER_SYMBOLS
- MAC_MODIFIER_LABELS
- WINDOWS_MODIFIER_LABELS
- LINUX_MODIFIER_LABELS
- MODIFIER_ALIASES
- MODIFIER_ORDER
- MODIFIER_KEYS
injectHotkeyRecorder
Call Signature#
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.
Parameters#
options#
HotkeyChordRecorderOptions
Configuration options for the recorder (or getter)
Returns#
AngularHotkeyRecorder<HotkeyChord>
Object with recording state signals and control functions
Example#
@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(),
)
}
}Call Signature#
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.
Parameters#
options#
HotkeySequenceRecorderOptions
Configuration options for the recorder (or getter)
Returns#
Object with recording state signals and control functions
Example#
@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(),
)
}
}Call Signature#
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.
Parameters#
options#
() => HotkeySequenceRecorderOptions
Configuration options for the recorder (or getter)
Returns#
Object with recording state signals and control functions
Example#
@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(),
)
}
}Call Signature#
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.
Parameters#
options#
() => HotkeyChordRecorderOptions
Configuration options for the recorder (or getter)
Returns#
AngularHotkeyRecorder<HotkeyChord>
Object with recording state signals and control functions
Example#
@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(),
)
}
}Call Signature#
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.
Parameters#
options#
() => HotkeyRecorderOptions
Configuration options for the recorder (or getter)
Returns#
Object with recording state signals and control functions
Example#
@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(),
)
}
}