libsdl1.2: problem looking up keysyms under X11

Sam Hocevar sam at zoy.org
Sun May 14 00:37:22 UTC 2006


On Sun, May 14, 2006, Jochen Voss wrote:

> > Keysyms are supposed to represent physycal keys, so that
> > SDL_GetKeyState() works. If you need the AltGr-combined keys, you
> > should probably have a look at the .unicode member of the structure.
> 
> Is this supposed to work?  I suggested the patch because for me
> the unicode member often did not contain the correct value.

   Indeed. Apparently SDL uses XLookupString() to convert to Latin-1,
but apparently newer versions of X11 generate UTF-8 despite the manpage
still claiming it does Latin-1. I have written a patch for this that
shall be in my next SDL upload and will suggest it upstream.

> Many thanks for dealing with this, and my apologies for the amount of
> trouble this patch has caused.

   It's all right. I have seen worse :)

-- 
Sam.



More information about the Pkg-sdl-maintainers mailing list