Comment 83 for bug 218202

Revision history for this message
In , Freedesktop-zen-ssokolow (freedesktop-zen-ssokolow) wrote :

(In reply to comment #22)
> Using XTEST to switch a physical keyboard's LEDs on or off becomes
> complicated because each keyboard may have different indicators (and
> modifiers, etc.) so it's not clear-cut which indicators to switch on or off
> and under which conditions to do so. Furthermore, because we handle
> keyboards separately (and the event handling is quite frankly a disaster)
> there is a disconnect between the actual keyboard devices and the merged
> master device, the VCK. Hitting CapsLock on a physical keyboard will set the
> lock on this keyboard and thus on the master device. Sending a CapsLock
> through XTEST will set CapsLock on the XTEST device but unlock it on the
> merged device. So now you have two keyboard devices with CapsLock on, but
> the master device has it off. For indicators, the same is true of course.

You have my sincere thanks. Now that I finally know what causes the LED to go out of sync, I can trigger it intentionally by running this on login:

numlockx off; xdotool key Num_Lock

I still don't know how to break the modifier state and the LED apart so I can flash the LED to indicate something like unread mail (see Bug 49276), but at least it can warn me if I accidentally disable NumLock (which I only do intentionally in certain games), rather than requiring me to put a piece of tape over it.

(My keyboard is a Rosewill RK-9000I. The LED is one of those ultra-bright, water-clear lens'd blue ones meant more for illumination than use as indicators and the surrounding plastic is white as snow. It'd be bothersome to find pure white electrical tape, ugly to apply enough layers to block the LED, and I don't want void the warranty by desoldering it.)