Skip to content

Instantly share code, notes, and snippets.

@synt-xerror
synt-xerror / How-To-Turn-Keyboard-Led-On.md
Last active March 22, 2026 04:17
Script to turn keyboard led on

Create a udev rule on /etc/udev/rules.d/99-scrolllock.rules with this content:

SUBSYSTEM=="leds", KERNEL=="input*::scrolllock", RUN+="/bin/chmod 777 /sys/class/leds/%k/brightness"

Save the file and reboot the system.

After this, create a file on .local/bin/led (or other directory for your scripts), and put this content: