[RFC] Automatic modifier update of slave devices

Peter Hutterer peter.hutterer at who-t.net
Sun Feb 23 21:33:48 PST 2014


Right now, if any of the LEDs are on (e.g. NumLock) and a keyboard is
plugged in, that new keyboard won't have the LED light up. Likewise, hitting
NumLock on one keyboard won't light it up on the second keyboard.
For many, this was largely a nonissue because GNOME would overwrite the
numlock LED, but a recent change has brought this to light.

This it is a long-standing issue (at least server 1.7, possibly back to 1.4
or even longer).

This is one attempt of solving it by forcing a full modifier state update
down the slave device, once when it is attached, once when it is enabled. So
attaching a floating slave to a master keyboard with numlock on will light
up the LED too.

And whenever the master sees indicator changes, the modifier state is pushed
down to the client to update. This is a behaviour change: before it was
possible for one keyboard to have a different modifier set than the other
keyboard, with the master having a merged set. But whether anyone will
notice is a different question.

A different solution to this would be to manually update the LEDs only,
without updating the modifier state. Bit more hairy and more intrusive,
especially since there is probably a combined total of 2.3 people on the
planet that understand what's going on here anyway, and I don't count myself
anymore here.

Cheers,
  Peter


More information about the xorg-devel mailing list