On 2008-05-30, Tuomo Valkonen <[EMAIL PROTECTED]> wrote:
> vomit-inducing Xkb

How should it have been done then? 

Without higher-level semantics and hacks in the protocol. All the
groups/tranlations could be handled entirely in the library that
converts events to characters. The X key events should simply report
the key pressed as well as logical states of modifiers and locks
without any group interpretations and mangling, locks clearly marked
separate from modifiers. Modifiers should never lock. Any
applications not aware of the two new lock bits (that fit in the
state), either simply should be entirely masked from them, or 
shouldn't be cared about not knowing what to do with them. KISS.

(An AnyLock bit to XGrabKey would be nice in addition to AnyModifier,
but there's no space if the state is 16bit. The variables are ints
though. Perhaps for that it would be necessary to, say, interpret
either no lock bits set or all of them set as AnyLock. But no further
hacks should be needed. Or perhaps lock bits in grabs should merely
indicate that the lock being set is required if set, and can have any
value if unset, slightly restricting the combinations that can be
grabbed, but maybe without practical significance.)

-- 
Tuomo

Reply via email to