[SDL] How can I find what Unicode chars are typable with user's keyboard setup?

David Bruce dbruce at tampabay.rr.com
Tue Jul 31 03:58:34 PDT 2007


Hi,

I'm working on Sam Hart's "Tux Typing" game and trying to improve i18n 
support.  The game reads in lists of words for the player to type.  I would 
like to check each Unicode char in the word list to be sure it can actually 
be entered with the player's keyboard setup.  Does SDL offer some way to do 
this?

To put it another way, is there some way to programmatically check the Unicode 
value associated with each member of the SDLKey enum?  (without having 
user-generated key events, that is).  I know if I have a key event, I can get 
both the keysym name and the Unicode value from the struct, but is there any 
function that returns the Unicode value currently associated with a given 
keysym on the user's keyboard?  I apologize if I am missing something obvious 
(I'm not exactly a professional at this).

Thanks for any help.

-- 
David Bruce


More information about the SDL mailing list