Hotkeys API Reference
- HotkeyManager
- getHotkeyManager
- HotkeyScopesState
- Hotkey
- HotkeyChord
- HotkeySequence
- RegisterableHotkey
- RegisterableHotkeyChord
- RegisterableHotkeySequence
- RawHotkeyChord
- HotkeyOptions
- HotkeyChordOptions
- HotkeySequenceOptions
- HotkeyOptionsFor
- HotkeyRegistrationHandle
- HotkeyRegistrationView
- HotkeyChordRegistrationView
- HotkeySequenceRegistrationView
- HotkeyRegistrationStatus
- toHotkeyRegistrationView
- HotkeyCallback
- HotkeyCallbackContext
- HotkeyChordCallbackContext
- HotkeySequenceCallbackContext
- HotkeyCallbackContextFor
- HotkeyMeta
- ConflictBehavior
- isHotkeySequence
- simplifyHotkey
- createSequenceMatcher
- DEFAULT_SEQUENCE_TIMEOUT
- hotkey
- HotkeyController
- HotkeyRegistrationsController
- HotkeyScopesStateController
- 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
HotkeyScopesStateController
Defined in: controllers/hotkey-scopes-state.ts:22
A Lit ReactiveController that reads the hotkey manager's scope state: the active scopes, the exclusive scope that owns the keyboard, and the scopes it allows or suspends. Triggers host updates when scopes activate or release.
Example#
class KeyboardOwner extends LitElement {
private scopes = new HotkeyScopesStateController(this)
render() {
const { exclusive } = this.scopes.value
return exclusive ? html`<p>Shortcuts belong to ${exclusive}</p>` : nothing
}
}Implements#
- ReactiveController
Constructors#
Constructor#
new HotkeyScopesStateController(_host): HotkeyScopesStateController;Defined in: controllers/hotkey-scopes-state.ts:34
Parameters#
_host#
ReactiveControllerHost
The Lit component that owns this controller.
Returns#
HotkeyScopesStateController
Accessors#
value#
Get Signature#
get value(): HotkeyScopesState;Defined in: controllers/hotkey-scopes-state.ts:27
The current scope state.
Returns#
HotkeyScopesState
Methods#
hostConnected()#
hostConnected(): void;Defined in: controllers/hotkey-scopes-state.ts:43
Subscribes to the scopes store and updates the host when it changes. Connecting requests an update too, since scopes may have changed while disconnected.
Returns#
void
Implementation of#
ReactiveController.hostConnectedhostDisconnected()#
hostDisconnected(): void;Defined in: controllers/hotkey-scopes-state.ts:52
Unsubscribes from the scopes store.
Returns#
void
Implementation of#
ReactiveController.hostDisconnected