Default input for keyboards
-
Hi,
I am pulling my hair out over default and global configurations in retroarch for retropie.
I am using a picade board which acts like a keyboard to the pi. The problem is I am unable to configure in one place the input mapping for this "keyboard".
If I edit retroarch.cfg in the configs/all folder it makes no difference to the individual emulators. If I manually edit the retroarch.cfg in the configs/<emulator_name> folder I can sort the mappings out.
I really don't want to do that for every emulator and I swear this kind of functionality used to exist in retroarch.
So I tried deleting the retroarch.cfg in each emulator config folder and on next execution it rebuilds it, but from where?? I have scoured the whole retropie folder structure and any place I have found what looks like a default config I have made my mapping changes. If I delete emulator specific config again, it rebuilds again, but magically defaults to something else internally.
Am I missing something blatant or do I really have to configure each emulator by hand??
Any help is appreciated or insight into how retroarch does this rebuilding.
-
@vultrix said in Default input for keyboards:
Am I missing something blatant or do I really have to configure each emulator by hand??
Configure your keyboard as input in Emulationstation and it will be automatically configured for all RetroArch based emulators. You probably messed some of the configuration files already by erasing/generating them.
-
Sorry, meant to say that I already tried that. Emulation Station isn't updating the retroarch.cfg files at all.
-
The auto-configuration from Emulationstation does not modify any
retroarch.cfg
files, instead it creates an auto-configuration for the gamepad in/opt/retropie/configs/all/retroarch-joypads
, from where it's loaded by any core.
In your case, it seems the keyboard mapping is not saved in that folder, so you'll have to manually create your mapping. The default mapping is described at https://www.libretro.com/index.php/getting-started-with-retroarch/, where you can also see how you can map your keyboard. Use theRetroArch
entry in the RetroPie system to start RetroArch without any core loaded to do this configuration, then save it. -
@mitu for a keyboard the input configuration edits the global retroarch.cfg.
If that's not happening then it's likely the XML config to trigger the auto configuration has been removed from the emulation station folder (es_input.cfg).
As user has been removing default configs best bet is for them to start with a fresh image imho.
-
This is default es_input.cfg
<?xml version="1.0"?> <inputList> <inputAction type="onfinish"> <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command> </inputAction> </inputList>
-
@cyperghost I'm using something similar (keyboard input) and ES does update my retroarch.cfg file. Here is part of my es_input.cfg. I think this only setup Player1 configs in retroarch.cfg and I had to manually setup the P2 keyboard controls.
<?xml version="1.0"?> <inputList> <inputConfig type="keyboard" deviceName="Keyboard" deviceGUID="-1"> <input name="a" type="key" id="1073742048" value="1"/> <input name="b" type="key" id="1073742050" value="1"/> <input name="down" type="key" id="1073741905" value="1"/> <input name="left" type="key" id="1073741904" value="1"/> <input name="lefttrigger" type="key" id="122" value="1"/> <input name="right" type="key" id="1073741903" value="1"/> <input name="righttrigger" type="key" id="120" value="1"/> <input name="select" type="key" id="53" value="1"/> <input name="start" type="key" id="49" value="1"/> <input name="up" type="key" id="1073741906" value="1"/> <input name="x" type="key" id="32" value="1"/> <input name="y" type="key" id="1073742049" value="1"/> </inputConfig> <inputAction type="onfinish"> <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command> </inputAction> </inputList>
-
Also, because it took me a while to find it out and it might save you some time - the ID you need is a decimal value of the SDL keyboard ID.
-
@stoney66 Can't advise from just part of the config - it needs to contain the bits @cyperghost mentioned above.
-
@stoney66 I don't know as I do not use keyboards. But the command in es_input.cfg automatically setups the config for retroarchs joypad. This has nothing to do with retroarch.cfg at all. The path for retorarch auto config joypads is
/opt/retropie/configs/all/retroarch-joypads/
and will be build out of es_input.cfg file due the command I've posted above.@BuZz yes, thank you
-
@BuZz sorry I put whole file there now, I was just showing the main poster that I have keyboard values in this file. My setup works fine.
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.