TanStack Hotkeys version
0.1.0
Framework/Library version
React v19
Describe the bug and the steps to reproduce it
Hi!
Thanks a lot for this library, I was quite unhappy with react-hotkeys-hook. The issue that I am having is that by also matching the hotkey on the event.code, with a different keyboard layout (I'm in Dvorak myself), the hotkey will be triggered on two keys: the layout-produced key, and the hardware key, which is not an expected and wanted behavior.
I agree with the behavior of matching the code for digits and characters with modifiers (like on MacOS), but I think this should be opt-in for some hotkeys as the normal behavior of matching a simple key like useHotkey("C", ...) will produce weird results on lot of users.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/edit/bolt-vite-react-z3br3ops?file=src%2FApp.tsx
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
Yes, I think I know how to fix it and will discuss it in the comments of this issue
Terms & Code of Conduct