[Xcb] Where do I find the xcb_keysym_t and modifier value constants?
Arnaud Fontaine
arnaud at andesi.org
Sun Mar 21 07:17:52 PDT 2010
>>>>> Nicholas Allen <nick.allen at onlinehome.de> writes:
Hi,
> Hi, The only part left to do in my conversion from xlib to xcb is
> looking up the keysym constants. Xlib has the X11/keysym.h header
> file where the values are defined. Should I be using this header
> or does xcb have its own version of this?
For now, you should use this header as there is no XCB
equivalent. However, I'm currently working on the keyboard code even if
it's not moving forward quickly as I'm quite busy
unfortunately. Remember that XCB keyboard support is really basic ATM,
no XKB and XLookupString equivalents for example.
Today, I will publish a draft of the keyboard status in XCB, in the hope
that there will be some GSoC students interested in writing a proposal
to implement all the missing bits for keyboard.
> Also, the modifier constants (eg ShiftMask, ControlMask etc) were
> defined in X11/X.h. It seems excessive to me to introduce this
> header file just for these constants. I would prefer to make sure
> I don't use any Xlib functions by not including this
> header. However, I couldn't find the xcb equivalent of these
> constants anywhere.
Besides of including X11/keysym.h, you should not have to include any
other Xlib headers. ShiftMask and ControlMask for instance are parts of
the X Window System Protocol, and therefore defined in xcb/xcb.h[0]
(such as XCB_MOD_MASK_SHIFT and XCB_MOD_MASK_CONTROL). You might also be
interested in xcb-util/keysym[1] which provides Xlib-like utilities
functions.
Hope that helps.
Arnaud
[0] http://xcb.freedesktop.org/manual/group__XCB____API.html
[1] http://cgit.freedesktop.org/xcb/util/tree/keysyms
More information about the Xcb
mailing list