Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TanStack/hotkeys
/ functions
Functions
603 in github.com/TanStack/hotkeys
⨍
Functions
603
◇
Types & classes
183
↓ 304 callers
Function
formatForDisplay
( hotkey: RegisterableHotkey | (string & {}), options: FormatDisplayOptions = {}, )
packages/hotkeys/src/format.ts:92
↓ 203 callers
Method
getInstance
* Gets the singleton instance of HotkeyManager.
packages/hotkeys/src/hotkey-manager.ts:229
↓ 168 callers
Method
register
* Registers a hotkey handler and returns a handle for updating the registration. * * The returned handle allows updating the callback and option
packages/hotkeys/src/hotkey-manager.ts:271
↓ 107 callers
Function
t
(light: string, dark: string)
packages/hotkeys-devtools/src/styles/use-styles.ts:10
↓ 95 callers
Function
createKeyboardEvent
* Helper to create a mock KeyboardEvent
packages/hotkeys/tests/match.test.ts:12
↓ 92 callers
Function
matchesKeyboardEvent
( event: KeyboardEvent, hotkey: Hotkey | ParsedHotkey, platform: 'mac' | 'windows' | 'linux' = detectPla
packages/hotkeys/src/match.ts:43
↓ 82 callers
Method
getRegistrationCount
* Gets the number of registered hotkeys.
packages/hotkeys/src/hotkey-manager.ts:712
↓ 54 callers
Function
createHotkey
( hotkey: RegisterableHotkey | (() => RegisterableHotkey), callback: HotkeyCallback, options: CreateHotk
packages/solid-hotkeys/src/createHotkey.ts:82
↓ 54 callers
Function
useHotkey
( hotkey: RegisterableHotkey, callback: HotkeyCallback, options: UseHotkeyOptions = {}, )
packages/react-hotkeys/src/useHotkey.ts:89
↓ 53 callers
Function
injectHotkey
( hotkey: RegisterableHotkey | (() => RegisterableHotkey), callback: HotkeyCallback, options: InjectHotk
packages/angular-hotkeys/src/injectHotkey.ts:85
↓ 52 callers
Function
dispatchKey
* Helper to create and dispatch a KeyboardEvent
packages/hotkeys/tests/sequence-manager.test.ts:11
↓ 48 callers
Function
useHotkey
( hotkey: RegisterableHotkey, callback: HotkeyCallback, options: UseHotkeyOptions = {}, )
packages/preact-hotkeys/src/useHotkey.ts:90
↓ 44 callers
Function
detectPlatform
()
packages/hotkeys/src/constants.ts:26
↓ 44 callers
Method
resetInstance
* Resets the singleton instance. Useful for testing.
packages/hotkeys/src/hotkey-manager.ts:239
↓ 42 callers
Function
dispatchKey
* Helper to create and dispatch a KeyboardEvent
packages/hotkeys/tests/key-state-tracker.test.ts:8
↓ 41 callers
Function
parseHotkey
( hotkey: Hotkey | (string & {}), platform: 'mac' | 'windows' | 'linux' = detectPlatform(), )
packages/hotkeys/src/parse.ts:31
↓ 39 callers
Function
dispatchKeydown
( target: EventTarget, init: KeyboardEventInit, )
packages/lit-hotkeys/tests/hotkey-sequence.spec.ts:27
↓ 38 callers
Function
hotkey
( hotkey: RegisterableHotkey, options: HotkeyOptions = HOTKEY_DEFAULT_OPTIONS, )
packages/lit-hotkeys/src/decorators/hotkey.ts:29
↓ 36 callers
Function
createKeyboardEvent
* Helper to create a mock KeyboardEvent
packages/hotkeys/tests/hotkey-manager.test.ts:7
↓ 35 callers
Method
hostDisconnected
Unregisters the hotkey when the host is disconnected from the DOM.
packages/lit-hotkeys/src/controllers/hotkey.ts:90
↓ 33 callers
Method
hostConnected
* Registers the hotkey with the global manager when the host is connected to the DOM. * Skips registration if no target is available (e.g. no docum
packages/lit-hotkeys/src/controllers/hotkey.ts:55
↓ 33 callers
Function
reg
()
packages/hotkeys-devtools/src/components/DetailsPanel.tsx:201
↓ 33 callers
Method
setOptions
* Updates the recorder options, including callbacks. * This allows framework adapters to sync callback changes without recreating the recorder.
packages/hotkeys/src/hotkey-recorder.ts:99
↓ 31 callers
Method
start
* Start recording a new hotkey. * * Sets up a keydown event listener that captures keyboard events * and converts them to hotkey strings. Rec
packages/hotkeys/src/hotkey-recorder.ts:113
↓ 30 callers
Function
addToHistory
(action: string)
examples/react/useHotkeySequence/src/index.tsx:17
↓ 28 callers
Method
keys
()
packages/svelte-hotkeys/src/getHeldKeys.svelte.ts:12
↓ 28 callers
Function
resolveMaybeGetter
(value: MaybeGetter<T>)
packages/svelte-hotkeys/src/internal.svelte.ts:12
↓ 24 callers
Function
createKeyboardEvent
( type: 'keydown' | 'keyup', key: string, options: { ctrlKey?: boolean shiftKey?: boolean al
packages/hotkeys/tests/hotkey-sequence-recorder.test.ts:4
↓ 24 callers
Function
dispatchKey
(key: string)
packages/react-hotkeys/tests/useHotkeySequences.test.tsx:9
↓ 24 callers
Function
getHotkeyManager
()
packages/hotkeys/src/hotkey-manager.ts:757
↓ 24 callers
Function
isModifierKey
( key: Key | (string & {}), )
packages/hotkeys/src/parse.ts:242
↓ 24 callers
Method
startRecording
Start recording a new hotkey.
packages/lit-hotkeys/src/controllers/hotkey-recorder.ts:107
↓ 24 callers
Function
validateHotkey
( hotkey: Hotkey | (string & {}), )
packages/hotkeys/src/validate.ts:24
↓ 23 callers
Function
normalizeHotkey
( hotkey: Key | (string & {}), platform: 'mac' | 'windows' | 'linux' = detectPlatform(), )
packages/hotkeys/src/parse.ts:197
↓ 22 callers
Function
getSequenceManager
()
packages/hotkeys/src/sequence-manager.ts:651
↓ 21 callers
Function
createMockHost
()
packages/lit-hotkeys/tests/hotkey-sequence.spec.ts:7
↓ 21 callers
Function
getKeyStateTracker
()
packages/hotkeys/src/key-state-tracker.ts:247
↓ 20 callers
Function
dispatchKeyFromElement
* Helper to dispatch a keyboard event from a specific element. * Focuses the element first to set document.activeElement, then dispatches * on the e
packages/hotkeys/tests/sequence-manager.test.ts:26
↓ 19 callers
Function
dispatchKeyboardEventFromElement
* Helper to create and dispatch a keyboard event from a specific element. * Focuses the element first to set document.activeElement, then dispatc
packages/hotkeys/tests/hotkey-manager.test.ts:626
↓ 19 callers
Function
normalizeRegisterableHotkey
( hotkey: RegisterableHotkey, platform: 'mac' | 'windows' | 'linux' = detectPlatform(), )
packages/hotkeys/src/parse.ts:221
↓ 18 callers
Function
formatHotkeySequence
(sequence: Array<Hotkey>)
packages/hotkeys/src/format.ts:37
↓ 18 callers
Method
isKeyHeld
* Checks if a specific key is currently being held. * * @param key - The key name to check (case-insensitive) * @returns True if the key is c
packages/hotkeys/src/key-state-tracker.ts:207
↓ 17 callers
Method
stop
* Stop recording (same as cancel, but doesn't call onCancel). * * Removes the event listener and resets the recording state.
packages/hotkeys/src/hotkey-recorder.ts:200
↓ 16 callers
Function
isInputElement
(element: EventTarget | null)
packages/hotkeys/src/manager.utils.ts:48
↓ 16 callers
Function
normalizeKeyName
(key: string)
packages/hotkeys/src/constants.ts:457
↓ 15 callers
Method
setOptions
(options: HotkeyRecorderOptions)
packages/svelte-hotkeys/src/createHotkeyRecorder.svelte.ts:77
↓ 15 callers
Function
useHotkeys
( hotkeys: Array<UseHotkeyDefinition>, commonOptions: UseHotkeyOptions = {}, )
packages/react-hotkeys/src/useHotkeys.ts:73
↓ 14 callers
Function
dispatchKey
(key: string)
packages/preact-hotkeys/tests/useHotkeySequences.test.tsx:8
↓ 14 callers
Function
useHotkeyRegistrations
()
packages/react-hotkeys/src/useHotkeyRegistrations.ts:54
↓ 13 callers
Method
cancel
* Cancel recording without saving. * * Removes the event listener, resets the recording state, and calls * the onCancel callback if provided.
packages/hotkeys/src/hotkey-recorder.ts:220
↓ 13 callers
Function
getDefaultHotkeysOptions
()
packages/svelte-hotkeys/src/HotkeysCtx.ts:59
↓ 13 callers
Function
mount
(root: HTMLElement)
examples/vanilla/formatForDisplay/src/main.ts:43
↓ 13 callers
Function
useHotkeySequences
( definitions: Array<UseHotkeySequenceDefinition>, commonOptions: UseHotkeySequenceOptions = {}, )
packages/react-hotkeys/src/useHotkeySequences.ts:68
↓ 12 callers
Method
commit
* Commit the current steps as a sequence. No-op if fewer than one step.
packages/hotkeys/src/hotkey-sequence-recorder.ts:243
↓ 12 callers
Function
dispatchKey
(key: string)
packages/solid-hotkeys/tests/createHotkeySequences.test.tsx:10
↓ 11 callers
Function
createHotkeys
( hotkeys: | Array<CreateHotkeyDefinition> | (() => Array<CreateHotkeyDefinition>), commonOptions:
packages/solid-hotkeys/src/createHotkeys.ts:66
↓ 11 callers
Function
createMockHost
* Minimal host that satisfies ReactiveControllerHost for testing * without pulling in the full LitElement rendering pipeline.
packages/lit-hotkeys/tests/hotkey.spec.ts:11
↓ 11 callers
Method
destroy
* Destroys the manager and removes all listeners.
packages/hotkeys/src/hotkey-manager.ts:741
↓ 10 callers
Function
addToHistory
(action: string)
examples/react/useHotkeySequences/src/index.tsx:19
↓ 10 callers
Function
addToHistory
(action: string)
examples/solid/createHotkeySequences/src/index.tsx:19
↓ 10 callers
Function
addToHistory
(action: string)
examples/solid/createHotkeySequence/src/index.tsx:17
↓ 10 callers
Function
addToHistory
(action: string)
examples/preact/useHotkeySequence/src/index.tsx:17
↓ 10 callers
Function
addToHistory
(action: string)
examples/preact/useHotkeySequences/src/index.tsx:19
↓ 10 callers
Method
cancelRecording
Cancel recording without saving.
packages/lit-hotkeys/src/controllers/hotkey-recorder.ts:117
↓ 10 callers
Function
createHotkeySequence
( sequence: HotkeySequence | (() => HotkeySequence), callback: HotkeyCallback, options: | CreateHotk
packages/solid-hotkeys/src/createHotkeySequence.ts:64
↓ 10 callers
Function
createHotkeySequences
( sequences: | Array<CreateHotkeySequenceDefinition> | (() => Array<CreateHotkeySequenceDefinition>)
packages/solid-hotkeys/src/createHotkeySequences.ts:61
↓ 10 callers
Function
enabled
()
packages/hotkeys-devtools/src/components/HotkeyList.tsx:179
↓ 10 callers
Function
injectHotkeySequence
( sequence: HotkeySequence | (() => HotkeySequence), callback: HotkeyCallback, options: | InjectHotk
packages/angular-hotkeys/src/injectHotkeySequence.ts:58
↓ 10 callers
Function
normalizeHotkeyFromParsed
( parsed: ParsedHotkey, platform: 'mac' | 'windows' | 'linux' = detectPlatform(), )
packages/hotkeys/src/parse.ts:210
↓ 10 callers
Function
rawHotkeyToParsedHotkey
( raw: RawHotkey, platform: 'mac' | 'windows' | 'linux' = detectPlatform(), )
packages/hotkeys/src/parse.ts:99
↓ 10 callers
Method
stopRecording
Stop recording (same as cancel but without calling onCancel).
packages/lit-hotkeys/src/controllers/hotkey-recorder.ts:112
↓ 10 callers
Function
useHotkeySequence
( sequence: HotkeySequence, callback: HotkeyCallback, options: UseHotkeySequenceOptions = {}, )
packages/react-hotkeys/src/useHotkeySequence.ts:73
↓ 10 callers
Function
useHotkeySequence
( sequence: HotkeySequence, callback: HotkeyCallback, options: UseHotkeySequenceOptions = {}, )
packages/preact-hotkeys/src/useHotkeySequence.ts:74
↓ 9 callers
Method
addToHistory
(action: string)
examples/lit/hotkey-sequence/src/app.ts:36
↓ 9 callers
Function
dispatchKeydown
( target: EventTarget, init: KeyboardEventInit, )
packages/lit-hotkeys/tests/hotkey.spec.ts:31
↓ 9 callers
Function
hotkeySequence
( sequence: HotkeySequence, options: SequenceOptions = HOTKEY_SEQUENCE_DEFAULT_OPTIONS, )
packages/lit-hotkeys/src/decorators/hotkey-sequence.ts:30
↓ 9 callers
Function
injectHotkeys
( hotkeys: | Array<InjectHotkeyDefinition> | (() => Array<InjectHotkeyDefinition>), commonOptions:
packages/angular-hotkeys/src/injectHotkeys.ts:75
↓ 9 callers
Method
isRegistered
* Checks if a specific hotkey is registered. * * @param hotkey - The hotkey string to check * @param target - Optional target element to matc
packages/hotkeys/src/hotkey-manager.ts:723
↓ 8 callers
Function
getDefaultIgnoreInputs
(parsedHotkey: ParsedHotkey)
packages/hotkeys/src/manager.utils.ts:30
↓ 8 callers
Method
isRecording
Whether recording is currently active.
packages/lit-hotkeys/src/controllers/hotkey-recorder.ts:51
↓ 8 callers
Method
render
()
examples/lit/hotkey/src/app.ts:198
↓ 8 callers
Function
scopeConflicts
()
packages/hotkeys-devtools/src/components/HotkeyList.tsx:141
↓ 8 callers
Function
sequenceRegistrations
()
packages/hotkeys-devtools/src/components/HotkeyList.tsx:137
↓ 8 callers
Function
targetConflicts
()
packages/hotkeys-devtools/src/components/HotkeyList.tsx:139
↓ 8 callers
Function
useHotkeys
( hotkeys: Array<UseHotkeyDefinition>, commonOptions: UseHotkeyOptions = {}, )
packages/preact-hotkeys/src/useHotkeys.ts:73
↓ 7 callers
Method
#clearIdleTimer
()
packages/hotkeys/src/hotkey-sequence-recorder.ts:114
↓ 7 callers
Function
createHotkeyHandler
( hotkey: Hotkey | ParsedHotkey, callback: HotkeyCallback, options: CreateHotkeyHandlerOptions = {}, )
packages/hotkeys/src/match.ts:159
↓ 7 callers
Function
createId
()
examples/react/useHotkeySequenceRecorder/src/index.tsx:24
↓ 7 callers
Function
createId
()
examples/react/useHotkeyRecorder/src/index.tsx:24
↓ 7 callers
Function
createId
()
examples/angular/injectHotkeyRecorder/src/app/app.component.ts:19
↓ 7 callers
Function
createId
()
examples/angular/injectHotkeySequenceRecorder/src/app/app.component.ts:22
↓ 7 callers
Function
createId
()
examples/solid/createHotkeySequenceRecorder/src/index.tsx:25
↓ 7 callers
Function
createId
()
examples/solid/createHotkeyRecorder/src/index.tsx:25
↓ 7 callers
Function
createId
()
examples/preact/useHotkeySequenceRecorder/src/index.tsx:24
↓ 7 callers
Function
createId
()
examples/preact/useHotkeyRecorder/src/index.tsx:24
↓ 7 callers
Function
createId
()
examples/lit/hotkey-sequence-recorder/src/app.ts:25
↓ 7 callers
Function
createId
()
examples/lit/hotkey-recorder/src/app.ts:21
↓ 7 callers
Function
createStoreSubscriber
( store: SubscribableStore<TState>, )
packages/svelte-hotkeys/src/internal.svelte.ts:16
↓ 7 callers
Function
formatHotkey
(parsed: ParsedHotkey)
packages/hotkeys/src/format.ts:53
↓ 7 callers
Function
getActiveElementForListenerTarget
( target: HTMLElement | Document | Window, )
packages/hotkeys/src/manager.utils.ts:83
next →
1–100 of 603, ranked by callers