I am running latest retropie on a rpi3b+. I am also using retrogame to map GPIO pins the keyboard keys to arcade buttons.
What I would like to do is run the sudo shutdown
command if a designated key (or designated combo of keys) was held down for 5 seconds.
I’m not super versed in bash so am having trouble getting started. I’ve tried searching under the assumption that maybe this has been done before but couldn’t find anything. I know python but think it may be too much run simultaneously with retropie.
I appreciate any help or links in the right direction.