phoenix
Participant
Post count: 35

I had the same issue. I don’t think you can really bind buttons from your joystick controller to keyboard inputs.

I have made two different consoles, one with a USB “zero delay” encoder, and one with arcade controls wired directly to the GPIO.

I added 3 buttons to the first one, (wired direct to the GPIO) and used GPIOneer to map them (one to ESC, one to “5”(coin), and a couple for pinball. GPIOneer has a nice web interface to change them once you have wired them. It is completely compatible with Retropie.
http://piplay.org/forum/discussion/1891/gpioneer-a-side-project-compatible-with-piplay/p1?post#Form_Body
On the other arcade, I used mkjoystick to map the controls and extra buttons to the GPIO: https://github.com/digitalLumberjack/mk_arcade_joystick_rpi

hope this helps. let me know if you have questions.