[Xcb] XStringToKeysym() XCB equivalent?
Arnaud Fontaine
arnaud at andesi.org
Thu Mar 13 04:37:02 PDT 2008
>>>>> "Ian" == Ian Osgood <iano at quirkster.com> writes:
Hi,
Ian> It is a TODO item to extract that functionality from Xlib and
Ian> into an xcb/util library. Part of the problem is that it
Ian> depends on Xrm (resource manager) to read
Ian> /usr/lib/X11/XKeysymDB, and nobody on the XCB team wants to
Ian> touch Xrm with a ten foot pole. This is also why Xt hasn't been
Ian> ported yet.
Ian> The other problem is that it depends on some auto-generated
Ian> source files. There is an in-memory static hash-table of
Ian> standard keysyms, generated from
Ian> xorg/proto/x11proto/keysymdef.h (and maybe some other vendor
Ian> specific keysym headers). There is a script and a tool in lib/
Ian> libX11/src/util/ which takes that header and turns it into
Ian> libX11/src/ ks_tables.h, part of which is used by
Ian> XStringToKeysym(). (The order of search is the in-memory hash,
Ian> then XKeysymDB, then treat the string as what appears to be a
Ian> Unicode identifier.)
Ian> XCB should bring keysymdef.h et al into an XML file and do all
Ian> the required header, source, and DB generation from that. And
Ian> of course make *really* good documentation on that file format,
Ian> since keysyms are the one part of Xlib that continues to be
Ian> heavily modified to the present day.
Thank you very much for your explanation. So, at the moment, I don't
have any choice but to use XStringToKeysym() which is a bit embarassing
because the ported code will still depend on Xlib for this call, but
well, I hope someone will fix this soon because unfortunately I have no
idea how to do it myself...
Regards,
Arnaud Fontaine
More information about the Xcb
mailing list