Closed GWRon closed 5 years ago
Think one of the reasons might be SDL.mod/sdlsystem.mod
It uses "SDLSCANCODE*" - which is the physical representation of keys, not the "mapped" one whic changes depending on a users keyboard layout.
Edit: https://gist.github.com/stuartpb/804078/18faabdc0310d864bd38a39ae8d9bdf7794572cd
Reading "glue.c" of sdlsystem.mod it seems as if this is an sdl.mod issue. So feel free to close this here and reopen a new one for sdl.mod once you got aware of this issue.
So I should change to using keycodes instead then?
Seems my old reply was added to another issue as you moved this one ;-)
Did you check the "gist" I linked above? It explains the differences. Instead of "SDLSCANCODE" one should use "SDLK_" as it contains the mapped codes.
or even simpler than the GIST: https://wiki.libsdl.org/CategoryKeyboard https://wiki.libsdl.org/SDL_Keycode
Edit: the SDL_Keysym
object/type/struct contains both - SDL_Scancode
and SDL_Keycode
Just want to confirm that it works now as expected.
Thanks :-)
I just found out that my vanilla build reacts correct to keycodes for KEY_Z and KEY_Y (they are switched on German - and other - keyboard layouts, QWERTZ not QWERTY). But on an NG build these two keys are switched.