GPIO keyboard integration with Retropie #32
-
Hello, I just came across this project and I'm trying to test it out. Very cool stuff! I have a question about getting the GPIO keyboard input working. I followed the instructions and now I'm looking at a game demo I downloaded running on my RPi3 but none of my controls will respond to it. I have an Arduino which is using a USB HID library to act as a gamepad that I've configured in Retropie to correspond to various gamepad inputs. I can see when I set the GPIO keyboard to this Arduino, it consumes all the input, but none of the buttons are causing a reaction and I can't open the Retropie menu to exit out of the game.
Thanks for your attention! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I'm back with an update, in case anyone sees this and is wondering what a solution might be. Some things I've learned: a) the issue in point 1 of the previous post was mentioned in the release notes for 1.7.0:
I've confirmed that using shift enter on the keyboard will exit the godot emulator. Unfortunately, I was not able to do this with my game controller nor with a PS4 controller (assuming Share and Options pressed together was start + select. I tried a few other combinations too). I did a cursory search through the frt source for the latest (1.0.0 at the time of this writing) release, but I was not able to find any code that handled joypad exit. I was not able to understand the code very deeply, so I could have just missed this, but the keyboard input handler in the main run() function had a shiftenter exit method but the joypad handling just called an external linux library to process_joypads() but did not look specifically for a special key combination that would trigger an exit. This could be build into the X11 joypadlinux library, but I have no idea. b) I was able to get controller support from my game by fiddling with the project input map settings and binding joystick buttons and axes to my input actions. I made sure to use device 0 and the correct button numbers even though the development machine did not have the hardware on the running machine. If you are using a non-standard controller trying to play random godot games you don't have source code to, I think you are completely out of luck at this point. :( c) To solve the exit problem for myself, I could just add a bit of code in my specific godot game to listen for a key combination on my controller and exit the program if it was pressed. Again, this would not apply for a blanket solution for games that you don't have source code access to. |
Beta Was this translation helpful? Give feedback.
Hi, I'm back with an update, in case anyone sees this and is wondering what a solution might be. Some things I've learned:
a) the issue in point 1 of the previous post was mentioned in the release notes for 1.7.0:
I've confirmed that using shift enter on the keyboard will exit the godot emulator. Unfortunately, I was not able to do this with my game controller nor with a PS4 controller (assuming Share and Options pressed together was start + select. I tried a few other combinations too).
I did a cursory search through the frt…