Question:Use Caps Lock LED as HDD LED (or custom) indicator ?? ??(9 answers) ?? ???Closed 3 years ago. ?

My laptop has not a hd activity led indicator. So, how could I use some other led (such as my keyboard NumLock or Capslock one) to blink when hd has some activity?

Thanks in advance!

OS: Linux Ubuntu 16.04Toshiba Satellite 4k

Answer: It has always been possible.

The keyboard LEDs are controlled by software the keyboard device driver generating commands to be sent to the keyboard microprocessor that turn the LEDs on and off, in response to I/O Control requests. For comparison, the hard disc activity lights on your front panel are controlled by motherboard hardware.

From the earliest DOS days when the TV series Knight Rider and Star War’s Darth Vader were popular there have been programs that controlled the keyboard lights; the most popular would make all the keyboard lights ripple in sequence. ?

The keyboard driver can be accessed in DOS/Win/Linux. One example for VB is here…

https://support.microsoft.com/en-us/help/177674/how-to-toggle-the-num-lock–caps-lock–and-scroll-lock-keys

as mentioned but not elaborated above, someone provided several solutions including a Bash script to do what you want at

Use Caps Lock LED as HDD LED (or custom) indicator

The simplest solution I found is a single line bash command that could be set as a cron job (perhaps every 500ms).

echo ide-disk > /sys/class/leds/input17::capslock/trigger

To use this requires CONFIG_LEDS_TRIGGER_DISK=y to bet set in the kernel config.