[Xcb] looking up the right keysym and retrieving printable chars
remi at remlab.net
Tue Feb 9 02:31:17 PST 2010
On Mon, 8 Feb 2010 22:05:27 -0800, Jamey Sharp <jamey at minilop.net> wrote:
> 2010/2/6 Rémi Denis-Courmont <remi at remlab.net>:
>> I believe I have the full table here:
>> generated with that:
> I'm not clear on what this header is useful for,
It is just a list of all X keysyms that correspond to a Unicode code point
- are not part of ISO-8859-1, and
- are not following the "new" X11 rule for Unicode code point.
VLC uses it to convert X11 keysyms to UCS-4/UTF-32
(VLC uses plain UCS-4 to represent keys internally independent of the
if (keysym < 0x100) :
then return keysym,
else if (keysym > 0x01000100 && keysym < 0x0110ffff) :
then return (keysym - 0x01000100),
else lookup keysym in the above mentioned table.
The table could probably be shrunk a bit, as a few "sub-ranges" appear to
match Unicode with a constant offset.
> but I wondered, is it
> something you want to contribute to util/keysyms?
I don't mind. I can do it if someone else wants. I guess it would be one
step closer to replacing XKeysymToString.
More information about the Xcb