Skip to content

feat: Unify hotkeys and sequences, and add app hotkeys - #175

Merged
KevinVandy merged 7 commits into
mainfrom
feat/unified-hotkeys-app-hotkeys
Oct 14, 2026
Merged

KevinVandy merged 7 commits into
mainfrom
feat/unified-hotkeys-app-hotkeys

Conversation

@KevinVandy

@KevinVandy KevinVandy commented Oct 14, 2026 •

Copy link
Copy Markdown
Member
  • A hotkey is now a chord ('Mod+S') or a sequence (['G', 'G']). HotkeyManager.register, every adapter's hotkey and hotkeys APIs, formatForDisplay, areHotkeysEqual, validateHotkey, and hints accept both. Types allow requireReset only for chords and timeout only for sequences. A one-step array is treated as its chord.
  • SequenceManager and the separate sequence hooks, primitives, controllers, and recorders are removed. HotkeyRecorder records sequences with maxSteps and replaces commitOnEnter with commitKeys.
  • New defineAppHotkeys and AppHotkeysStore. Pass declarations to a provider as appHotkeys, with optional customHotkeys and onCustomHotkeysChange. Each adapter adds app hotkeys, app hotkey list, and custom hotkeys APIs for cheat sheets and rebinding, and setting a custom hotkey checks for conflicts. Lit, Alpine, and Ember have no provider and use provideAppHotkeys.
  • Vue provideHotkeysContext, Svelte setHotkeysContext, and Angular provideHotkeys now take an options object. Devtools show one registration list with sequence progress, plus declared app hotkeys that aren't registered.
  • Lit's HotkeyController accepts a getter for the hotkey and its options, so recorded bindings, scoped targets, and enabled update after each host update. The Lit examples use controllers instead of calling getHotkeyManager() directly; only the recorder examples, which register a changing list of shortcuts, still use the manager.
  • Every framework's examples and docs are updated: sequence examples are renamed (useHotkey-sequences, etc.), example READMEs are removed, guides are rewritten with a new App Hotkeys guide, the TypeDoc reference is regenerated, and docs/config.json is restructured.

Notes

The changeset bumps every package a minor version and includes a breaking-changes table. Ember's test:lib needs Chrome, so locally I ran its 14 tests in Playwright's Chromium; everything else passed pnpm test:ci.

Hotkey APIs accept chords and sequences, the recorder records sequences
with maxSteps, and app hotkeys are declared with defineAppHotkeys and
customized through each adapter's provider.
@KevinVandy
KevinVandy requested a review from a team as a code owner October 14, 2026 15:00
@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 74d73d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@tanstack/hotkeys Minor
@tanstack/hotkeys-devtools Minor
@tanstack/react-hotkeys Minor
@tanstack/preact-hotkeys Minor
@tanstack/solid-hotkeys Minor
@tanstack/vue-hotkeys Minor
@tanstack/svelte-hotkeys Minor
@tanstack/angular-hotkeys Minor
@tanstack/lit-hotkeys Minor
@tanstack/alpine-hotkeys Minor
@tanstack/ember-hotkeys Minor
@tanstack/octane-hotkeys Minor
@tanstack/solid-hotkeys-devtools Patch
@tanstack/angular-hotkeys-devtools Patch
@tanstack/preact-hotkeys-devtools Patch
@tanstack/react-hotkeys-devtools Patch
@tanstack/svelte-hotkeys-devtools Patch
@tanstack/vue-hotkeys-devtools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

13 package(s) bumped directly, 5 bumped as dependents.

🟥 Major bumps

Package Version Reason
@tanstack/hotkeys-devtools 1.2.0 → 2.0.0 Changeset

🟨 Minor bumps

Package Version Reason
@tanstack/alpine-hotkeys 0.2.0 → 0.3.0 Changeset
@tanstack/angular-hotkeys 0.13.0 → 0.14.0 Changeset
@tanstack/ember-hotkeys 0.2.0 → 0.3.0 Changeset
@tanstack/hotkeys 0.11.0 → 0.12.0 Changeset
@tanstack/lit-hotkeys 0.14.0 → 0.15.0 Changeset
@tanstack/octane-hotkeys 0.3.0 → 0.4.0 Changeset
@tanstack/preact-hotkeys 0.13.1 → 0.14.0 Changeset
@tanstack/react-hotkeys 0.13.0 → 0.14.0 Changeset
@tanstack/solid-hotkeys 0.13.0 → 0.14.0 Changeset
@tanstack/svelte-hotkeys 0.13.0 → 0.14.0 Changeset
@tanstack/vue-hotkeys 0.13.0 → 0.14.0 Changeset

🟩 Patch bumps

Package Version Reason
@tanstack/solid-hotkeys-devtools 0.10.0 → 0.10.1 Changeset
@tanstack/angular-hotkeys-devtools 0.2.0 → 0.2.1 Dependent
@tanstack/preact-hotkeys-devtools 0.10.0 → 0.10.1 Dependent
@tanstack/react-hotkeys-devtools 0.10.0 → 0.10.1 Dependent
@tanstack/svelte-hotkeys-devtools 0.2.0 → 0.2.1 Dependent
@tanstack/vue-hotkeys-devtools 0.10.0 → 0.10.1 Dependent

@pkg-pr-new

pkg-pr-new Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/alpine-hotkeys

npm i https://pkg.pr.new/@tanstack/alpine-hotkeys@175

@tanstack/angular-hotkeys

npm i https://pkg.pr.new/@tanstack/angular-hotkeys@175

@tanstack/angular-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/angular-hotkeys-devtools@175

@tanstack/ember-hotkeys

npm i https://pkg.pr.new/@tanstack/ember-hotkeys@175

@tanstack/hotkeys

npm i https://pkg.pr.new/@tanstack/hotkeys@175

@tanstack/hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/hotkeys-devtools@175

@tanstack/lit-hotkeys

npm i https://pkg.pr.new/@tanstack/lit-hotkeys@175

@tanstack/octane-hotkeys

npm i https://pkg.pr.new/@tanstack/octane-hotkeys@175

@tanstack/preact-hotkeys

npm i https://pkg.pr.new/@tanstack/preact-hotkeys@175

@tanstack/preact-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/preact-hotkeys-devtools@175

@tanstack/react-hotkeys

npm i https://pkg.pr.new/@tanstack/react-hotkeys@175

@tanstack/react-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/react-hotkeys-devtools@175

@tanstack/solid-hotkeys

npm i https://pkg.pr.new/@tanstack/solid-hotkeys@175

@tanstack/solid-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/solid-hotkeys-devtools@175

@tanstack/svelte-hotkeys

npm i https://pkg.pr.new/@tanstack/svelte-hotkeys@175

@tanstack/svelte-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/svelte-hotkeys-devtools@175

@tanstack/vue-hotkeys

npm i https://pkg.pr.new/@tanstack/vue-hotkeys@175

@tanstack/vue-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/vue-hotkeys-devtools@175

commit: 74d73d4

autofix-ci Bot and others added 6 commits October 14, 2026 15:02
The hotkey and kitchen-sink examples registered with getHotkeyManager()
and managed handles by hand. They now use HotkeyController with option
getters for scoped targets, enabled state, requireReset, and timeouts.

HotkeyController also accepts a getter for the hotkey, so a recorded
binding re-registers after the host updates, as in Solid and Vue.
@KevinVandy
KevinVandy merged commit a71180e into main Oct 14, 2026
9 checks passed
@KevinVandy
KevinVandy deleted the feat/unified-hotkeys-app-hotkeys branch October 14, 2026 20:09
@github-actions github-actions Bot mentioned this pull request Oct 14, 2026
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.

2 participants