Skip to content

ref(hotkeys): Use TanStack Hotkeys and add devtools - #129176

Merged
TkDodo merged 10 commits into
masterfrom
tkdodo/ref/tanstack-hotkeys
Oct 30, 2026
Merged

TkDodo merged 10 commits into
masterfrom
tkdodo/ref/tanstack-hotkeys

Conversation

@TkDodo

@TkDodo TkDodo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Migrate our manual hotkey implementation to TanStack HotKeys

This removes a ton of wiring we’re doing ourselves now while at the same time, giving us better support for international keyboard layouts.

For example, on a QWERTZ keyboard layout (which I’m using), it’s not possible to open story search because there is no / key. This works now with TanStack HotKeys. There’s also devtools.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 29, 2026
@TkDodo

TkDodo commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit bb4ab61. Configure here.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-ifhsog6fv.sentry.dev

@TkDodo
TkDodo marked this pull request as ready for review October 30, 2026 09:35
@TkDodo
TkDodo requested review from a team as code owners October 30, 2026 09:35
includeInputs: true,
: (
[
'Mod+/', // QWERTY (US, UK, most CJK, RTL scripts)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On AZERTY keyboards, Cmd++ now matches Mod+/, opening Seer and blocking browser zoom. Should we preserve the previous guard and restore the regression test?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure which guard or regression test you are referring to? I don’t think this PR removes any behaviour that was there before

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the guard in

// Without shift, a differing ASCII event.key means a different layout
// maps this physical key to another character (e.g. AZERTY '+' on
// physical Slash) and we must NOT match.
if (event.shiftKey) {
return true;
}

in this PR, we are also removing this assertion

it('does not match mod+/ on AZERTY when user presses Cmd++ (physical Slash key)', () => {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check back if TanStack covers these cases

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@priscilawebdev thanks for this 🙏

I’ve brought back the possibility to zoom for our french users here:d37d935

But I’ve also reported this upstream because I think (hope) that TanStack HotKeys would handle this for us

@priscilawebdev priscilawebdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@TkDodo
TkDodo merged commit 5cd4d89 into master Oct 30, 2026
83 checks passed
@TkDodo
TkDodo deleted the tkdodo/ref/tanstack-hotkeys branch October 30, 2026 11:22

This branch was successfully deployed

1 active deployment
Preview — 34667efe Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants