Ubuntu MATE: Keyboard lighting
Posted: 2023 May 03, 18:59
The led keyboard file is created as follows
Edit the led keyboard file and add the following lines of code
Save the file and add execute rights to the led_keyboard file
A keyboard shortcut is added by following the steps: System > Centrol Center > Keyboard Shortcuts > +Add
Fill in the Name field: Keyboard lighting (or whatever name you want), fill in the Command field: bash /path/to/file/led_keyboard led on
Press the Apply button and notice the added shortcut under Custom Shortcuts.
Click on Disable and add the desired key combination to execute the command.
Restart the computer and test the key combination after starting the operating system.
Code: Select all
[root @ debian ~] touch led_keyboardCode: Select all
#!/bin/bash
if [ -f /tmp/keyboard_light ]; then
xset -led 3 && rm /tmp/keyboard_light
else
xset led && touch /tmp/keyboard_light
fiCode: Select all
[root @ debian ~] chmod +x led_keyboardFill in the Name field: Keyboard lighting (or whatever name you want), fill in the Command field: bash /path/to/file/led_keyboard led on
Press the Apply button and notice the added shortcut under Custom Shortcuts.
Click on Disable and add the desired key combination to execute the command.
Restart the computer and test the key combination after starting the operating system.