xkb and xinput

Egbert Eich eich@xfree86.org
Wed, 11 Feb 2004 16:01:06 +0100


Owen Taylor writes:
 > 
 > GTK+ uses XKB *extensively*. Along with autorepeat, it uses it
 > to, e.g.:
 > 
 >  - Properly handle accelerators on multi-group keyboards (Alt-F works
 >    when the keyboards is in Russian mode)
 >  - Detect changing between left-to-right and right-to-left keyboards
 > 

Furthermore xkb offers a lof of accessibility functionality that is
of great benefit for manually impared users.

 > Basically, the core X server keyboard model is not sufficient to
 > represent many keyboards out there.
 > 
 > It's unfortunate that the XKB spec is vastly overcomplicated; the
 > worst offender here is all the machinery to allow xmodmap to still
 > apparently work when using XKB keyboards. But ditching it would make
 > life much worse for users of scripts such as Russian, Greek, Hebrew,
 > etc. 

Unfortunately core keyboard is so broken that making it work with xkb
is endlessly painful. Changes to the xkb layout files are likely 
to produce incompatibilities with naive legacy apps that still only
look for core keyboard.

 > 
 > And I don't see any value in creating a new specification that is
 > XKB-lite; we have toolkit integration for XKB; we have some pretty
 > nice keyboard configuration tools based on XKB; we have working
 > code for XKB.
 > 

Xkb is a mess internally; as long as one does not have to deal with
its internals it seems to be OK. I'm not sure if one wouldn't arrive
at a very similar solution if one tried to design a better/lighter
xkb offering the same flexibility.
Moving xkb functionality to a client would require keyboard input
passed to this client and than thrown back which may produce latency
issues.

Egbert.