You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the fix for #40, some keys still don't get through, for example the German ä. I tracked it down to all keys which are in the _KEYCODE_MAP and different from the US layout. The ä key has keycode 222, which is ' on US keyboards, so that's what the library maps it to due to characterFromEvent(...) using event.which before accessing event.key.
I believe _KEYCODE_MAP should no longer be necessary and now does more harm than good, since event.key properly handles all special character transformations in a layout-aware fashion. There may be some edge cases I have missed, though.
Expected behavior:
Registering this shortcut should work when pressing the "ä" key on a German keyboard:
{key: "ä",command: ()=>alert('test')}
Desktop (please complete the following information):
OS: Windows 10
Browser: Firefox 71
Version: 8.2.0
The text was updated successfully, but these errors were encountered:
Describe the bug
After the fix for #40, some keys still don't get through, for example the German
ä
. I tracked it down to all keys which are in the_KEYCODE_MAP
and different from the US layout. Theä
key has keycode 222, which is'
on US keyboards, so that's what the library maps it to due to characterFromEvent(...) using event.which before accessing event.key.I believe
_KEYCODE_MAP
should no longer be necessary and now does more harm than good, sinceevent.key
properly handles all special character transformations in a layout-aware fashion. There may be some edge cases I have missed, though.Expected behavior:
Registering this shortcut should work when pressing the "ä" key on a German keyboard:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: