[SDL] AltGr and other things

Ingo Schmidt ich at der-ingo.de
Wed Sep 28 20:11:33 PDT 2005


Hi!

> Is this on a press AND release that you get the following four events?

Yes, sorry, I wasnt precise.
I press AND release the AltGr key.

> If it is a press and release of those keys, then that is how it should
> respond, given the code:

The AltGr key IS supposed to send a "left ctrl" and then "right alt"
event??
Is it not supposed to send an AltGR event or something similar?

In the case of AltGr being pressed, I can actually make a workaround:
If I receive a "left ctrl down" event, I check with SDL_GetModState(),
if there was AltGr pressed, since SDL_GetModState() actually tells me
that.

But on AltGr *release* event, I am screwed. Because I receive the
following events on AltGr release:

"left ctrl released" and then "right alt released". And in
SDL_GetModState() the bits for the AltGr key are no longer set.

So releasing AltGr results in an event, that is 100% identical to the
event "left control released".

The only way to find out, that it was actually NOT a "left ctrl
release" event would be to check, if the next event was "right alt
released". But this is quite a hack and I dont want to do it like
that.

> I'm sorry, I don't know much about foreign keyboards and the way SDL
> handles their keysyms, maybe someone else would know more about this
> problem than I do.

Where in the sources do I have to look, if I want to find out, how
libSDL looks for keyboard events? Where does libSDL get its info
from?


Cheers, Ingo =;->





More information about the SDL mailing list