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
When you receive a key event, you receive two values, the event.code (KeyA) and the event.key (A).
The key is equal to the pressed letter, but letters change based on keyboard layout.
While event.code don't.
Please swap the use of key to code, and use the proper values (A => KeyA).
Here is an example.
In my picture, WASD is as unusable as you can imagine, but if you use KeyW, KeyA, KeyS, and KeyD, then it will map to my ZQSD no problem.
Describe the bug
When you receive a key event, you receive two values, the event.code (KeyA) and the event.key (A).
The key is equal to the pressed letter, but letters change based on keyboard layout.
While event.code don't.
Please swap the use of key to code, and use the proper values (A => KeyA).
Here is an example.
In my picture, WASD is as unusable as you can imagine, but if you use KeyW, KeyA, KeyS, and KeyD, then it will map to my ZQSD no problem.
Reproduction
https://cientos.tresjs.org/guide/controls/keyboard-controls.html
Steps to reproduce
Access the webpage with a keyboard of different layout
System Info
Used Package Manager
npm
Code of Conduct
The text was updated successfully, but these errors were encountered: