Skip to content

fix(deps): update dependency @tanstack/react-hotkeys to ^0.22.0 - #549

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/tanstack-react-hotkeys-0.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/tanstack-react-hotkeys-0.x

Conversation

@renovate

@renovate renovate Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@tanstack/react-hotkeys (source) ^0.12.1 → ^0.22.0 age confidence

Release Notes

TanStack/hotkeys (@​tanstack/react-hotkeys)

v0.22.0

Compare Source

Minor Changes
  • #​225 b5e429a - Run element-target hotkeys after the framework's own key handlers in React, Svelte, Solid, and Octane. An onKeyDown handler inside the target, such as an autocomplete that closes on Escape, now runs first and can stop the hotkey. Before, the hotkey ran first and its default stopPropagation kept the key from those handlers.

    These adapters set the new afterDelegatedHandlers option, so an element target listens on its document, or on its closed shadow root. Framework handlers outside the target also run before the hotkey now. In Solid, a stop by an onKeyDown handler also skips document hotkeys, even when the hotkey registered before the first component that uses onKeyDown loaded.

Patch Changes

v0.21.0

Compare Source

Minor Changes
  • #​221 5bf96b6 - Server-rendered hotkey labels can match the user's platform.

    • detectPlatform(userAgent) detects the platform from a user agent string, such as a request's User-Agent header. null, as from a missing header, works like no argument. A new HotkeyPlatform type names the result.
    • Without a user agent, detectPlatform() 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.
    • Providers accept defaultOptions.platform, which is also the default platform for their hotkeys and recorders.
    • Adapters that render on the server add a formatter hook that uses the provider's platform: useFormatForDisplay (React, Preact, Octane, Vue, Ember), createFormatForDisplay (Solid), getFormatForDisplay (Svelte), and injectFormatForDisplay (Angular).
    • Angular's provideHotkeys accepts defaultOptions as a getter that runs in the injection context, so it can read the request with inject(REQUEST).
Patch Changes

v0.20.2

Compare Source

Patch Changes
  • #​218 93b8b5e - useHotkeyRecorder returns the same action functions on every render, so memoized children and effects that depend on them no longer re-run.
  • Updated dependencies [93b8b5e]:

v0.20.1

Compare Source

Patch Changes

v0.20.0

Compare Source

Minor Changes
  • #​214 a179ef6 - Hotkey hooks and functions in every adapter accept undefined and null as the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint is false. When a hotkey changes to undefined or null, its registration is removed; when it changes back, it registers again. Before, a nullish hotkey threw: in React it unmounted the tree, in Vue, Solid, Angular, and Svelte the old hotkey kept firing, Ember failed to render, and Alpine stopped updating the page. In Angular, injectHotkey(() => this.shortcut(), …) now works with an optional input, without ?? [].

    • The plural forms skip a definition whose hotkey is nullish.
    • An empty hotkey, such as '' or { key: '' }, also registers nothing, so clearing a hotkey to '' removes its registration. Before, an empty hotkey registered and fired on keydown events with no key, such as those some autofill tools send.
    • HotkeyManager.register still requires a hotkey. It throws a clear error for undefined, null, or an empty hotkey, as it already did for an empty sequence.
    • hasActiveRegistration and matchesHeldModifiers return false for no hotkey.
    • The Lit @hotkey decorator still needs a hotkey, because it is set when the class is defined.
  • #​214 a179ef6 - An option set to undefined now keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such as preventDefault: props.preventDefault, turned off preventDefault and stopPropagation, so Mod+S also opened the browser's Save dialog. eventType: undefined made a hotkey never fire, and scope: undefined moved a hotkey out of its provider's scope.

    • This applies to register, provider defaults, createHotkeysScope defaults in Alpine and Ember, and recorder options merged with provider defaults.
    • In setOptions, undefined resets an option to its default, or removes it when it has no default.

    Behavior changes:

    • In React and Preact, a null target registers nothing, like a ref that is still empty. Before, it listened on document. To listen on document, leave out target. prepareHotkeyDefinitions in @tanstack/hotkeys/adapter does the same when no resolveTarget is given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped a null target.
Patch Changes
  • #​214 a179ef6 - HotkeysProvider now applies a changed customHotkeys prop. Before, the provider read it only on the first render, so saved shortcuts that loaded asynchronously, or another user's shortcuts after sign-in, were ignored until the provider remounted.

    • When the value of customHotkeys changes, it replaces the current custom hotkeys without calling onCustomHotkeysChange. The prop is compared by value, so passing equal data again, such as JSON.parse(localStorage.getItem('hotkeys')) on every render, keeps changes the user made since. undefined leaves the custom hotkeys unchanged, such as while saved data loads, and null clears them, such as on sign-out.
    • AppHotkeysStore.setOptions accepts customHotkeys with the same behavior. Lit, Alpine, and Ember apps can call it on the store that provideAppHotkeys returns when saved data loads later.
    • In Angular, provideHotkeys accepts customHotkeys as a signal or function. In Vue, provideHotkeysContext accepts it as a ref or getter.
  • Updated dependencies [a179ef6, a179ef6, a179ef6]:

v0.19.0

Compare Source

Minor Changes
  • #​211 8b93ed5 - Key names are case-sensitive, and key aliases are no longer resolved, which removes the key-name lookup tables from every bundle. Typed hotkeys, recording, matching, and display behave as before.

    • Spellings that the hotkey types don't allow, such as escape, Esc, f1, Plus, or pgdn, now stay as written and don't match. Use the canonical names: Escape, F1, +, PageDown. Letters still match in any case, and modifier aliases such as Ctrl, Cmd, and Option still work.
    • validateHotkey and checkHotkey warn about keys that aren't written like a known key, such as escape, instead of checking a list of key names. In development, registering such a hotkey logs a warning that it may never fire.
    • formatForDisplay accepts hotkeys only, including single keys and modifiers on their own such as 'Shift', instead of any string. Pass a key from a KeyboardEvent, such as a held key from useHeldKeys, as { key }.
    • HotkeyManager.triggerRegistration moves into the devtools package, which was its only user.
    • The recorder rejects whitespace characters, such as the non-breaking space from Option+Space on macOS, with the message "Whitespace keys cannot be recorded".
    • Saved custom hotkeys and display labels ignore names inherited from Object.prototype, such as toString. Previously, saved custom hotkeys could keep those ids, and formatForDisplay could show function source text for them.
  • #​211 8b93ed5 - TanStack Hotkeys no longer depends on @tanstack/store or the framework store adapters. Its stores, such as manager.registrations and recorder.store, keep the same state, get, setState, and subscribe API and still work with TanStack Store's framework adapters. Bundles shrink by about 1.3 kB (brotli) in core and about 2.4 kB in the React adapter.

    The stores are no longer Store instances from @tanstack/store, so instanceof Store checks and other TanStack Store features, such as actions, no longer apply to them.

  • #​211 8b93ed5 - Providers no longer bundle app hotkey support unless the app uses defineAppHotkeys. A React app with HotkeysProvider and no app hotkeys is about 1 kB smaller (brotli).

Patch Changes

v0.18.0

Compare Source

Minor Changes
  • #​204 5053876 - The hooks and HotkeysProvider are now marked 'use client', so a React Server Component such as a Next.js app/layout.tsx can render HotkeysProvider without a wrapper. Before, the Next.js build failed with createContext is not a function. Server components can still import helpers such as formatForDisplay from the package.

    Both packages now require React 18 or newer. The old >=16.8 range admitted React 16.8 to 16.13, which can't build the package because @tanstack/react-store imports react/jsx-runtime.

Patch Changes

v0.17.0

Compare Source

Minor Changes
  • #​199 431094a - Hotkey hints now show only for hotkeys that can fire. useHotkeyHint and the other adapters' hint helpers return false unless a registration of the hotkey can fire: it's enabled, in an active scope, and, for a hotkey on an element, focus is inside that element. Hotkeys registered with enabled: false, hotkeys suspended by an exclusive scope, hotkeys on an element that doesn't have focus, and hotkeys that nothing registered no longer show hints. App hotkeys match their registrations by id, so custom hotkeys still work. To keep the old behavior, call matchesHeldModifiers, which still checks only held keys. The new HotkeyManager.hasActiveRegistration(hotkey) reports whether a hotkey or app hotkey has a registration that can fire.

    Add preventDefault: 'always'. A chord with this option still prevents the browser's action while it can't fire, because it's disabled or its scope is inactive or suspended. For example, a disabled Mod+S no longer opens the browser's Save dialog. It doesn't stop propagation, and it still skips typing in text fields. When another hotkey handles the key, that hotkey's options apply instead. Sequences treat 'always' as true. Set it in default options to apply it to every hotkey. We recommend it for most hotkeys; the sensible defaults guide explains when to leave it off, such as for Mod+C or Tab hotkeys you turn off to hand the key back to the browser. Devtools show always for these hotkeys.

    Registration views now have a status: 'active' when the hotkey is enabled and its scope is active, 'suspended' when its scope is inactive or suspended by an exclusive scope, and 'disabled' when it has enabled: false. To list only the hotkeys that are on, filter by status === 'active' instead of checking enabled and isScopeActive yourself.

    Each adapter has a new API that reads the hotkey manager's scope state and updates when scopes activate or release: useHotkeyScopesState in React, Preact, Vue, Ember, and Octane, createHotkeyScopesState in Solid and on Alpine's createHotkeysScope owner, injectHotkeyScopesState in Angular, getHotkeyScopesState in Svelte, and HotkeyScopesStateController in Lit.

Patch Changes

v0.16.0

Compare Source

Minor Changes
  • #​194 db47b22 - Ship TanStack Intent skills with each package, so coding agents use the library's own APIs instead of hand-written keydown listeners and wrappers. @tanstack/hotkeys includes hotkeys-core and app-hotkeys, and each framework package includes a skill for its bindings. List them with npx @tanstack/intent@latest list.
Patch Changes

v0.15.1

Compare Source

Patch Changes

v0.15.0

Compare Source

Minor Changes
  • #​189 dd1f39d - Types and functions now follow one naming rule: a hotkey is a chord or a sequence, a chord is keys pressed together, and a sequence is chords pressed one after another. A name with Hotkey alone accepts both kinds. Names for one kind say Chord or Sequence.

    Hotkey callbacks receive a context with the same chord and sequence shapes as registration views. A chord's callback gets { kind: 'chord', hotkey, parsedChord }. A sequence's callback gets { kind: 'sequence', hotkey, parsedSequence } with every step parsed. Before, a sequence's parsedHotkey held only its last step. The recorder's validate context is split the same way: { kind: 'chord', event, parsedChord } or { kind: 'sequence', events, parsedSequence }.

    useHotkey, HotkeyManager.register, the Lit @hotkey decorator, and the other APIs that take one hotkey type the context from the hotkey you pass, so a chord's callback can read parsedChord without a check. Callbacks in useHotkeys arrays, and callbacks typed HotkeyCallback, receive either shape. Check context.kind before reading parsedChord or parsedSequence. A one-step array such as ['Escape'] now gets chord options and chord context, which matches how it registers.

    Sequence steps can be chord objects as well as strings, such as [{ key: 'K', mod: true }, 'C']. The new RegisterableHotkeySequence type describes them. Registered sequences store each step as a string.

    Every step that advances a sequence now calls preventDefault, not only the last one. In ['Mod+K', 'Mod+C'], the browser no longer runs its own Ctrl+K on the first step. stopPropagation still applies only on the last step, so earlier steps reach other listeners. To let the browser act on every step, set preventDefault: false.

    A sequence's progress now clears when its timeout passes, and registration subscribers are notified. Before, progress cleared only on the next key press, so matchedStepCount could stay above 0 after the timeout.

    Renamed:

    • RawHotkey to RawHotkeyChord
    • ParsedHotkey to ParsedHotkeyChord
    • SingleModifierHotkey, TwoModifierHotkey, ThreeModifierHotkey, and FourModifierHotkey to SingleModifierHotkeyChord, TwoModifierHotkeyChord, ThreeModifierHotkeyChord, and FourModifierHotkeyChord
    • parsedHotkey to parsedChord on chord registration views, callback contexts, and recorder validation contexts
    • createHotkeyHandler to createHotkeyChordHandler, createMultiHotkeyHandler to createMultiHotkeyChordHandler, MultiHotkeyHandler to MultiHotkeyChordHandler, and CreateHotkeyHandlerOptions to CreateHotkeyChordHandlerOptions

    Merged:

    • parseHotkey parses chord strings, chord objects, and sequences. It replaces parseRegisterableHotkey and rawHotkeyToParsedHotkey.
    • normalizeHotkey normalizes chord strings, chord objects, parsed chords, and sequences. It replaces normalizeRegisterableHotkey and normalizeHotkeyFromParsed. Replace normalizeHotkeyFromEvent(event) with normalizeHotkey(parseKeyboardEvent(event)).
    • formatHotkey also formats a parsed sequence, returning one string per step.
  • #​189 dd1f39d - Add hotkey scopes, which turn groups of hotkeys on and off together, such as everything in a dialog.

    • Every hotkey belongs to a scope. The default scope, 'global', is always active. Pass scope to a hotkey to put it in another scope.
    • HotkeyManager.activateScope(scope, options) activates a scope until you call the function it returns. When hotkeys in two active scopes match the same key, a nested scope beats the scopes around it, and otherwise the most recently activated scope wins.
    • An exclusive scope suspends every other scope, including 'global', while it's active. Pass exclusive: { allow: ['global'] } to keep some scopes working.
    • HotkeyManager.scopes publishes which scopes are active, suspended, allowed, and exclusive. isScopeActive(scope) reports whether a scope's hotkeys can fire.
    • In React, Preact, Solid, Vue, Svelte, and Octane, HotkeysProvider takes scope, exclusive, and enabled. Hotkeys registered inside a scoped provider belong to its scope, which is active while the provider is mounted and enabled. Vue's provideHotkeysContext and Svelte's setHotkeysContext take the same options. In Angular, pass them to provideHotkeys in a component's providers.
    • In Lit, Alpine, and Ember, activate scopes with the hotkey manager, and pass scope to the hotkeys that belong to them.
    • App hotkeys can declare a scope. App hotkeys in different scopes can share a hotkey without a conflict. The app hotkey list reports 'suspended' for an app hotkey whose enabled registrations are all in inactive scopes.
    • Devtools group registrations by scope and show which scopes are active, suspended, allowed, or exclusive.
Patch Changes

v0.14.5

Compare Source

Patch Changes

v0.14.4

Compare Source

Patch Changes

v0.14.3

Compare Source

Patch Changes

v0.14.2

Compare Source

Patch Changes

v0.14.1

Compare Source

Patch Changes

v0.14.0

Compare Source

Minor Changes
  • #​175 a71180e - Hotkeys now include sequences everywhere, and app hotkeys can be declared up front and customized by users.

    • A hotkey is a chord ('Mod+S') or a sequence (['G', 'G']). Every adapter's hotkey and hotkeys APIs, HotkeyManager.register, formatForDisplay, areHotkeysEqual, validateHotkey, and hints accept both. A one-step sequence is its chord. Chords accept requireReset; sequences accept timeout, enforced by types.
    • Every adapter's recorder records sequences with maxSteps (default 1).
    • defineAppHotkeys declares every app hotkey. Pass them to the adapter's provider as appHotkeys, with optional customHotkeys and onCustomHotkeysChange to persist user changes. Each adapter can read and change them through its app hotkeys, app hotkey list, and custom hotkeys APIs (for example, React's useAppHotkeys, useAppHotkeyList, and useCustomHotkeys). Lit, Alpine, and Ember, which have no provider, use provideAppHotkeys. Devtools list declared hotkeys that are not registered.

    Breaking changes (React names shown; other adapters follow their own naming, such as createHotkey, injectHotkey, or HotkeyController):

    Before After
    Hotkey (one chord) HotkeyChord; Hotkey is now a chord or a sequence
    SequenceManager, getSequenceManager() HotkeyManager, getHotkeyManager()
    useHotkeySequence(sequence, cb, options) useHotkey(sequence, cb, options)
    useHotkeySequences([{ sequence, callback }]) useHotkeys([{ hotkey: sequence, callback }])
    useHotkeySequenceRecorder(options), HotkeySequenceRecorder useHotkeyRecorder({ maxSteps, ...options }), HotkeyRecorder
    Lit @hotkeySequence, HotkeySequenceController @hotkey, HotkeyController
    Lit HotkeySequenceRecorderController HotkeyRecorderController with maxSteps
    useHotkeyRegistrations() → { hotkeys, sequences } One list of chords and sequences; narrow with kind
    SequenceRegistrationView.sequence HotkeySequenceRegistrationView.hotkey
    HotkeyConflict.type HotkeyConflict.registration.kind
    Sequence callback context.hotkey ('G G') context.hotkey (['G', 'G'])
    defaultOptions.hotkeySequence, defaultOptions.hotkeySequenceRecorder defaultOptions.hotkey, defaultOptions.hotkeyRecorder
    Vue provideHotkeysContext(defaultOptions) provideHotkeysContext({ defaultOptions, appHotkeys, ... })
    Svelte setHotkeysContext(defaultOptions) setHotkeysContext({ defaultOptions, appHotkeys, ... })
    Angular provideHotkeys(defaultOptions) provideHotkeys({ defaultOptions, appHotkeys, ... })
    HotkeyDefinition (core) Each adapter's definition type, such as UseHotkeyDefinition
    createHotkeySequenceBindings (adapter) createHotkeyBindings
    formatHotkeySequence, formatWithLabels formatForDisplay
    SequenceManager.resetAll() HotkeyManager.resetSequenceProgress()
Patch Changes

v0.13.0

Compare Source

Minor Changes
  • #​165 2ebcecf - Add Alpine, Ember, and Octane adapters with framework-native lifecycle management, scoped defaults, and shared registration reconciliation.

    Support reactive option getters and live recorder options. Follow replacement provider defaults in Solid and Vue, track getters in Ember definitions, and refresh Lit registrations and scoped targets after host updates.

    Add Ember onHotkey and onHotkeys modifiers for element-scoped shortcuts with reactive options and automatic cleanup.

    Add Angular and Svelte Hotkeys devtools integrations with development-only defaults and explicit production exports.

    Update compatible dependencies and release all Hotkeys adapters and devtools packages together as minor versions.

Patch Changes

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
domainstack Error Error Nov 8, 2026 11:19am UTC

Request Review

@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.15%. Comparing base (a411ea9) to head (d840fa6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #549   +/-   ##
=======================================
  Coverage   73.15%   73.15%           
=======================================
  Files         225      225           
  Lines        5227     5227           
  Branches     1492     1492           
=======================================
  Hits         3824     3824           
  Misses        951      951           
  Partials      452      452           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate
renovate Bot force-pushed the renovate/tanstack-react-hotkeys-0.x branch from d840fa6 to 57139f7 Compare October 18, 2026 00:33
@renovate renovate Bot changed the title fix(deps): update dependency @tanstack/react-hotkeys to ^0.13.0 fix(deps): update dependency @tanstack/react-hotkeys to ^0.14.0 Oct 18, 2026
@renovate
renovate Bot force-pushed the renovate/tanstack-react-hotkeys-0.x branch from 57139f7 to c983dec Compare October 18, 2026 17:23
@renovate renovate Bot changed the title fix(deps): update dependency @tanstack/react-hotkeys to ^0.14.0 fix(deps): update dependency @tanstack/react-hotkeys to ^0.14.1 Oct 18, 2026
@renovate
renovate Bot force-pushed the renovate/tanstack-react-hotkeys-0.x branch from c983dec to 4777e4b Compare October 18, 2026 22:02
@renovate renovate Bot changed the title fix(deps): update dependency @tanstack/react-hotkeys to ^0.14.1 fix(deps): update dependency @tanstack/react-hotkeys to ^0.14.3 Oct 18, 2026
@renovate
renovate Bot force-pushed the renovate/tanstack-react-hotkeys-0.x branch from 4777e4b to c26b8f5 Compare November 8, 2026 11:03
@renovate renovate Bot changed the title fix(deps): update dependency @tanstack/react-hotkeys to ^0.14.3 fix(deps): update dependency @tanstack/react-hotkeys to ^0.22.0 Nov 8, 2026

This branch had an error being deployed

1 failed deployment
Preview — c26b8f51 Deployed Nov 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants