You are not logged in.

#1 2020-06-17 10:03:23

ph14nix
Member
Registered: 2020-06-17
Posts: 1

Reassigning different led as Capslock led in X11

My Thinkpad X250 doesn't have a CapsLock led, which I usually use as my keyboard layout indicator (by doing `setxkbmap-layout … -option grp_led:caps`). But there's mic-mute led on my keyboard, and I thought of making it my CapsLock indicator instead.

My mic-mute led is located in `/sys/class/leds/platform::micmute`. I can turn it on and off by writing `1` or `0` into `brightness` in that directory.

I tried to just set "trigger" option for the led (in the mentioned directory):

$ cd /sys/class/leds/platform::micmute
$ echo kbd-capslock | sudo tee trigger 
kbd-capslock
$ cat trigger 
none usb-gadget usb-host kbd-scrolllock kbd-numlock [kbd-capslock] kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock disk-activity disk-read disk-write ide-disk mtd nand-disk cpu cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 panic mmc0 AC-online BAT1-charging-or-full BAT1-charging BAT1-full BAT1-charging-blink-full-solid rfkill-any rfkill-none audio-mute audio-micmute rc-feedback rfkill0 phy0rx phy0tx phy0assoc phy0radio bluetooth-power rfkill1 hci0-power rfkill2

This makes the led act as if it was CapsLock led, but only in Linux console (Ctrl+Alt+F1) — I guess the `trigger` file makes sense only for the kernel's idea of CapsLock. In X11, the led never lights, neither when I switch layouts, nor when I turn on CapsLock.

Is there any way to make X11 use the led I want a CapsLock led? Or alternatively, is there a way to make the led I want a keyboard layout indicator?

Ivan

Last edited by ph14nix (2020-06-17 10:06:50)

Offline

Board footer

Powered by FluxBB