I shipped a rather large update to TanStack Hotkeys yesterday, which adds much better physical key support options, instead of mostly relying on event.key with only event.code fallbacks like before.
This was an overdue correction that was needed!
The string templates still use event.key matching by default, but now, if you want to force a physical key check, you can just use `[]` around a physical key code, like the screenshot down below.
Hotkey recording now defaults to physical key recording in order to fix multiple bugs across different layouts. This is configurable.
From my testing, if you define hotkeys with our initial event.key string templates, you should actually have a pretty safe setup already. It's really the custom hotkey recording features that add a lot of complexity and bugs, and now I think we're closer to addressing those issues with this latest update.
Would love people to try this out and help report remaining issues with TanStack Hotkeys before we move to beta.
It's been a while since I talked about TanStack Hotkeys, but I'm considering several major rewrites of the library.
I'm working on a new Hotkey UX system at a new job and have run into several new limitations.
TanStack Hotkeys is an alpha, so breaking changes wouldn't be surprising, but man... we're already nearing 700k downloads per week... Maybe we should just alpha tag new releases for a while IDK.