[SDL] My thoughts on keyboard input in SDL 1.3
Rainer Deyke
rainerd at eldwood.com
Fri Jan 25 19:40:12 PST 2008
Bob Pendleton wrote:
> I think we have a difference in beliefs about the purpose of
> SDL_GetKeyname(). I believe you see it as being for
> internationalization, while I see it as only being useful for debugging.
> I use it to print a trace of what keys have been pressed. It never
> occurred to me to expect to be able to present those keys to an end user
> as part of an API. That level of internationalization is normally done
> using a message database keyed by locale.
Very common use-case: My game has a custom keyboard configuration
system. I need to display the names of the keys used in the current
configuration. If the user changes the configuration, I need to display
the names of the newly chosen keys. I would prefer it displaying the
actual internationalized names actually shown on the physical keyboard,
but this is not critical so long as I can show *something* that uniquely
identifies the key to the user.
If SDL_GetKeyname doesn't support this very common use-case, I have to
write my own function. If I have to write my own function anyway, I
don't see the point of SDL_GetKeyname. However, my own function would
be very useful. Useful enough to distribute as a library. Perhaps even
useful enough to put into the core SDL library.
--
Rainer Deyke - rainerd at eldwood.com
More information about the SDL
mailing list