[Xcb] XStringToKeysym() XCB equivalent?
Ian Osgood
iano at quirkster.com
Wed Mar 12 17:56:20 PDT 2008
It is a TODO item to extract that functionality from Xlib and into an
xcb/util library. Part of the problem is that it depends on Xrm
(resource manager) to read /usr/lib/X11/XKeysymDB, and nobody on the
XCB team wants to touch Xrm with a ten foot pole. This is also why Xt
hasn't been ported yet.
The other problem is that it depends on some auto-generated source
files. There is an in-memory static hash-table of standard keysyms,
generated from xorg/proto/x11proto/keysymdef.h (and maybe some other
vendor specific keysym headers). There is a script and a tool in lib/
libX11/src/util/ which takes that header and turns it into libX11/src/
ks_tables.h, part of which is used by XStringToKeysym(). (The order
of search is the in-memory hash, then XKeysymDB, then treat the
string as what appears to be a Unicode identifier.)
XCB should bring keysymdef.h et al into an XML file and do all the
required header, source, and DB generation from that. And of course
make *really* good documentation on that file format, since keysyms
are the one part of Xlib that continues to be heavily modified to the
present day.
Ian
On Mar 12, 2008, at 3:23 PM, Arnaud Fontaine wrote:
> Hi,
>
> I'm currently porting Awesome[0] to XCB. The port is almost
> finished,
> but I wonder how to port XStringToKeysym() as there seem to be
> no XCB
> equivalent to this function. This function is currently used in
> order to
> get the keysyms corresponding to the keys specified in the
> configuration
> file. I tried to port it myself but unfortunately I can't figure
> out how
> to do it, any ideas?
>
> Regards,
> Arnaud Fontaine
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
More information about the Xcb
mailing list