[SDL] SDL 1.3: UTF-8 vs UTF-16 vs UTF-32?
Christian Walther
cwalther at gmx.ch
Sun Feb 5 05:42:51 PST 2006
David Olofson wrote:
> So, "physical position" key codes would be a very nice thing to have
> in some situation, but it should be noted that applications that use
> them should never assume anything about what might be printed on the
> keycaps. No talking about pressing this or that key, without actually
> checking what's supposed to be printed on it, please.
Of course. We'd absolutely need a function "const char
*SDL_KeyDescription(SDL_scancode s)" or so that takes into account the
OS keymap. If a game uses "physical position" codes but translates them
to human-readable descriptions using a hard-coded table, that's just a
bug, IMHO.
I hope such a function can be implemented on most OSes. If not, we'd
have to resort to populating a table on-the-fly using the data from
incoming key events, which would be a bit of a hack...
-Christian
More information about the SDL
mailing list