[Xcb] looking up the right keysym and retrieving printable chars
Moritz Bruder
shortcut.mb at web.de
Sun Feb 7 04:45:40 PST 2010
hi,
so in awesome they have that code (key.c):
if(state & globalconf.modeswitchmask)
{
k0 = xcb_key_symbols_get_keysym(globalconf.keysyms, detail, 4);
k1 = xcb_key_symbols_get_keysym(globalconf.keysyms, detail, 5);
}
else
{
k0 = xcb_key_symbols_get_keysym(globalconf.keysyms, detail, 0);
k1 = xcb_key_symbols_get_keysym(globalconf.keysyms, detail, 1);
}
http://cgit.freedesktop.org/xcb/util/tree/keysyms/keysyms.c and in here
i found the following text:
The first four elements of the list are split into two groups of
KeySyms. Group 1 contains the first and second KeySyms; Group 2 contains
the third and fourth KeySyms. Within each group, if the second element
of the group is NoSymbol , then the group should be treated as if the
second element were the same as the first element, except when the first
element is an alphabetic KeySym ``K'' for which both lowercase and
uppercase forms are defined. In that case, the group should be treated // which group ?
as if the first element were the lowercase form of ``K'' and the second // i thought second is XCB_NO_SYMBOL ?
element were the uppercase form of ``K.''
so why do they use 4 and 5 as param and not 3 and 4?
More information about the Xcb
mailing list