Repository navigation
Replies: 4 comments 5 replies
|
My original goal for this library was to use event.key as much as possible, but we might have to continue to step back from that. |
|
This shipped in #151, released in Dvorak, Colemak, and AZERTY still match by the letter typed. If you want a hotkey to follow the key's position on every layout, use a physical binding: useHotkey('Mod+[KeyZ]', undo) |
|
@azureitte This hotkeys library has added many features to make it work better in international layouts. Curious if you've tried it yet? |
|
Hi! Yes, I'm still using TanStack hotkeys in my projects and appreciate the changes a lot. The current behavior is spot on to what I had in mind, thanks for taking your time to improve the library! :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi! I'm a multilingual user and have noticed that the hotkey system in your library is designed mostly with the English keyboard layouts in mind.
Here's an example: I have some code in my React app configuring the undo/redo shortcuts:
When I switch my keyboard layout to English (
en-US), the code works just fine and the hotkeys trigger. However, when I switch my keyboard layout to Russian (ru-RU) or Ukrainian (uk-UA), the hotkeys stop working. My guess is that the system is listening for thekeyproperty of the KeyboardEvent (which would return "я" instead of "z" when using those layouts), instead ofcode(which is always "KeyZ", regardless of layout).I'm not sure if the library plans to support international layouts, but it would be nice to at least have an extra option added to the hook. Would love to hear what y'all think! ^^
-- azureitte
All reactions