Defined in: sequence.ts:79
Manages keyboard sequence matching for Vim-style shortcuts.
This class allows registering multi-key sequences like 'g g' or 'd d' that trigger callbacks when the full sequence is pressed within a configurable timeout.
const matcher = SequenceManager.getInstance()
// Register 'g g' to go to top
const unregister = matcher.register(['G', 'G'], (event, context) => {
scrollToTop()
}, { timeout: 500 })
// Later, to unregister:
unregister()
destroy(): void;
Defined in: sequence.ts:300
Destroys the manager and removes all listeners.
void
getRegistrationCount(): number;
Defined in: sequence.ts:293
Gets the number of registered sequences.
number
register(
sequence,
callback,
options): () => void;
Defined in: sequence.ts:118
Registers a hotkey sequence handler.
Array of hotkey strings that form the sequence
Function to call when the sequence is completed
SequenceOptions = {}
Options for the sequence behavior
A function to unregister the sequence
(): void;
void
resetAll(): void;
Defined in: sequence.ts:283
Resets all sequence progress.
void
static getInstance(): SequenceManager;
Defined in: sequence.ts:93
Gets the singleton instance of SequenceManager.
SequenceManager
static resetInstance(): void;
Defined in: sequence.ts:103
Resets the singleton instance. Useful for testing.
void