[SDL] Non US keymapping problems with DirectInput (solution?)
Ryan Nunn
colourles at users.sourceforge.net
Thu Jul 24 21:59:23 PDT 2003
Ok, it's a well known problem that SDL using DirectInput doesn't always
give the correct key codes for the actual keys being pressed when using a
non US keyboard.
After examining the problem, I have to ask why can't MapVirtualKey() be
used to convert the scancode from DirectInput for the key pressed into a
Virtual Key code that is correct for the keyboard being used.
In the a fairly limited test, using MapVirtualKey to translate the scancode
to a virtual key worked fine.
Just as a note, MapVirtualKey() is already being used by the DirectInput
code when TranslateUNICODE is set, so I don't see that there would be a
problem always using it.
-Colourless Dragon
aka Ryan Nunn
Exult: http://exult.sourceforge.net/
Pentagram: http://pentagram.sourceforge.net/
More information about the SDL
mailing list