Defined in: controllers/hotkey-sequence.ts:26
A Lit ReactiveController that registers a keyboard sequence (e.g. Vim-style) when the host element is connected and unregisters it when the host is disconnected.
class MyElement extends LitElement {
private seq = new HotkeySequenceController(this, ['G', 'G'], () => this.goToTop())
constructor() {
super()
this.addController(this.seq)
}
}new HotkeySequenceController(
_host,
_sequence,
callback,
_options?): HotkeySequenceController;Defined in: controllers/hotkey-sequence.ts:37
ReactiveControllerHost
The Lit component that owns this controller. Add the controller with addController().
HotkeySequence
The sequence to register.
HotkeyCallback
Called with the host as this.
SequenceOptions | (() => SequenceOptions)
Options or a getter. Property getters are read on connection and after host updates.
HotkeySequenceController
hostConnected(): void;Defined in: controllers/hotkey-sequence.ts:49
Registers when connected and a target is available.
void
ReactiveController.hostConnectedhostDisconnected(): void;Defined in: controllers/hotkey-sequence.ts:68
Releases registrations when the host disconnects.
void
ReactiveController.hostDisconnectedhostUpdated(): void;Defined in: controllers/hotkey-sequence.ts:55
Refreshes options after rendering, when scoped targets are available.
void
ReactiveController.hostUpdated