Sample Header Ad - 728x90

How can you run a script triggered by a joystick input?

4 votes
3 answers
10137 views
I'm using a Raspberry Pi running Raspbian to power my arcade cabinet. I want to shut the Pi down using the sudo poweroff command without using the keyboard. I'm thinking the best way would be to create a simple script that would somehow be triggered by a combination of controller button inputs. It seems easy to bind a keyboard to a script, but not so easy to use a joystick input instead. Does anyone have any ideas? ### EDIT #1 The joystick and controller buttons all work fine and show up using the jstest tool from the jstest-gtk package and all work fine in Mame4all. I haven't tried xev but will look into it.
Asked by Jody (41 rep)
Jan 4, 2014, 12:04 PM
Last activity: Nov 8, 2020, 12:06 AM