[SDL] My thoughts on keyboard input in SDL 1.3

Christian Walther cwalther at gmx.ch
Sun Jan 20 01:32:11 PST 2008


Bob Pendleton writes:
> All those extra keys have names defined for them in SDL 1.3. The names
> may not be obvious or even reasonable but they are all based on the
> names given to keys in the USB standard for keyboard devices which you
> can find at http://www.usb.org/developers/devclass_docs/Hut1_12.pdf That
> gives us a pretty good, if not perfect, way to make sure that the same
> key position has the same SDLK_* name on every keyboard.

Please, everyone, have a look at
<http://libsdl.org/cgi/viewvc.cgi/trunk/SDL/include/SDL_keysym.h?view=markup>.
It has the definitions of all SDLK_ codes, with comments about the ones
that are different on different keyboard types (e.g. SDLK_NONUSBACKSLASH,
which is the extra key next to left shift on ISO (European) keyboards, or
SDLK_BACKSLASH, which lies in the corner of the L-shaped return key on ISO
keyboards and above the straight return key on ANSI (US) keyboards).

> The (I can only call it) "USness" of the names is from the standard and
> does not represent any anti-international bias on the part of the SDL
> developers

I can only add to this that it was me who came up with the current set of
SDLK_ codes (modeled after the USB standard), and I'm not American, I'm
Swiss :).

 -Christian




More information about the SDL mailing list