Repository navigation
fix(deps): update dependency @tanstack/react-hotkeys to ^0.22.0 - #549
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
renovate
Bot
force-pushed
the
renovate/tanstack-react-hotkeys-0.x
branch
from
October 18, 2026 00:33
d840fa6 to
57139f7
Compare
renovate
Bot
force-pushed
the
renovate/tanstack-react-hotkeys-0.x
branch
from
October 18, 2026 17:23
57139f7 to
c983dec
Compare
renovate
Bot
force-pushed
the
renovate/tanstack-react-hotkeys-0.x
branch
from
October 18, 2026 22:02
c983dec to
4777e4b
Compare
renovate
Bot
force-pushed
the
renovate/tanstack-react-hotkeys-0.x
branch
from
November 8, 2026 11:03
4777e4b to
c26b8f5
Compare
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.12.1→^0.22.0Release Notes
TanStack/hotkeys (@tanstack/react-hotkeys)
v0.22.0Compare Source
Minor Changes
#225
b5e429a- Run element-target hotkeys after the framework's own key handlers in React, Svelte, Solid, and Octane. AnonKeyDownhandler 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 defaultstopPropagationkept the key from those handlers.These adapters set the new
afterDelegatedHandlersoption, 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 anonKeyDownhandler also skips document hotkeys, even when the hotkey registered before the first component that usesonKeyDownloaded.Patch Changes
b5e429a,d3adb24,d3adb24,d3adb24,d3adb24,04c7445]:v0.21.0Compare 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'sUser-Agentheader.null, as from a missing header, works like no argument. A newHotkeyPlatformtype names the result.detectPlatform()returns'linux'on Node, Deno, Bun, and Cloudflare Workers instead of the server's own OS.defaultOptions.platform, which is also the default platform for their hotkeys and recorders.useFormatForDisplay(React, Preact, Octane, Vue, Ember),createFormatForDisplay(Solid),getFormatForDisplay(Svelte), andinjectFormatForDisplay(Angular).provideHotkeysacceptsdefaultOptionsas a getter that runs in the injection context, so it can read the request withinject(REQUEST).Patch Changes
5bf96b6]:v0.20.2Compare Source
Patch Changes
93b8b5e-useHotkeyRecorderreturns the same action functions on every render, so memoized children and effects that depend on them no longer re-run.93b8b5e]:v0.20.1Compare Source
Patch Changes
a080a84]:v0.20.0Compare Source
Minor Changes
#214
a179ef6- Hotkey hooks and functions in every adapter acceptundefinedandnullas the hotkey, for components with an optional shortcut. No hotkey registers nothing, and its hint isfalse. When a hotkey changes toundefinedornull, 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?? [].hotkeyis nullish.''or{ key: '' }, also registers nothing, so clearing a hotkey to''removes its registration. Before, an empty hotkey registered and fired onkeydownevents with no key, such as those some autofill tools send.HotkeyManager.registerstill requires a hotkey. It throws a clear error forundefined,null, or an empty hotkey, as it already did for an empty sequence.hasActiveRegistrationandmatchesHeldModifiersreturnfalsefor no hotkey.@hotkeydecorator still needs a hotkey, because it is set when the class is defined.#214
a179ef6- An option set toundefinednow keeps its default, the same as leaving it out. Before, a wrapper component that forwarded unset props, such aspreventDefault: props.preventDefault, turned offpreventDefaultandstopPropagation, soMod+Salso opened the browser's Save dialog.eventType: undefinedmade a hotkey never fire, andscope: undefinedmoved a hotkey out of its provider's scope.register, provider defaults,createHotkeysScopedefaults in Alpine and Ember, and recorder options merged with provider defaults.setOptions,undefinedresets an option to its default, or removes it when it has no default.Behavior changes:
nulltarget registers nothing, like a ref that is still empty. Before, it listened ondocument. To listen ondocument, leave outtarget.prepareHotkeyDefinitionsin@tanstack/hotkeys/adapterdoes the same when noresolveTargetis given, which also applies to Svelte. Vue, Solid, Angular, Lit, Alpine, Ember, and Octane already skipped anulltarget.Patch Changes
#214
a179ef6-HotkeysProvidernow applies a changedcustomHotkeysprop. 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.customHotkeyschanges, it replaces the current custom hotkeys without callingonCustomHotkeysChange. The prop is compared by value, so passing equal data again, such asJSON.parse(localStorage.getItem('hotkeys'))on every render, keeps changes the user made since.undefinedleaves the custom hotkeys unchanged, such as while saved data loads, andnullclears them, such as on sign-out.AppHotkeysStore.setOptionsacceptscustomHotkeyswith the same behavior. Lit, Alpine, and Ember apps can call it on the store thatprovideAppHotkeysreturns when saved data loads later.provideHotkeysacceptscustomHotkeysas a signal or function. In Vue,provideHotkeysContextaccepts it as a ref or getter.Updated dependencies [
a179ef6,a179ef6,a179ef6]:v0.19.0Compare 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.escape,Esc,f1,Plus, orpgdn, 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 asCtrl,Cmd, andOptionstill work.validateHotkeyandcheckHotkeywarn about keys that aren't written like a known key, such asescape, instead of checking a list of key names. In development, registering such a hotkey logs a warning that it may never fire.formatForDisplayaccepts hotkeys only, including single keys and modifiers on their own such as'Shift', instead of any string. Pass a key from aKeyboardEvent, such as a held key fromuseHeldKeys, as{ key }.HotkeyManager.triggerRegistrationmoves into the devtools package, which was its only user.Object.prototype, such astoString. Previously, saved custom hotkeys could keep those ids, andformatForDisplaycould show function source text for them.#211
8b93ed5- TanStack Hotkeys no longer depends on@tanstack/storeor the framework store adapters. Its stores, such asmanager.registrationsandrecorder.store, keep the samestate,get,setState, andsubscribeAPI 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
Storeinstances from@tanstack/store, soinstanceof Storechecks and other TanStack Store features, such asactions, no longer apply to them.#211
8b93ed5- Providers no longer bundle app hotkey support unless the app usesdefineAppHotkeys. A React app withHotkeysProviderand no app hotkeys is about 1 kB smaller (brotli).Patch Changes
8b93ed5,8b93ed5,8b93ed5,8b93ed5]:v0.18.0Compare Source
Minor Changes
#204
5053876- The hooks andHotkeysProviderare now marked'use client', so a React Server Component such as a Next.jsapp/layout.tsxcan renderHotkeysProviderwithout a wrapper. Before, the Next.js build failed withcreateContext is not a function. Server components can still import helpers such asformatForDisplayfrom the package.Both packages now require React 18 or newer. The old
>=16.8range admitted React 16.8 to 16.13, which can't build the package because@tanstack/react-storeimportsreact/jsx-runtime.Patch Changes
132e0c9,ebd7e84,d43b9aa]:v0.17.0Compare Source
Minor Changes
#199
431094a- Hotkey hints now show only for hotkeys that can fire.useHotkeyHintand the other adapters' hint helpers returnfalseunless 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 withenabled: 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, callmatchesHeldModifiers, which still checks only held keys. The newHotkeyManager.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 disabledMod+Sno 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'astrue. 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 forMod+CorTabhotkeys you turn off to hand the key back to the browser. Devtools showalwaysfor 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 hasenabled: false. To list only the hotkeys that are on, filter bystatus === 'active'instead of checkingenabledandisScopeActiveyourself.Each adapter has a new API that reads the hotkey manager's scope state and updates when scopes activate or release:
useHotkeyScopesStatein React, Preact, Vue, Ember, and Octane,createHotkeyScopesStatein Solid and on Alpine'screateHotkeysScopeowner,injectHotkeyScopesStatein Angular,getHotkeyScopesStatein Svelte, andHotkeyScopesStateControllerin Lit.Patch Changes
431094a]:v0.16.0Compare Source
Minor Changes
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/hotkeysincludeshotkeys-coreandapp-hotkeys, and each framework package includes a skill for its bindings. List them withnpx @tanstack/intent@latest list.Patch Changes
db47b22]:v0.15.1Compare Source
Patch Changes
daecd95]:v0.15.0Compare 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 withHotkeyalone accepts both kinds. Names for one kind sayChordorSequence.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'sparsedHotkeyheld only its last step. The recorder'svalidatecontext is split the same way:{ kind: 'chord', event, parsedChord }or{ kind: 'sequence', events, parsedSequence }.useHotkey,HotkeyManager.register, the Lit@hotkeydecorator, and the other APIs that take one hotkey type the context from the hotkey you pass, so a chord's callback can readparsedChordwithout a check. Callbacks inuseHotkeysarrays, and callbacks typedHotkeyCallback, receive either shape. Checkcontext.kindbefore readingparsedChordorparsedSequence. 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 newRegisterableHotkeySequencetype 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 ownCtrl+Kon the first step.stopPropagationstill applies only on the last step, so earlier steps reach other listeners. To let the browser act on every step, setpreventDefault: 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
matchedStepCountcould stay above 0 after the timeout.Renamed:
RawHotkeytoRawHotkeyChordParsedHotkeytoParsedHotkeyChordSingleModifierHotkey,TwoModifierHotkey,ThreeModifierHotkey, andFourModifierHotkeytoSingleModifierHotkeyChord,TwoModifierHotkeyChord,ThreeModifierHotkeyChord, andFourModifierHotkeyChordparsedHotkeytoparsedChordon chord registration views, callback contexts, and recorder validation contextscreateHotkeyHandlertocreateHotkeyChordHandler,createMultiHotkeyHandlertocreateMultiHotkeyChordHandler,MultiHotkeyHandlertoMultiHotkeyChordHandler, andCreateHotkeyHandlerOptionstoCreateHotkeyChordHandlerOptionsMerged:
parseHotkeyparses chord strings, chord objects, and sequences. It replacesparseRegisterableHotkeyandrawHotkeyToParsedHotkey.normalizeHotkeynormalizes chord strings, chord objects, parsed chords, and sequences. It replacesnormalizeRegisterableHotkeyandnormalizeHotkeyFromParsed. ReplacenormalizeHotkeyFromEvent(event)withnormalizeHotkey(parseKeyboardEvent(event)).formatHotkeyalso 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.'global', is always active. Passscopeto 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.'global', while it's active. Passexclusive: { allow: ['global'] }to keep some scopes working.HotkeyManager.scopespublishes which scopes are active, suspended, allowed, and exclusive.isScopeActive(scope)reports whether a scope's hotkeys can fire.HotkeysProvidertakesscope,exclusive, andenabled. Hotkeys registered inside a scoped provider belong to its scope, which is active while the provider is mounted and enabled. Vue'sprovideHotkeysContextand Svelte'ssetHotkeysContexttake the same options. In Angular, pass them toprovideHotkeysin a component'sproviders.scopeto the hotkeys that belong to them.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.Patch Changes
dd1f39d,dd1f39d]:v0.14.5Compare Source
Patch Changes
f5a9816]:v0.14.4Compare Source
Patch Changes
d7a7e81]:v0.14.3Compare Source
Patch Changes
a9b29f5,f8f02f0]:v0.14.2Compare Source
Patch Changes
c2ee2e4,3b7c92f]:v0.14.1Compare Source
Patch Changes
575dc91]:v0.14.0Compare Source
Minor Changes
#175
a71180e- Hotkeys now include sequences everywhere, and app hotkeys can be declared up front and customized by users.'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 acceptrequireReset; sequences accepttimeout, enforced by types.maxSteps(default 1).defineAppHotkeysdeclares every app hotkey. Pass them to the adapter's provider asappHotkeys, with optionalcustomHotkeysandonCustomHotkeysChangeto persist user changes. Each adapter can read and change them through its app hotkeys, app hotkey list, and custom hotkeys APIs (for example, React'suseAppHotkeys,useAppHotkeyList, anduseCustomHotkeys). Lit, Alpine, and Ember, which have no provider, useprovideAppHotkeys. Devtools list declared hotkeys that are not registered.Breaking changes (React names shown; other adapters follow their own naming, such as
createHotkey,injectHotkey, orHotkeyController):Hotkey(one chord)HotkeyChord;Hotkeyis now a chord or a sequenceSequenceManager,getSequenceManager()HotkeyManager,getHotkeyManager()useHotkeySequence(sequence, cb, options)useHotkey(sequence, cb, options)useHotkeySequences([{ sequence, callback }])useHotkeys([{ hotkey: sequence, callback }])useHotkeySequenceRecorder(options),HotkeySequenceRecorderuseHotkeyRecorder({ maxSteps, ...options }),HotkeyRecorder@hotkeySequence,HotkeySequenceController@hotkey,HotkeyControllerHotkeySequenceRecorderControllerHotkeyRecorderControllerwithmaxStepsuseHotkeyRegistrations()→{ hotkeys, sequences }kindSequenceRegistrationView.sequenceHotkeySequenceRegistrationView.hotkeyHotkeyConflict.typeHotkeyConflict.registration.kindcontext.hotkey('G G')context.hotkey(['G', 'G'])defaultOptions.hotkeySequence,defaultOptions.hotkeySequenceRecorderdefaultOptions.hotkey,defaultOptions.hotkeyRecorderprovideHotkeysContext(defaultOptions)provideHotkeysContext({ defaultOptions, appHotkeys, ... })setHotkeysContext(defaultOptions)setHotkeysContext({ defaultOptions, appHotkeys, ... })provideHotkeys(defaultOptions)provideHotkeys({ defaultOptions, appHotkeys, ... })HotkeyDefinition(core)UseHotkeyDefinitioncreateHotkeySequenceBindings(adapter)createHotkeyBindingsformatHotkeySequence,formatWithLabelsformatForDisplaySequenceManager.resetAll()HotkeyManager.resetSequenceProgress()Patch Changes
a71180e]:v0.13.0Compare 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
onHotkeyandonHotkeysmodifiers 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
2ebcecf]:Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.