npm / @tanstack/react-hotkeys
@tanstack/react-hotkeys
What changed in @tanstack/react-hotkeys 0.0 to 0.27, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
56 breaking1 deprecations55 new APIs and options2 performance15 behavior and defaults5 tooling27 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@tanstack/react-hotkeys 0.272 changes
Breaking changes 1
Inline array, object, element, or function values no longer cause registration lists to re-render on their own; changed string, number, or boolean fields still do.
New APIs and options 1
Adds a provider for rendering app hotkeys from a React Server Component, using appHotkeys from a server module.
@tanstack/react-hotkeys 0.261 changes
Breaking changes 1
Escape is routed to the innermost open overlay; hotkeys outside it skip the key without preventing its default or stopping propagation, allowing the overlay to close.
@tanstack/react-hotkeys 0.259 changes
Breaking changes 1
The recorder now defaults to recording keys by name where possible; set
recordBy: 'code'to keep recording every key by position.
Deprecations 1
The plain React adapter export is deprecated; use the label primitive in components, while direct calls outside components remain supported.
New APIs and options 6
HotkeyRecorderState now takes the recorded hotkey type as an optional type argument.
A new shared type is available from @tanstack/hotkeys.
Accepts the recorder context so conflict checks can account for the key press that recorded a hotkey.
The recorder callback now receives the recording context as its second argument.
Accepts the recorder context when setting a custom hotkey, allowing the key press that recorded it to inform conflict checks.
Returns the keyboard layout for drawing labels yourself.
Behavior and default changes 1
The label primitive now formats labels using the provider's platform and, in Chromium browsers, the user's keyboard layout.
@tanstack/react-hotkeys 0.232 changes
Breaking changes 1
React key-hold helpers now match letters in any case and other key names case-sensitively; use 'Escape' rather than 'escape' to match Escape.
Fixes and other changes 1
HotkeysProvider now handles appHotkeys that arrive after its first render, so saved custom hotkeys are applied and hotkey lists, helpers, and devtools work once declarations arrive.
@tanstack/react-hotkeys 0.2214 changes
Breaking changes 6
Tab and Shift+Tab cancel recording and move focus as usual; set recordTab: true to record them instead.
A null or undefined target, or an unset ref, registers no hotkey until its element exists; only an omitted target listens on document.
No longer has a built-in message; it has a message only when your validate callback returns one.
Returns reason codes instead of English text, allowing apps to provide their own messages. Issues are HotkeyIssue values, and sequence issues carry a step index.
The recorder rejection reason previously named
invalidis nowwhitespace.Element-target hotkeys run after framework key handlers, allowing those handlers to stop the hotkey; framework handlers outside the target also run first.
New APIs and options 1
Adapters set this new option so element targets listen on their document or closed shadow root and run after delegated framework handlers.
Tooling 1
Lists each problem in a hotkey's details in plain words.
Fixes and other changes 6
App hotkeys and related comparisons now use the provider's platform. The store follows platform changes and notifies subscribers once after applying any new saved custom hotkeys.
Saved custom hotkeys are compared exactly, so new saved data such as
Meta+SreplacesMod+Seven where the two match, and stays correct if the platform changes later.No longer warn about saved custom hotkeys with an unknown id or invalid value; those hotkeys are still dropped.
No longer throw a ReferenceError when
processis undefined, such as in plain ESM loaded from a CDN.Issues in a sequence carry the index of their step instead of a
Step 2:prefix.No longer warns when called with an unknown id.
@tanstack/react-hotkeys 0.216 changes
New APIs and options 4
Providers accept a platform setting, which is also the default platform for their hotkeys and recorders.
Detects a platform from a user-agent string, allowing server-rendered hotkey labels to match the user's platform.
Names the result returned by platform detection.
Adds a formatter hook for React server rendering that uses the provider's platform.
Fixes and other changes 2
Without a user agent, platform detection returns linux on Node, Deno, Bun, and Cloudflare Workers instead of the server's own OS.
In development, formatting a label on the server without a platform warns once.
@tanstack/react-hotkeys 0.205 changes
Breaking changes 1
In React, a null target registers nothing instead of listening on document. Omit target to listen on document.
Performance 1
Returns the same action functions on every render, so memoized children and effects that depend on them no longer re-run.
Behavior and default changes 2
Hotkey hooks and functions accept undefined or null to register nothing; changing to a nullish value removes the registration, and changing back registers it again. Empty hotkeys also register nothing.
An option set to undefined keeps its default, as if omitted. In setOptions, undefined resets an option to its default or removes it when it has no default.
Fixes and other changes 1
The provider applies changed customHotkeys values, replacing current custom hotkeys without calling onCustomHotkeysChange. Undefined leaves them unchanged; null clears them.
@tanstack/react-hotkeys 0.198 changes
Breaking changes 5
Accepts hotkeys only, including single keys and standalone modifiers. Pass a KeyboardEvent key as
{ key }rather than passing any string.Key names are case-sensitive and aliases are no longer resolved. Use canonical names; letters remain case-insensitive and modifier aliases still work.
Moves into the devtools package and is no longer available from the prior package surface.
TanStack Hotkeys no longer depends on this package or framework store adapters, reducing bundle sizes by about 1.3 kB in core and 2.4 kB in the React adapter (brotli).
The recorder rejects whitespace characters, including the non-breaking space from Option+Space on macOS.
Performance 1
Providers no longer bundle app hotkey support unless the app uses this API; a React app with HotkeysProvider and no app hotkeys is about 1 kB smaller (brotli).
Behavior and default changes 1
Warns about keys that aren't written like a known key instead of checking a list of key names; registering such a hotkey logs a development warning.
Fixes and other changes 1
Ignore names inherited from Object.prototype, preventing inherited ids such as
toStringfrom being saved as custom hotkeys.
@tanstack/react-hotkeys 0.182 changes
Breaking changes 1
Both packages now require React 18 or newer; React 16.8–16.13 cannot build the package because @tanstack/react-store imports react/jsx-runtime.
Behavior and default changes 1
Hooks and HotkeysProvider are marked 'use client', allowing React Server Components such as a Next.js app/layout.tsx to render HotkeysProvider without a wrapper.
@tanstack/react-hotkeys 0.175 changes
Breaking changes 1
Hint helpers return false unless a registration of the hotkey can fire, including when it is enabled, in an active scope, and focused if registered on an element.
New APIs and options 4
Reports whether a hotkey or app hotkey has a registration that can fire.
The
'always'option prevents the browser's action even when a chord cannot fire because it is disabled or its scope is inactive or suspended.Registration views expose a status of active, suspended, or disabled, so callers can filter active hotkeys without checking enabled and scope state separately.
React gains an API that reads the hotkey manager's scope state and updates when scopes activate or release.
@tanstack/react-hotkeys 0.161 changes
Tooling 1
The package now ships a TanStack Intent skill for its bindings, helping coding agents use the library's APIs instead of hand-written keydown listeners and wrappers.
@tanstack/react-hotkeys 0.1526 changes
Breaking changes 15
Renamed from createHotkeyHandler to clarify that the handler is for chords.
Renamed from CreateHotkeyHandlerOptions to clarify that the options are for chord handlers.
Renamed from createMultiHotkeyHandler to clarify that the handler is for chords.
Renamed from FourModifierHotkey to distinguish chord types from sequence types.
Renamed from MultiHotkeyHandler to clarify that the handler is for chords.
Normalizes chord strings, chord objects, parsed chords, and sequences, replacing the previous normalization functions.
Renamed from ParsedHotkey to distinguish chord types from sequence types.
Sequence callbacks and recorder validation contexts receive parsedSequence with every step parsed, replacing the previous last-step-only parsedHotkey value.
Parses chord strings, chord objects, and sequences, replacing parseRegisterableHotkey and rawHotkeyToParsedHotkey.
Every sequence step now calls preventDefault, not just the last; set preventDefault: false to let the browser act on every step.
Renamed from RawHotkey to distinguish chord types from sequence types.
Sequence progress clears when its timeout passes and registration subscribers are notified, so matchedStepCount no longer remains above 0 after timeout.
Renamed from SingleModifierHotkey to distinguish chord types from sequence types.
Renamed from ThreeModifierHotkey to distinguish chord types from sequence types.
Renamed from TwoModifierHotkey to distinguish chord types from sequence types.
New APIs and options 10
App hotkeys can declare a scope, allowing hotkeys in different scopes to share a key without conflict; lists report suspended when all enabled registrations are in inactive scopes.
Scopes group hotkeys that can be activated or suspended together; nested and most recently activated scopes determine which matching hotkey wins.
Activates a scope until the returned function is called; exclusive scopes can suspend other scopes, with selected scopes allowed to remain active.
Publishes which scopes are active, suspended, allowed, and exclusive.
Accepts enabled; a scoped provider's scope is active while the provider is mounted and enabled.
Accepts exclusive to configure a provider's scope to suspend other scopes while active.
Accepts scope so hotkeys registered inside a scoped provider belong to that scope.
Reports whether a scope's hotkeys can fire.
New type describes sequences whose steps can be chord objects as well as strings; registered sequences store each step as a string.
Pass scope to a hotkey to place it in a scope; every hotkey belongs to a scope, with global active by default.
Behavior and default changes 1
Also formats parsed sequences, returning one string per step.
@tanstack/react-hotkeys 0.1416 changes
Breaking changes 10
defaultOptions.hotkey and defaultOptions.hotkeyRecorder replace the sequence-specific default option keys.
formatForDisplay replaces formatHotkeySequence and formatWithLabels and accepts chords and sequences.
HotkeyChord replaces Hotkey as the type for a single chord; Hotkey now covers chords and sequences.
HotkeyManager and getHotkeyManager replace SequenceManager and getSequenceManager().
HotkeyManager.resetSequenceProgress replaces SequenceManager.resetAll().
useHotkey replaces useHotkeySequence for registering a sequence callback.
The recorder records sequences using maxSteps, which defaults to 1.
useHotkeyRecorder and HotkeyRecorder replace the sequence-specific recorder hook and type.
Registrations now return one list containing chords and sequences instead of separate hotkeys and sequences lists; use kind to narrow the list.
useHotkeys replaces useHotkeySequences and takes definitions with a hotkey field.
New APIs and options 5
Pass declared app hotkeys to the adapter's provider; optional customHotkeys and onCustomHotkeysChange support persisting user changes.
Declares the hotkeys available in an app so they can be provided to an adapter and customized by users.
Chords accept requireReset, enforced by types.
Sequences accept timeout, enforced by types.
React can read and change app hotkeys through its app hotkeys APIs.
Behavior and default changes 1
Hotkey now represents either a chord or a sequence; hotkey APIs, manager registration, formatting, equality, validation, and hints accept both. A one-step sequence is its chord.
@tanstack/react-hotkeys 0.138 changes
New APIs and options 4
Adds adapters with framework-native lifecycle management, scoped defaults, and shared registration reconciliation.
Adds devtools integrations with development-only defaults and explicit production exports.
Adds an Ember modifier for element-scoped shortcuts with reactive options and automatic cleanup.
Adds support for reactive option getters.
Behavior and default changes 2
Recorder options can now update live.
Solid and Vue now follow replacement provider defaults.
Fixes and other changes 2
Getters in Ember definitions are now tracked.
Registrations and scoped targets refresh after host updates.
@tanstack/react-hotkeys 0.122 changes
Breaking changes 2
The minimum required Node.js version is 20.
Packages are now ESM-only; CommonJS builds, package src directories, and source maps are no longer published. Use ESM imports and inspect API types in dist.
@tanstack/react-hotkeys 0.1138 changes
Breaking changes 7
Exact matches are preferred over physical-key fallbacks in hotkeys and sequences.
Bracketed physical codes are rejected in logical key fields.
Clearing a recording calls only onClear, no longer calling onRecord with an empty value.
ParsedHotkey is now a union containing either key or code; use a type intersection instead of extending it with an interface.
RawHotkey is now a union containing either key or code; use a type intersection instead of extending it with an interface.
Recorders now default to physical codes; set recordBy to 'key' to record logical keys.
Recording keystrokes, repeats, and releases no longer trigger registered shortcuts.
New APIs and options 11
Recorder options now include detectConflicts.
Adds conflict detection for hotkeys, including sequence-prefix checks.
formatForDisplay supports parsed bindings, parts, separate modifier and key symbols, keyLabels, and a resolved layoutMap.
HotkeyMeta gains a group field.
Adds matchesHeldModifiers and shortcut hint helpers for every framework adapter.
Recorder options now include onReject.
parseKeyboardEvent accepts a platform option.
Hotkeys support typed physical bindings, including Mod+[KeyS] and { code: 'KeyS', mod: true }.
Recorder options now include recordBy.
Adds shortcut hint helpers for every framework adapter.
Recorder options now include validate.
Behavior and default changes 4
Devtools conflict reporting is updated.
Hotkeys support F1–F24, additional named keys, and more punctuation shortcuts.
Physical-key labels are displayed readably, such as S instead of KeyS.
Svelte recorder controls can be passed directly to event handlers.
Tooling 3
Devtools group search is updated.
Devtools key/code labels are updated.
Devtools plus-key formatting is updated.
Fixes and other changes 13
Held-key and requireReset state are cleared correctly when released keys produce different characters.
Equivalent hotkey aliases are recognized in registration lookups and conflict checks, including sequences.
Recorder ignoreInputs works inside shadow roots.
Shortcuts no longer trigger during IME composition or AltGraph character entry.
Literal plus shortcuts such as Mod++ and Unicode key names are handled correctly.
Recording logical AltGraph shortcuts preserves Shift.
Preact hotkey registrations avoid unnecessary updates and handle target changes correctly.
Reading Preact hotkey registrations no longer causes continuous rerenders.
React hotkey registrations avoid unnecessary updates and handle target changes correctly.
Repeated keydowns are ignored when matching sequences.
Shortcut matching is improved across keyboard layouts, macOS Option keys, shifted punctuation, and numpad keys.
Shortcuts reset when keys are released inside inputs or while disabled.
Standalone sequence matching ignores modifier and composition events.
@tanstack/react-hotkeys 0.92 changes
New APIs and options 2
Adds options.meta with name and descriptions by default.
Adds the useHotkeysRegistrations hook.
@tanstack/react-hotkeys 0.75 changes
New APIs and options 4
Adds an API for creating hotkey sequences.
Adds an API for creating hotkey sequence attachments.
Adds an API for injecting hotkey sequences.
Adds a plural sequence hook for registering hotkey sequences.
Behavior and default changes 1
Disabled registrations remain in the manager for devtools, while core dispatch is skipped; toggling enabled updates handles via setOptions instead of unregistering and registering again.
@tanstack/react-hotkeys 0.63 changes
Breaking changes 3
Sequence recording is aligned with the hotkey-prefixed public API through HotkeySequenceRecorder.
Provider defaults for sequence recording are aligned under hotkeySequenceRecorder.
A framework hook for sequence recording is aligned with the hotkey-prefixed public API.
@tanstack/react-hotkeys 0.51 changes
New APIs and options 1
Adds a hook for registering multiple hotkeys in one call.
@tanstack/react-hotkeys 0.41 changes
New APIs and options 1
An Angular adapter was added, giving developers an Angular integration option.
@tanstack/react-hotkeys 0.31 changes
Behavior and default changes 1
The sequence-manager and hooks were overhauled to bring them into feature parity with hotkey-manager.
@tanstack/react-hotkeys 0.11 changes
Breaking changes 1
The default for ignoreInputs is smarter, changing how input elements are ignored.
@tanstack/react-hotkeys 0.02 changes
New APIs and options 1
Initial release of the package.
Fixes and other changes 1
Registration reruns when options.enabled changes.