I followed the retroarch mega thread and I can navigate the retroarch menu no problem. But when I try and change controls and it asks me to press the button I want the new bind to be no input registers. I have been kicking myself over and over and can not figure this out. Any help would be greatly appreciated.
Welcome to the forums friend!
I think in the current version of the gameshell OS something is broken with binding keys in retroarch, so to get around this i did the following:
cd cd .config/retroarch sudo nano retroarch.cfg
then once you are in the new screen press CTRL + W and type
now you can see all the player1 bindings, look for the basics like A, B, X and Y then you can change the keys to be what you like.
once you are done editing press CTRL + X to exit and then yes or no to save.
These are the actual keys that the gameshell emulates with the keypad:
Wow awesome, this has been driving me crazy.
Where do you type all that? In SSH?
Anybody found how this issue can be fixed? I mean to fix editing it within retroarch. I understand that everything can be fixed through ssh but what is the point if you can’t do it on the fly?
As I only configured the bindings once, I didn’t mind doing it via SSH. I guess that’s something that would have to get fixed in RA, wouldn’t it?
If you’re talking about binding keys by selecting them, and trying to push the appropriate key, I think this is something to do with the arduino keyboard not technically being a HID device, but literally a keyboard. What’s strange is that in the menu, it still is referred to as a Retropad.
One “workaround” that I’ve been using is using the quick menu in RetroArch.
Assuming you’ve got a workable setup, and just want to remap keys;
- Load up a ROM that uses RetroArch, ie not a standalone emulator.
- Use your hotkey to enter the RetroArch menu. (shift + menu by default)
- You will be in the Quick Menu, which is different to the Main Menu. If not, hit your “back” button until you are at the root menu, then select it. Go to the bottom and select “CONTROLS” (You can completely customise this menu from “menu>settings>user interface>views>quick menu”)
- Go down the menu, and find the key you want to remap. Thankfully, you do this by scrolling left or right with the D-Pad; not the aforementioned key input/timeout method.
- Optional: Save the core remap file so that all games you use with the chosen emulator core will use the same key mapping. Eg, I prefer to set the “Y as B” and “B as A” for NES, GBA, GB etc. (Assuming you’re using SNES mapping)
- Alternatively you can also have it set on a per game basis. Great for some games that 100% require usage of the L/R light keys, but you prefer to keep your console slimline. I also have an alternative “90 degree” setup for when playing Gunbird on mame, where I have the screen in portrait orientation.
- As of 0.4, the included mame 2003 plus uses an analogue joystick input, and for the majority of games doesn’t work. We will need go change the control mapping to “digital”
- Enter the quick menu as mentioned above, and go into the “OPTIONS” for the mame core. If it’s not there, you’ll need go toggle it in the “user interface>views>quick menu” list.
- Change “control mapping” from analogue to digital. AFAIK, the majority of games in the 0.78 ROMset that mame 2003 plus uses doesn’t require an analogue stock, and get broken when analogue is enabled.
- I also changed the “input interface” to “simultaneous”
Re: retroarch keybind input problems/timeouts.
I decided to look into it.
Since the Gameshell treats the joystick as a keyboard, it would make sense to use an appropriate driver.
By default, the input driver that is selected is “X”, which I am assuming is X input. This is an appropriate input for a joystick, however given the nature of the arduino keyboard, this is not suitable.
Being the most recent and feature packed driver, featuring keyboard callback, mouse and touchpad compatibility, I decided to try using the udev driver.
The menu can be found here:
To allow Linux to capture keyboard inputs, you will need to add your user to the group “input” with the command:
sudo usermod -a -G input `whoami`
Reboot your system.
If it doesn’t work, you’ll need to make a udev rule to make the group “input” available to non root users.
Using your preferred editor, open up:
And add the following lines:
KERNEL=="event*", NAME="input/%k", MODE="666"
Save the file, and then reload your rules, by running:
sudo udevadm control --reload-rules
Reboot your system.
You should now be able to add and remove inputs completely via the retroarch interface, and not need to edit your retroarch.cfg file manually anywhere near as much.
All of the above and more can be found here:
@javelinface You are the best!!! This glitch was driving me crazy
No worries! Always happy to help out.
It still won’t work with opening up an onscreen keyboard, and using it for text input. That’s the ultimate goal, and what I was really hoping for. Will look into it ASAP!
Hopefully using udev, it will open possibilities to use the keyboard as a virtual mouse. I’m thinking SNES super scope games, scumm vm and other things requiring a mouse input. Hell. Even MAME, and analogue trackball games.
Theoretically, doing this should omit the need to do steps 7 - 10 of my previous post. I haven’t tested this theory out yet, so if anyone else wants to, that would be helpful to others! Otherwise I’ll probably have a look at it next weekend.
Edit: Had a bit more of a look at the input drivers. Changing to the sdl2 driver for input gives some response (While still allowing key input definition), in the sense that you can at least dismiss the onscreen keyboard. Previously an accidental push of the X button (SNES) would bring up a search dialogue box, and could only be dismissed by holding the power button to reset the device. The dpad however doesn’t move the cursor; instead giving ???’s. Using ABXY types out their respective keyboard designated letter.
All in all, I’d much rather use the more current udev drivers as mentioned above, and completely remove the OSK; onscreen keyboard.
Af the end of the day, the OSK is designed to be used with a joypad, in particular when not in the presence of a keyboard. We are using a keyboard, masquerading as a joypad. I’ll look into it more later.
Edit: update as of September 11 2019
I manually updated to 1.7.8, and a lot of the input timeout problems had been resolved, even being able to use the X-Input drivers. I discovered this, having done a complete overhaul of retroarch, including reconfiguring the configurations.
The existence of this working may or may not be directly tied to 1.7.8, as I have done a plethora of installations of dependencies and personal experimentation and modifications to my Gameshell.
Just putting this here for the sake of prosperity, in case someone tries to apply this in the future, and it’s not longer relevant. (And 1.7.8 has some pretty new new features, such as the AI server; taking a screenshot of your screen, uploading it to a server, having it analyse whatever language the text is in, and re uploading an overlay with your on the fly translation onto you screen! Can’t wait to try that out! Weekend here I come!)