Reply To: Capture gamepad as keyboard in Linux shell

Home Forums RetroPie Project Controller Configuration in RetroPie Capture gamepad as keyboard in Linux shell Reply To: Capture gamepad as keyboard in Linux shell

#116001
Profile photo of targetboy
targetboy
Participant

I figured it out. Here is the final script:

#!/bin/bash
joy2key -terminal -axis 0 0 0 0 -thresh 0 0 0 0 -buttons q q q q q q q q &
fbi /home/slideshow/*.jpg -a -noverbose -u -t 120
pkill joy2key

The joy2key command starts reading the joystick with all buttons returning “q”. The “&” at the end makes it start in the background.

The pkill statement kills the joy2kill process, that otherwise hung around throwing keys into the standard output and generally being a nuisance.

Skip to toolbar