celui-ci semble interessant :
Fn+F3 and Fn+F4 for
keyboard backlight
I've tried some solutions from internet, but they didn't help. So I've wrote teo scripts:
nano ~/.scripts/leds_down.sh
#!/bin/bash
brightness=$(cat "/sys/class/leds/asus::kbd_backlight/brightness")
a=$((brightness-1))
if [ "$brightness" -gt 0 ]
then
echo $a >> /sys/class/leds/asus\:\:kbd_backlight/brightness
fi
and
nano ~/.scripts/leds_up.sh
#!/bin/bash
brightness=$(cat "/sys/class/leds/asus::kbd_backlight/brightness")
a=$((brightness+1))
if [ "$brightness" -lt 3 ]
then
echo $a >> /sys/class/leds/asus\:\:kbd_backlight/brightness
fi
Then made them executable:
chmod +x ~/.scripts/leds_up.sh
chmod +x ~/.scripts/leds_up.sh
Then add one string to rc.local to give all users permission to change file "/sys/class/leds/asus::kbd_backlight/brightness" on every boot:
sudo nano /etc/rc.local
and paste there:
chmod 666 /sys/class/leds/asus\:\:kbd_backlight/brightness
BEFORE "exit 0". So it looks like:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
chmod 666 /sys/class/leds/asus\:\:kbd_backlight/brightness
exit 0
And now just make shortkeys on Fn+F3 and Fn+F4 for ~/.scripts/leds_down.sh and ~/.scripts/leds_up.sh.
Now you can reboot or execute in terminal sudo chmod 666 /sys/class/leds/asus\:\:kbd_backlight/brightness.
par contre comment faire un raccourci pour ces touches ?