+, _, ;, Mod++, and a few other combo keys are unsupported
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 719
- Forks
- 47
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 1
Description
TanStack Hotkeys version
v0.1.3
Framework/Library version
React v18.3.1
Describe the bug and the steps to reproduce it
// these work
useHotkey("=", () => {});
useHotkey("-", () => {});
// none of these work
useHotkey("+", () => {});
useHotkey("Mod++", () => {});
useHotkey("Mod+Shift+=", () => {});
useHotkey("_", () => {});
useHotkey("Mod+_", () => {});
useHotkey("Mod+Shift+-", () => {});
It should be possible to register these, although I assume Mod++ will prove tricky since + is used in the template literal types for chaining. But Mod+Shift+= does not work either.
We would like to use Mod+Shift+= and Mod+Shift+- in our code base.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
Maybe, I'll investigate and start debugging
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox and trace useHotkey through the RegisterableHotkey type and registration path. Check how literal combinations containing +, _, and shifted symbols are parsed and accepted. Done means the reported examples compile and register their corresponding shortcuts, including Mod+Shift+= and Mod+Shift+-.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100