Changing default hotkey mapping in EmulationStation
-
Hey there. Currently using RetroPie 2.11.0RP on Raspbian Buster; I built the image using the default RetroPie site image/builder. Install is currently on a Raspberry Pi 3B.
I'd like to inquire about changing how EmulationStation maps inputs, and how those get passed along to RetroArch. Right now, every time you map a controller, the shoulder buttons are assigned to Save and Load states, respectively. I'd like to map them to other things.
From what I've been able to find so far, I can modify
~/RetroPie-Setup/scriptmodules/supplementary/emulationstation/configscripts/retroarch.sh
, specifically the lines in thefunction map_retroarch_joystick()
section, to add things likeinput_rewind
to a key.In theory, when I then reboot EmulationStation after I save the edited file, and remap my controller, it should have these bindings. However, it doesn't; when in a game in RetroArch, the bindings don't work. If I set them manually from the Settings > Input > Hotkeys menu in RetroArch, they do.
Is this because I've changed my default folder for controller profiles in RetroArch? From what I understand, the config script would pass the input file generated to where RetroArch has the directory anyway.
If that isn't the case, do I have to change where EmulationStation "looks" for the directory to save it? Currently, a CFG is being added to
/opt/retropie/configs/all/retroarch-joypads
when I generate it from EmulationStation, but the updates I made to the script above don't get added to that input. I'm referencing this thread on Github for info.I'm also realizing it's probably a better option to just hand-craft input files for my controllers and make sure RetroArch is using them, but I have a large amount of controllers that I cycle through by preference, and it'd be nice if configuring them for the EmulationStation frontend would also add the hotkeys I'd like for RetroArch.
Adding more info, it looks like RA is taking configs from
/opt/retropie/configs/all/retroarch-joypads
, not the directory I've set in RGUI. I think this is by design? Is there any way to change that?Thanks for your time.
-
@BlDesperado said in Changing default hotkey mapping in EmulationStation:
If that isn't the case, do I have to change where EmulationStation "looks" for the directory to save it? Currently, a CFG is being added to /opt/retropie/configs/all/retroarch-joypads when I generate it from EmulationStation, but the updates I made to the script above don't get added to that input. I'm referencing this thread on Github for info.
You've modified the source of the script, which is part of the
emulationstation
package, but you haven't 'installed' the script by installing the modified package. EmulationStation's input mapping script looks in/opt/retropie/supplementary/emulationstation/scripts/configscripts
.I'm also realizing it's probably a better option to just hand-craft input files for my controllers and make sure RetroArch is using them, but I have a large amount of controllers that I cycle through by preference, and it'd be nice if configuring them for the EmulationStation frontend would also add the hotkeys I'd like for RetroArch.
Yes, there is - configure each joystick in order to generate the RetroArch profile, then modify the profile. You don't need to run the input configuration every time you change the controller, any previously configured controller will work when plugged back in.
Adding more info, it looks like RA is taking configs from /opt/retropie/configs/all/retroarch-joypads, not the directory I've set in RGUI. I think this is by design? Is there any way to change that?
Not sure which new directory you've set, RetroArch's joypad profile configuration path is not changed in RetroPie, the
/opt/retropie/configs/all/retroarch-joypads
is just a symlink to RetroArch's default. Of course, changing it would probably break the auto-configuration scripts in EmulationStation, so YMMV. -
@mitu said in Changing default hotkey mapping in EmulationStation:
Not sure which new directory you've set, RetroArch's joypad profile configuration path is not changed in RetroPie, the /opt/retropie/configs/all/retroarch-joypads is just a symlink to RetroArch's default. Of course, changing it would probably break the auto-configuration scripts in EmulationStation, so YMMV.
Ah, makes sense, thank you. Didn't know it was a symlink.
You've modified the source of the script, which is part of the emulationstation package, but you haven't 'installed' the script by installing the modified package. EmulationStation's input mapping script looks in /opt/retropie/supplementary/emulationstation/scripts/configscripts.
Would I do this by rebooting, or restarting emulationstation? If it's more complicated I'll kinda abandon this.
Yes, there is - configure each joystick in order to generate the RetroArch profile, then modify the profile. You don't need to run the input configuration every time you change the controller, any previously configured controller will work when plugged back in.
Yeah, totally, I'm aware of this. This might just be one of those "I'm trying to optimize too hard," because I guess I can just copy/paste parts of the config files once they're generated.
-
@BlDesperado said in Changing default hotkey mapping in EmulationStation:
You've modified the source of the script, which is part of the emulationstation package, but you haven't 'installed' the script by installing the modified package. EmulationStation's input mapping script looks in /opt/retropie/supplementary/emulationstation/scripts/configscripts.
Would I do this by rebooting, or restarting emulationstation? If it's more complicated I'll kinda abandon this.
No, you'll have to 'install' the package from RetroPie-Setup - https://retropie.org.uk/docs/Updating-RetroPie/#updatinginstalling-individual-packages. This will apply the source modifications to the installed package.
NOTE: I don't recommend this approach, since an EmulationStation update may overwrite your modifications. If you want to keep your own modified controller profiles, just generate them, modify them to your liking. You can also disable the EmulationStation auto-configuration from the RetroPie-Setup script, by going to
Configuration/Tools -> emulationstation
and toggling the auto-configuration off, so your profiles won't get overwritten accidentally by configuring the input in EmulationStation. -
@mitu said in Changing default hotkey mapping in EmulationStation:
@BlDesperado said in Changing default hotkey mapping in EmulationStation:
You've modified the source of the script, which is part of the emulationstation package, but you haven't 'installed' the script by installing the modified package. EmulationStation's input mapping script looks in /opt/retropie/supplementary/emulationstation/scripts/configscripts.
Would I do this by rebooting, or restarting emulationstation? If it's more complicated I'll kinda abandon this.
No, you'll have to 'install' the package from RetroPie-Setup - https://retropie.org.uk/docs/Updating-RetroPie/#updatinginstalling-individual-packages. This will apply the source modifications to the installed package.
NOTE: I don't recommend this approach, since an EmulationStation update may overwrite your modifications. If you want to keep your own modified controller profiles, just generate them, modify them to your liking. You can also disable the EmulationStation auto-configuration from the RetroPie-Setup script, by going to
Configuration/Tools -> emulationstation
and toggling the auto-configuration off, so your profiles won't get overwritten accidentally by configuring the input in EmulationStation.Good to know, thank you. Consider this closed.
As a side note, I've used RetroPie for years and constantly am thankful to see your Mega Man avatar while I'm looking for support threads. Thanks for all the work you do, even if we sometimes forget to post our logs ;)
-
Thank you for the kind words.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.