Bug 49276

Summary: Caps/NumLock led cannot be turned off programmatically
Product: xkeyboard-config Reporter: ultr <ultr>
Component: GeneralAssignee: xkb
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium CC: daniel, freedesktop.zen.ssokolow, peter.hutterer
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description ultr 2012-04-29 10:42:56 UTC

    
Comment 1 ultr 2012-04-29 10:50:33 UTC
By default these commands do not work at all:
xset  led 1
xset -led 1
xset  led 2
xset -led 2
xset  led named "Caps Lock"
xset -led named "Caps Lock"
xset  led named "Num Lock"
xset -led named "Num Lock"

If you edit 2 files:
/usr/share/X11/xkb/compat/ledcaps
/usr/share/X11/xkb/compat/lednum
and replace:
    !allowExplicit;
with:
    allowExplicit;
you can turn Caps- and NumLock leds on and off.

But only if the CapsLock and/or NumLock are not active.
If they are, the keyboard led is ALWAYS ON. You cannot turn it off using xset.
Comment 2 ultr 2013-04-25 16:35:06 UTC
Could XChangeKeyboardControl() and XkbSetNamedIndicator() provide a way to set a LED to one of three states: Off (-1), None (0) and On (1)?
None would allow LED to show the actual state of the modifier, while Off and On would force the LED's state no matter what the modifier's status is.

Also all LEDs should be unlocked for programs by default, so that they can change their state, not only the Scroll Lock LED.
Comment 3 Daniel Stone 2013-09-05 22:19:19 UTC
reassigning to xk-c for the allowExplicit change, but doubt this will happen.
Comment 4 Sergey V. Udaltsov 2013-09-05 22:26:02 UTC
Daniel, I do not see the point to change the allowExplicit parameter if that function does not work in X server in any case. Will it work in Wayland?
Comment 5 Daniel Stone 2013-09-05 23:16:34 UTC
No, definitely no plan to support it in Wayland.
Comment 6 Sergey V. Udaltsov 2013-09-06 07:37:17 UTC
Ok. So I guess, since the core function is broken in X, changing from one non-working config to another non-working config - does not make much sense.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.