function hotkey<T>(hotkey, options?): HotkeyDecorator;Defined in: decorators/hotkey.ts:48
Decorator that registers a hotkey on the element when it connects and unregisters when it disconnects: a chord such as 'Mod+S', a sequence such as ['G', 'G'], or an app hotkey. Uses HotkeyController under the hood.
T extends AppHotkey<string, HotkeyChord | HotkeySequence | null>
T
The chord, sequence, or app hotkey to listen for.
Optional registration options (target, platform, enabled, etc.).
HotkeyDecorator
A method decorator for use on LitElement methods.
class MyElement extends LitElement {
@hotkey('Mod+S')
save() { this.doSave() }
@hotkey(['G', 'G'], { timeout: 500 })
goToTop() { window.scrollTo(0, 0) }
}function hotkey<T>(hotkey, options?): HotkeyDecorator<HotkeyCallbackContextFor<T>>;Defined in: decorators/hotkey.ts:52
Decorator that registers a hotkey on the element when it connects and unregisters when it disconnects: a chord such as 'Mod+S', a sequence such as ['G', 'G'], or an app hotkey. Uses HotkeyController under the hood.
T extends RegisterableHotkey
T
The chord, sequence, or app hotkey to listen for.
Optional registration options (target, platform, enabled, etc.).
HotkeyDecorator<HotkeyCallbackContextFor<T>>
A method decorator for use on LitElement methods.
class MyElement extends LitElement {
@hotkey('Mod+S')
save() { this.doSave() }
@hotkey(['G', 'G'], { timeout: 500 })
goToTop() { window.scrollTo(0, 0) }
}