[SDL] SDL 1.3 keyboard test (please participate)
Sam Lantinga
slouken at devolution.com
Sun Feb 10 07:36:14 PST 2008
With SDL 1.3 we're trying something new with keyboard input:
The SDLK* constants have been extended to include the entire Unicode space,
and represent the characters generated using the current keyboard layout.
A set of virtual scancodes representing the physical keys have been added,
and these are layout independent, with the alphabetic keys positioned in
the US QWERTY layout. These scancodes are based on the USB HID standard.
This system has the advantage that positional controls (e.g. WASD) work
on all keyboard layouts by using the scancodes, and non-positional controls
(e.g. I for inventory) work on all keyboards containing those keys.
The big disadvantge of this system is that neither X11 nor Win32 support
the concept of position independent virtual keys, so we end up having to
look at raw keyboard scancodes to make sure we're getting the right values.
This makes me very nervous, so to get a feel for how robust this method
is, I'd like everybody who can to download the SDL 1.3 source code and
build the checkkeys test program and see if the output matches your keyboard.
(there's no graphical output, keys are printed to stdout)
I'm especially interested in your results if you have non-standard keyboards,
international keyboards, non-PC hardware, or non-XOrg/XFree86 X servers.
This is implemented for Windows, X11 and Mac OS X.
http://www.libsdl.org/tmp/SDL-1.3.tar.gz
or
http://www.libsdl.org/tmp/SDL-1.3.zip
Thanks!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment
More information about the SDL
mailing list