non-US keyboard problems

Hi!
I have problems with “SDL’s keyboard handling system”.
I cannot for example do a ‘$’ with my keyboard in SDL applications because I
have to use ‘Right Alt’ + ‘4’ and it seams like ‘Right Alt’ does not work at
all. A test app that I started shows that ‘Right alt’ has keysym 0 and it
cannot determend which button it is. I have a swedish keyboard layout. It
works nice with us layout but I’m not used to it and I need swedish chars :slight_smile:
Anyone know how I can fix it?

I’m using GNU/Linux with XFree 4.3.0

Hi there,

I have problems with “SDL’s keyboard handling system”.
I cannot for example do a ‘$’ with my keyboard in SDL applications
because I have to use ‘Right Alt’ + ‘4’ and it seams like ‘Right
Alt’ does not work at all. A test app that I started shows that
’Right alt’ has keysym 0 and it cannot determend which button it is.
I have a swedish keyboard layout. It works nice with us layout but
I’m not used to it and I need swedish chars :slight_smile: Anyone know how I can
fix it?

I had the same problem, until someone send me a patch for my game.
First you have to enable UNICODE in your app.

SDL_EnableUNICODE(1);

then if something happend you can read the key out with:

SDL_PollEvent (&event);
key = event.key.keysym.unicode;

This works fine in my programm, i hope i will work for you too… :o)

bye bye Steffen…–

Steffen Pohle (@Steffen_Pohle)| _ x
http://stpohle.bei.t-online.de | /#/ BomberClone - The Clone of
JabberID: stpohle at amessage.de ||###| DynaBlaster and Bomberman
ICQ: 370965 Yahoo: stpohle | #/ http://www.bomberclone.de
MSN: stpohle at hotmail.com |

I cannot for example do a ‘$’ with my keyboard in SDL applications because I
have to use ‘Right Alt’ + ‘4’ and it seams like ‘Right Alt’ does not work at
all. A test app that I started shows that ‘Right alt’ has keysym 0 and it
cannot determend which button it is. I have a swedish keyboard layout. It
works nice with us layout but I’m not used to it and I need swedish chars :slight_smile:
Anyone know how I can fix it?

I’ve had this same problem. As pointed out the fix is to use
unicode translation. Note that if you want your app to run on
Windows you have to be more careful because handling of right-alt
is broken in different ways on different Windows versions.

For instance, on a Windows 2000 the modifier bits say that left
ctrl is pressed when right alt is pressed on the keyboard. A
user reported that sometimes the META modifier is set too
(unknown Windows version.)

Test on as many Windows versions you can get your hands on.

Joonas PihlajaOn Sun, 4 May 2003, Alexander Bussman wrote:

The winkey is meta, afaik.On 11-May-2003, M Joonas Pihlaja wrote:

A user reported that sometimes the META modifier is set too
(unknown Windows version.)


Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." – Kristian Wilson, Nintendo, Inc, 1989

Another good reason to not use Windoze ;-)On Saturday 10 May 2003 02:26 pm, you wrote:

Note that if you want your app to run on
Windows you have to be more careful because handling of right-alt
is broken in different ways on different Windows versions.
Test on as many Windows versions you can get your hands on.