I followed multiple tutorial to set up triggerhappy but nothing happen... I mostly use this one (go directly to the triggerhappy section).
So installed triggerhappy: sudo apt-get install triggerhappy When I do and press the key I want to use: thd --dump /dev/input/event* I got:
EV_KEY BTN_BASE6 1 /dev/input/event4
# BTN_BASE6 1 command
EV_KEY BTN_BASE6 0 /dev/input/event4
# BTN_BASE6 0 command
Finally I did: pi@retropie:~ $ sudo nano /etc/triggerhappy/triggers.d/testb.conf and write inside: BTN_BASE6 1 sudo chmod 777 /sys/class/backlight/rpi_backlight/brightness && echo 25 > /sys/class/backlight/rpi_backlight/brightness ( the script sudo chmod 777... is useful to control the brightness of the Pi screen, and it works great when I type it in the terminal via SSH).
And restart triggerhappy : sudo service triggerhappy restart
I guess i do something wrong...