Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Keyboard inputs won't work if the player's language is not set to English. #284

Closed
pap-24 opened this issue Apr 6, 2024 · 0 comments

Comments

@pap-24
Copy link
Contributor

pap-24 commented Apr 6, 2024

This happens because in the inputManager.ts, event.key is being used. It's value is not constant. For example, if you press the "E" key with english keyboard language, the event.key value will be "e", however if you press the "E" again but with (for example greek language) the event.key value will be "ε".

I did some local code testing and I basically replaced every event.key (in inputManager.ts) with String.fromCharCode(event.keyCode). Which is a very goofy method I came up with and I stopped experiencing the issue/bug. I am not sure if this will break any other part of the code because I saw some special conditions being checked for the "Space" key, the "Ctrl" key etc so I did not create a pull request on this.

I also made a bug report on this too in the discord server on April 3rd.

@pap-24 pap-24 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2024
@pap-24 pap-24 closed this as completed Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant