Ubuntu MATE: Keyboard lighting

Locked
User avatar
Mihai Romania
Posts: 60
Joined: 2023 May 03, 14:12
Location: ROMANIA
Contact:

Ubuntu MATE: Keyboard lighting

Post by Mihai »

The led keyboard file is created as follows

Code: Select all

[root @ debian ~] touch led_keyboard
Edit the led keyboard file and add the following lines of code

Code: Select all

#!/bin/bash
if [ -f /tmp/keyboard_light ]; then
xset -led 3 && rm /tmp/keyboard_light
else
xset led && touch /tmp/keyboard_light
fi
Save the file and add execute rights to the led_keyboard file

Code: Select all

[root @ debian ~] chmod +x led_keyboard
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.
I'm on LinkedIn
Locked