[SDL] Problems with keymapping on AZERTY keyboards on Mac OS X

Rainer Deyke rainerd at eldwood.com
Thu Jun 28 16:42:52 PDT 2007


Christophe Cavalaria wrote:
> Game: Press the M key
> User presses the M key a few times, nothing happens
> Game: Oh wait! Press the M key has it would be placed on a US QWERTY
> keyboar, 1978 version
> Users throws the computer out the window while cursing loudly

The other approach isn't pretty either.

Game: Press the M key.
User presses the key that, in conjunction with AltGr, would produce the 
'm' character.
Game: No, not the <insert foreign character here> key.  The M key.
Users smashes the computer against the wall, cursing loudly.

I think the only real solution is to give the program access to the 
keyboard layout.  In particular:
   - The program needs to know how many keys there are, where they are, 
and how they are labeled.
   - Incoming key events should identify themselves by both label and 
position.
   - The program needs to be able to convert between key label codes and 
key position codes based on the current keyboard layout.
   - Ideally, each keyboard layout should have a unique and unambigiuous 
name that the program can use to make key mappimg decisions on a higher 
level.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the SDL mailing list