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

Wrong displayed keys for AZERTY keyboard #1151

Closed
DarkEyeDragon opened this issue Dec 2, 2019 · 4 comments
Closed

Wrong displayed keys for AZERTY keyboard #1151

DarkEyeDragon opened this issue Dec 2, 2019 · 4 comments

Comments

@DarkEyeDragon
Copy link

Platform: Windows

Build: 100.1

Issue: Invalid displayed keys for AZERTY keyboards.
image
Move X should be Q (left) and D (right)
Move Y should be Z (up) and S (down)
The controls somehow still function correctly. Just displayed wrong.

image
Q should be A (need to actually press A to cancel)

Steps to reproduce: Play any level on survival.

@deltanedas
Copy link
Contributor

your keyboard is the same as qwerty
if its scancodes are different and not just letters printed, it will send "A" instead of "Q"

@DarkEyeDragon
Copy link
Author

your keyboard is the same as qwerty
if its scancodes are different and not just letters printed, it will send "A" instead of "Q"

That's not the case however. The right keys get typed in chat. If it was the same as QUERTY it would type QUERTY instead of AZERTY in chat.

I'm not sure how the Move X and Move Y aren't affected by this though.
However when rebinding keys it'll still give their values as if it were QUERTY.

@joshuaptfan
Copy link
Contributor

joshuaptfan commented Dec 2, 2019

This is possibly because scancodes ≠ keycodes, because operating systems let you choose your keyboard layout without requiring different hardware. The game polls for scancodes and has a hardcoded map of keycodes for them.

SDL scancodes used by the game

The fix may be for the game to get keyboard layout info from the OS and assign names to the scancodes accordingly.

@Anuken
Copy link
Owner

Anuken commented Dec 2, 2019

Intentional behavior. As scancodes are used, and there is no platform-agnostic way to get mapped key names, you will be seeing QUERTY key names instead of the ones for your layout.

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

4 participants