I have a magicforce smart 68 kb now and it would look better if the Caps Lock LED would emit light too.
I do not even has a Caps Lock function on that button, because I have switched it with the left Control, and made that to be a compose key for the international layout. I was searching and trying some stuff but nothing has worked so far.
tl;dr: How do I turn on the Caps Lock LED without enabling Caps Lock?
Best Answer
You can get a list of all controllable LEDs by checking the content of the virtual directory
/sys/class/leds
:On my system, there are only the three keyboard LEDs. If your output looks different, make sure you use the correct names instead below!
Each file is a symbolic link to a directory holding several properties of that LED:
The only thing which is important for us is the
brightness
file content.0
means the LED is off.1
means the LED is on. (Assuming themax_brightness
file holds the value 1 - on special keyboards the LED might maybe support multiple brightness values?)We get the current LED state by checking the
brightness
file's content (it's currently off):To switch the LED on, we must set that file's content to
1
:To switch the LED on during every boot, you might want to append the command below to your
/etc/rc.local
script. It will be executed as root, therefore we don't need thesudo tee
but can use Bash output redirection: