Open zevisert opened 2 years ago
Hmm, I wonder how other apps/games handle this since in the settings panel the key name is shown (instead of key code). I'm not aware of a browser feature to map key codes back to key names (which would depend on the keyboard layout).
What are your thoughts on this?
I'm not aware of a browser feature to map key codes back to key names (which would depend on the keyboard layout).
I'm not super familiar actually, but I know there is Keyboard.getLayoutMap()
, and this reference code values page.
The other thing I saw recently that is kind of a good intro to how hard this is to get right is the latest HTTP 203 episode, if you're into video format.
Overall, there's a LOT to consider when it comes to input - I wouldn't expect every edge case to be handled, I just wanted to bring up the fact that movement is spread all over the keyboard for me.
Describe the bug Non query keyboard layouts don't use keys in
wasd
position for movementTo Reproduce Steps to reproduce the behavior:
wasd
, where ever they are on the keyboard.Expected behavior I think most people would assume that
wars
on colemak or,aoe
on dvorak would be used for movementDesktop (please complete the following information):
Additional context I bet this could be solved by using keydown
event.code
instead ofevent.key
(docs) for movement.