Skip to content

Comments

fix(hotkeys): add ? to supported punctuation keys#30

Open
MohammedALjaberi wants to merge 3 commits intoTanStack:mainfrom
MohammedALjaberi:fix-question-mark-key
Open

fix(hotkeys): add ? to supported punctuation keys#30
MohammedALjaberi wants to merge 3 commits intoTanStack:mainfrom
MohammedALjaberi:fix-question-mark-key

Conversation

@MohammedALjaberi
Copy link
Contributor

@MohammedALjaberi MohammedALjaberi commented Feb 19, 2026

Adds to PunctuationKey type and PUNCTUATION_KEYS constant, enabling for help shortcuts.

Fixes #19

🎯 Changes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Adds  to PunctuationKey type and PUNCTUATION_KEYS constant,
enabling  for help shortcuts.

Fixes TanStack#19
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 19, 2026

Open in StackBlitz

@tanstack/hotkeys

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

@tanstack/hotkeys-devtools

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

@tanstack/preact-hotkeys

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

@tanstack/preact-hotkeys-devtools

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

@tanstack/react-hotkeys

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

@tanstack/react-hotkeys-devtools

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

@tanstack/solid-hotkeys

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

@tanstack/solid-hotkeys-devtools

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

commit: a9d643e

@KevinVandy
Copy link
Member

Some punctuation on some/most layouts is "Shift affected". Like on most keyboards "/" is the question key when shift is pressed. So adding just "?" would add some duplication.

I'm thinking more and more about having punctuation go through some kind of event.code map to actually fix issues like this.

@MohammedALjaberi
Copy link
Contributor Author

Some punctuation on some/most layouts is "Shift affected". Like on most keyboards "/" is the question key when shift is pressed. So adding just "?" would add some duplication.

I'm thinking more and more about having punctuation go through some kind of event.code map to actually fix issues like this.

@KevinVandy I’ve updated the PR to use an event.code map for punctuation instead of adding ? as its own key: the matcher falls back to the code map when event.key doesn’t match (e.g. Shift+/?), and the parser normalizes shifted punctuation (e.g. Mod+?Mod+Shift+/). So Mod+? works without listing ? separately.

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.

Mod+? / ? missing

2 participants