-
Notifications
You must be signed in to change notification settings - Fork 285
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
Alt-Graph Keys not recognized on Windows #1430
Comments
I tried this in an Allegro 5.0.5 build of ex_keyboard_events I had laying around, AltGr works fine there with my Norwegian keyboard layout. I don't have newer builds to test on, but this commit looks suspicious: 4ff2088 |
Here I have tested MinGW, Allegro 5.2.6.0 and I have the same problem.
I had reported this on discord too. |
So... reverting 4ff2088 does make this work, as far as I can tell. I sort of can imagine what that change was meant to do, but I think it is wrong. I need to cross-check what happens on Linux with this, but we'll probably just revert it. |
I'm not completely sure what that commit is supposed to fix, but in my testing key combinations involving AltGr work fine even if I hold Left Control down. I tried on Allegro 5.0.8. If the idea is to suppress the extra key down and key up events that are generated for Left Control when pressing and releasing AltGr, I think that would be more involved. |
This reverts commit 4ff2088 which was ostensibly meant to make CHAR events return the same character as when control was not pressed. This is incorrect, as Ctrl + A, for example, should indeed return a unichar of 1. Along the way, this broke AltGr requiring keys on non-English keyboards. Fixes #1430, #1504 (cherry picked from commit 310332a)
Issue
On Windows, characters which are entered using Alt-Graph+Key combinations are not recognized, but instead only the regular Key.
To demonstrate the issue, i've adopted one of the official examples (attached). On both runs, Alt-Graph+Q was pressed to produce the at-Symbol (@):
Windows 11 (English) with german keyboard layout:
Ubuntu 20.04 with german keyboard layout:
Only the later one correctly produces the @-symbol.
How to reproduce:
Build the attached application on Windows (MinGW, Allegro 5.2.8) and enter a Alt-Graph generated symbol like @ (Alt-Graph+Q).
Expected behavior:
Windows should recognized the keypress in the same way as Linux does.
If you need any further information which can help to get this bug fixed, please let me know.
keytest.zip
The text was updated successfully, but these errors were encountered: