Comment 62 for bug 218202

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

On Thu, May 29, 2008 at 12:37:12AM -0700, <email address hidden> wrote:
> A simulated Caps Lock key press makes the logical and the physical states of
> the Caps Lock out of sync. This causes a problem as one of OpenOffice's
> functionality - correct accidental use of cAPS LOCK key - relies on this
> feature of X.

confirmed with git master.

Now, with 1.4 and master having similar subsystems I think I found what the
issue is.
1.3 and before had one physical device as the "core keyboard". 1.4 and beyond
however feature a "virtual core keyboard" (VCK), all physical input devices
are extension keyboards.

If you hit a key on the keyboard, the core event is generated by the VCK, and
an XI event by the actual keyboard. The LED change then happens when the XI
event is passed through xkb (the LEDS on the virtual keyboard change too,
but, well...).

If you use xtest for core events, the server picks the VCK and processes it
accordingly - but, because it is the VCK you don't see the LED change.
To fix this, you essentially have to pick which devices need the LED state
updated and run it past them as well. Which gets a bit iffy, if you have
multiple keyboards, some of which have CL on and some of which have it off
(which AFAIK should work now). Which ones do you pick? Do you switch CL on? or
off?

Comments?