[Xcb] [ANNOUNCE] xcb-util 0.3.2

Ian Osgood iano at quirkster.com
Tue Dec 16 08:55:08 PST 2008

Hash: SHA1

On Dec 16, 2008, at 5:26 AM, Julien Danjou wrote:

>       keysyms: use xcb_key_lookup_t type for col parameter

This is an error.  The enumeration is actually used as a return value  
for an as-yet unwritten xcb_lookup_string() implemented using an as- 
yet unwritten X Input Methods extension.  (See the X Input Methods  
extension or chapter 13 of the Xlib Programming Manual for the  
meanings of this enumeration. The names there are of the form  
"XLookupNone".)  The enumeration was included in XCB only because of  
my simple-minded conversion of Xlib.h. I apologize for the confusion;  
I thought XLookupString would be easier to port at the time, instead  
of it being the very tip of the iceberg that is XIM and XKB.

The fix is to simply remove xcb_key_lookup_t until we implement  
something like xcb_lookup_string(). Wasn't this already mentioned in  
the list?

As to the proper use of the "col" parameter, please see the function  
KeyCodeToKeySym in lib/libX11/src/KeyBind.c, or Chapter 12.7 of the  
Xlib Programming Manual. (I will not copy it here because it gave me  
a headache, and I kindly don't wish to give anyone else on the list a  
headache.) In short, it is an index to the various symbols on the  
physical key caps of your keyboard. In practice, the value is  
obtained from some combination of modifier keys (shift, alt, numlock,  
etc) and the index rarely goes above 3.


(FYI, I had forgotten most of this stuff. For research, I grepped  
through the code of Xlib in lib/libX11/src and lib/libX11/include/ 
X11, and Googled liberally for "Xlib XLookup", "Xlib KeySym" and then  
"XKeycodeToKeysym".   Are they starting to teach Google skills in  
primary school yet?)

Version: GnuPG v1.4.7 (Darwin)


More information about the Xcb mailing list