[SDL] No unicode information in key releases

Sam Lantinga slouken at devolution.com
Tue Jan 18 10:29:27 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.

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)

See ya,
	-Sam Lantinga, Software Engineer, Blizzard Entertainment

More information about the SDL mailing list