1

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.

MatsK
  • 2,882
  • 3
  • 17
  • 22
user76595
  • 179
  • 1
  • 5

1 Answers1

1

There is a keyboard macro tool, AutoKey that can do what you want.

AutoKey is a Linux Utility for Text Substitution , Hotkeys and Desktop Automation.

https://autokey.github.io/intro.html

MatsK
  • 2,882
  • 3
  • 17
  • 22