本页还没有译文
本页 41 段还没译成Français,下面显示的是英文原文。HotkeyRegistrationsController
还没翻译译自英文(tanstack.com)本页 41 段都还没译
Defined in: controllers/hotkey-registrations.ts:35
A Lit ReactiveController that tracks all hotkey and sequence registrations.
Subscribes to the singleton HotkeyManager and SequenceManager stores and triggers host updates whenever registrations change.
Example
class ShortcutPalette extends LitElement {
private registrations = new HotkeyRegistrationsController(this)
render() {
return html`
<ul>
${this.registrations.hotkeys.map(
(reg) => html`<li>${reg.options.meta?.name ?? reg.hotkey}</li>`,
)}
</ul>
`
}
}Implements
ReactiveController
Constructors
Constructor
new HotkeyRegistrationsController(_host): HotkeyRegistrationsController;Defined in: controllers/hotkey-registrations.ts:51
Parameters
_host
ReactiveControllerHost
Returns
HotkeyRegistrationsController
Accessors
hotkeys
Get Signature
get hotkeys(): HotkeyRegistrationView[];Defined in: controllers/hotkey-registrations.ts:42
All registered hotkeys (public view, no callbacks).
Returns
HotkeyRegistrationView[]
sequences
Get Signature
get sequences(): SequenceRegistrationView[];Defined in: controllers/hotkey-registrations.ts:47
All registered sequences.
Returns
SequenceRegistrationView[]
Methods
hostConnected()
hostConnected(): void;Defined in: controllers/hotkey-registrations.ts:55
Called when the host is connected to the component tree. For custom
element hosts, this corresponds to the connectedCallback() lifecycle,
which is only called when the component is connected to the document.
Returns
void
Implementation of
ReactiveController.hostConnectedhostDisconnected()
hostDisconnected(): void;Defined in: controllers/hotkey-registrations.ts:81
Called when the host is disconnected from the component tree. For custom
element hosts, this corresponds to the disconnectedCallback() lifecycle,
which is called the host or an ancestor component is disconnected from the
document.
Returns
void
Implementation of
ReactiveController.hostDisconnected