function injectHotkeys(hotkeys, commonOptions?): void;Defined in: injectHotkeys.ts:36
Angular inject-based API for registering several hotkeys at once: chords, sequences, and app hotkeys. Pass a getter for a reactive list.
Options merge in this order: provider defaults, app hotkey declaration, commonOptions, per-hotkey options. Each option applies only to the kinds that support it. Unbound app hotkeys and empty sequences register nothing. A null target skips registration until it is set.
| readonly InjectHotkeyDefinition[] | (() => readonly InjectHotkeyDefinition[])
| InjectHotkeyCommonOptions | (() => InjectHotkeyCommonOptions)
void
injectHotkeys([
{ hotkey: 'Mod+S', callback: () => this.save() },
{ hotkey: ['G', 'G'], callback: () => this.scrollToTop(), options: { timeout: 500 } },
])