[SDL] No unicode information in key releases

Koshmaar koshmaar at poczta.onet.pl
Fri Jan 21 10:51:09 PST 2005

> You can't treat the unicode member of key events as a state.
> Think of it instead as a separate event that's piggy-backed onto the
> key press event ... "the unicode character X was input" Since there
> is no character input generated when a key is released, the unicode
> field is not filled in for a key release.

Yes I know that... maybe I didn't make myself clear enough in the first letter.
In short: I know that I can't get unicode information from key releases. I know ugly solution to make this work (switching between 2 modes etc. as explained in first letter). I know that on SDL mailing list there are whole lots of advanced programmers who are writing games using SDL and event based input; it would be unbelievable if no one has ever encountered this problem (at least) and solved it (that's why I'm writing here and what I'm interested in). Are there any... hmmm, hacks which I could use?

> This makes a little more sense if you think about this sequence:
> left-shift down
> 's' key pressed (key is SDLK_s, unicode is 'S')
> left-shift up
> 's' key released (key is SDLK_s, unicode is meaningless)

If meaningless == 0, then I agree ;-)


More information about the SDL mailing list