Hotkeys API Reference
- HotkeyManager
- getHotkeyManager
- Hotkey
- HotkeyChord
- HotkeySequence
- RegisterableHotkey
- RegisterableHotkeyChord
- RegisterableHotkeySequence
- RawHotkeyChord
- HotkeyOptions
- HotkeyChordOptions
- HotkeySequenceOptions
- HotkeyOptionsFor
- HotkeyRegistrationHandle
- HotkeyRegistrationView
- HotkeyChordRegistrationView
- HotkeySequenceRegistrationView
- toHotkeyRegistrationView
- HotkeyCallback
- HotkeyCallbackContext
- HotkeyChordCallbackContext
- HotkeySequenceCallbackContext
- HotkeyCallbackContextFor
- HotkeyMeta
- ConflictBehavior
- isHotkeySequence
- simplifyHotkey
- createSequenceMatcher
- DEFAULT_SEQUENCE_TIMEOUT
- hotkey
- HotkeyController
- HotkeyRegistrationsController
- HotkeyControllerChordOptions
- HotkeyControllerCommonOptions
- HotkeyControllerOptions
- HotkeyControllerOptionsFor
- HotkeyControllerSequenceOptions
- HotkeyControllerTarget
App Hotkeys API Reference
- defineAppHotkeys
- AppHotkeysStore
- provideAppHotkeys
- publishAppHotkeysStore
- AppHotkey
- AppHotkeyInput
- AppHotkeyOptions
- AppHotkeyListItem
- AppHotkeyStatus
- AppHotkeysState
- AppHotkeysStoreOptions
- CustomHotkeys
- Register
- AppHotkeyId
- RegisteredAppHotkeys
- isAppHotkey
- isCustomHotkey
- resolveAppHotkey
- AppHotkeysController
- AppHotkeyControllerOptions
Key hold & held keys API Reference
Hotkey Recorder API Reference
- HotkeyRecorder
- HotkeyRecorderOptions
- HotkeyChordRecorderOptions
- HotkeySequenceRecorderOptions
- HotkeyRecorderState
- HotkeyRecorderCommitKeys
- HotkeyRecorderValidationContext
- HotkeyChordRecorderValidationContext
- HotkeySequenceRecorderValidationContext
- RecorderOptions
- RecorderRejection
- RecorderKeyMode
- findHotkeyConflicts
- HotkeyConflict
- HotkeyConflictOptions
- HotkeyRecorderController
Normalization & format API Reference
- formatForDisplay
- FormatDisplayOptions
- DisplayHotkey
- DisplayHotkeyChord
- formatHotkey
- normalizeHotkey
- parseHotkey
- parseKeyboardEvent
- ParsedHotkeyChord
- matchesKeyboardEvent
- areHotkeysEqual
- validateHotkey
- checkHotkey
- assertValidHotkey
- ValidationResult
- ValidatableHotkey
- LogicalKey
- PhysicalKey
- PhysicalKeyCode
- KEY_DISPLAY_SYMBOLS
- PUNCTUATION_KEY_DISPLAY_LABELS
- MAC_MODIFIER_SYMBOLS
- MAC_MODIFIER_LABELS
- WINDOWS_MODIFIER_LABELS
- LINUX_MODIFIER_LABELS
- MODIFIER_ALIASES
- MODIFIER_ORDER
- MODIFIER_KEYS
HotkeyRegistrationsController
Defined in: controllers/hotkey-registrations.ts:25
A Lit ReactiveController that reads every hotkey registration, chords and sequences, from the singleton HotkeyManager and requests an update when they change. Narrow each view with kind.
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}: ${formatForDisplay(reg.hotkey)}</li>`,
)}
</ul>`
}
}Implements#
- ReactiveController
Constructors#
Constructor#
new HotkeyRegistrationsController(_host): HotkeyRegistrationsController;Defined in: controllers/hotkey-registrations.ts:34
Parameters#
_host#
ReactiveControllerHost
Returns#
HotkeyRegistrationsController
Accessors#
hotkeys#
Get Signature#
get hotkeys(): HotkeyRegistrationView[];Defined in: controllers/hotkey-registrations.ts:30
Every registration, chords and sequences (public view, no callbacks).
Returns#
HotkeyRegistrationView[]
Methods#
hostConnected()#
hostConnected(): void;Defined in: controllers/hotkey-registrations.ts:38
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:52
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