I'm trying to build a small arcade cabinet powered by the Raspberry Pi 2. I've got several arcade buttons (for ABXY, Insert Coin/Select and Start) and an 8-way joystick.

I'm following the tutorial here, and therefore using Adafruit's Retrogame library (github here) to send keyboard events; essentially it reads the status of GPIO pins and triggers keyboard events.

My joystick works absolutely fine - it's triggering arrow key events, and the primary and secondary fire keys work (bound to LEFT_CONTROL and LEFT_ALT or whatever the names are - I've checked them) I'm trying to add additional controls, or simply just rebind them to something other than control and alt - because some emulators don't like control or alt as keys. I've got four extra buttons, for keys C, V, 1 and 5 (insert coin and start in MAME) None of these keys work, and my buttons dont work if I rebind them to Z and X. I've tried running it in the console and testing there, and I get keyboard events visible for control, alt and the arrow keys but not characters.

It seems that retrogame is incapable of generating events for normal keys, only modifiers or special keys perhaps? uinput is imported in /etc/modules, I've set up the udev rule as specified in the tutorial and looked around but I don't know what's wrong...

I'm using the retropie build of raspbian (which I can't link because my rep is too low), so perhaps something has changed there - but the code doesn't work even when EmulationStation isn't actually running (i.e. in the console). I can use the joystick exactly as I would use the arrows, and the "control" button binding works, but no other keys work...

Any help would be much appreciated, I'm rather worried that my project won't work :(

  • Hello and welcome. Feel free to provide additional links as comment to be included by other users... or just edit the question to add once you've gained enough rep. – Ghanima Oct 20 '15 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.