Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Hotkeys API Reference
Hotkey Sequence API Reference
Key Hold API Reference
Held Keys API Reference
Hotkey Recorder API Reference
Hotkey Sequence Recorder API Reference
Format for Display API Reference
Hotkey Sequence API Reference

injectHotkeySequences

Function: injectHotkeySequences()

ts
function injectHotkeySequences(sequences, commonOptions): void;

Defined in: injectHotkeySequences.ts:51

Angular inject-based API for registering multiple keyboard shortcut sequences at once (Vim-style).

Uses the singleton SequenceManager. Call in an injection context (e.g. constructor). Uses effect() to track reactive dependencies when definitions or options are getters.

Options are merged in this order: provideHotkeys defaults < commonOptions < per-definition options

Definitions with an empty sequence are skipped. Disabled sequences (enabled: false) remain registered so they stay visible in devtools; the core manager suppresses execution.

Parameters

sequences

Array of sequence definitions, or getter returning them

InjectHotkeySequenceDefinition[] | () => InjectHotkeySequenceDefinition[]

commonOptions

Shared options for all sequences, or getter

InjectHotkeySequenceOptions | () => InjectHotkeySequenceOptions

Returns

void

Example

ts
@Component({ ... })
export class VimComponent {
  constructor() {
    injectHotkeySequences([
      { sequence: ['G', 'G'], callback: () => this.goTop() },
      { sequence: ['D', 'D'], callback: () => this.deleteLine() },
    ])
  }
}