[Xcb] looking up the right keysym and retrieving printable chars
Rémi Denis-Courmont
remi at remlab.net
Sat Feb 6 14:07:59 PST 2010
Le samedi 6 février 2010 18:34:17 Moritz Bruder, vous avez écrit :
> how do you retrieve the correct keysymbols and get a string if the
> keysymbol is printable?
I'm not sure I understand your question. You want to find what character to
print on a key press? First you need to apply the logic already explained by
Julien.
Then you need to find what character correspond to the correct key symbol.
The full list is in /usr/include/X11/keysymdef.h (or whatever it's called on
your system). Latin-1 code points represent themselves (0x00-0xFF). Other
(non-Latin-1) Unicode code points have an offset of 0x1000000, *except* when
they don't. Unfortunately, there is a large list of X11 key symbols predating
Unicode.
I believe I have the full table here:
http://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/xcb/keysym.h;hb=HEAD
generated with that:
http://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/xcb/keysym.c;hb=HEAD
Have fun...
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the Xcb
mailing list