RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Accidentally changed button mapping?

    Scheduled Pinned Locked Moved Help and Support
    button mapping
    14 Posts 4 Posters 5.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      backstander @Brewskii
      last edited by backstander

      @Brewskii
      That information is stored in this file:
      /opt/retropie/configs/all/retroarch.cfg

      You'll what to see what input_enable_hotkey_btn and input_exit_emulator_btn are set to.

      For example, I have an Xbox 360 controller and I'm using the xpad driver and here's what I've got:

      # Hotkey button
      input_enable_hotkey_btn = 8 #Select
      # Exit emulator
      input_exit_emulator_btn = 9 #Start
      
      B 1 Reply Last reply Reply Quote 0
      • B
        backstander @Brewskii
        last edited by

        @Brewskii

        Another option DO THIS AT YOUR OWN RISK AND MAKE A BACKUP OF THE FILE FIRST!!!
        is to just delete (or move somewhere else) the /opt/retropie/configs/all/retroarch.cfg file and the next time you load up a RetroArch emulator, it will recreated it with the default settings.

        meleuM 1 Reply Last reply Reply Quote 0
        • B
          Brewskii @backstander
          last edited by

          @backstander Adding the 2 lines (in my case 10 and 11) to the retroarch.cfg file did the trick! Thanks!

          1 Reply Last reply Reply Quote 1
          • meleuM
            meleu @backstander
            last edited by

            @backstander said in Accidentally changed button mapping?:

            delete (or move somewhere else) the /opt/retropie/configs/all/retroarch.cfg file and the next time you load up a RetroArch emulator, it will recreated it with the default settings.

            I'm afraid it's not true. Or saying it better, the recreated file will get the RetroArch default settings, not the RetroPie default settings. And they have some differences.

            I think the best option is to check if you have the file /opt/retropie/configs/all/retroarch.cfg.rp-dist(this is the RetroPie default settings), and then rename it to retroarch.cfg.

            @Brewskii are you using the "Save Config on Exit" option turned on?

            • Useful topics
            • joystick-selection tool
            • rpie-art tool
            • achievements I made
            B 1 Reply Last reply Reply Quote 1
            • B
              Brewskii @meleu
              last edited by

              @meleu I'm not sure where that option is, (In the RetroArch menu?). However editing the /opt/retropie/configs/all/retroarch.cfg file and adding the input_hotkey_btn and input_exit_emulator_btn assigning the appropriate button numbers worked for me.

              meleuM 1 Reply Last reply Reply Quote 0
              • meleuM
                meleu @Brewskii
                last edited by

                @Brewskii said in Accidentally changed button mapping?:

                editing the /opt/retropie/configs/all/retroarch.cfg file and adding the input_hotkey_btn and input_exit_emulator_btn assigning the appropriate button numbers worked for me.

                If you are happy, then cool, why bother? :-) But I can predict some confusing situations you can face with this approach. Example: if you plug another controllers, from other manufacturer, the button numbers can differ.

                Look if your /opt/retropie/configs/all/retroarch.cfg has the following two configs (I intentionally kept the comments to let you know the config's function):

                # Enable input auto-detection. Will attempt to autoconfigure
                # joypads, Plug-and-Play style.
                input_autodetect_enable = "true"
                
                # Directory for joypad autoconfigs.
                # If a joypad is plugged in, that joypad will be autoconfigured if a config file
                # corresponding to that joypad is present in joypad_autoconfig_dir.
                # Input binds which are made explicit (input_playerN_*_btn/axis) will take priority over autoconfigs.
                # Autoconfigs can be created with retroarch-joyconfig, manually, or with a frontend.
                # Requires input_autodetect_enable to be enabled.
                joypad_autoconfig_dir = "/opt/retropie/configs/all/retroarch-joypads/"
                

                As you can see, if input_autodetect_enable = "true" the retroarch tries to find your controller specific config in the directory setted in joypad_autoconfig_dir. So you should set the configs that @backstander said in the controller specific file stored at /opt/retropie/configs/all/retroarch-joypads/.

                • Useful topics
                • joystick-selection tool
                • rpie-art tool
                • achievements I made
                B P 2 Replies Last reply Reply Quote 1
                • B
                  Brewskii @meleu
                  last edited by

                  @meleu Thanks, I'll check that out tonight! I hadn't thought about multiple controllers on the system.

                  1 Reply Last reply Reply Quote 0
                  • P
                    pirossi @meleu
                    last edited by pirossi

                    @meleu
                    I have set up 3 different game controls in
                    / opt / retropie / configs / all / retroarch-joypads /

                    1 ps3 controller an arcade machine joystick and a snes controller

                    they did not work, and delete the assignment of the hotkeys in retroarch.cfg to: "nul" to disable them, because I wanted it to take me the configuration of:
                    / opt / retropie / configs / all / retroarch-joypads / bla bla.cfg

                    then it works!

                    then change the assignment of a hotkey for the save function, again in:
                    / opt / retropie / configs / all / retroarch-joypads / blah blah.cfg ..

                    and start the problem
                    it seems that it takes the configuration of hotkey of some other side,
                    not from: / opt / retropie / configs / all / retroarch-joypads /

                    inside the game I work well the controls, except the hotkeys.

                    now all misfits hotkeys in play, the game controls instead work fine.

                    I have looked / opt / retropie / configs / all / retroarch-joypads /
                    and all gamepads and hotkeys are fine

                    that could be happening?

                    is taking hotkeys configuration from somewhere else?

                    if I put autoconfig as I commented above, every time you unplug a controller and connect another different self-configure itself?
                    or only one configuration remains.
                     the gamepad sometimes connect one, other times 2 at a time and other times 3, I'm not interested in leaving a specific order, I want to always take the configuration of
                    / opt / retropie / configs / all / retroarch-joypads /
                    of de connected controller.cfg

                    1 Reply Last reply Reply Quote 0
                    • P
                      pirossi
                      last edited by pirossi

                      solved!!!!
                      was giving me problems within the ps3 games, any game controller.
                      today I have tried and researched more thoroughly.
                      edit the controls remove assignment: putting 'nul' in opt / retropie / configs / all / retroarch.cfg
                      I also found residual controls in / opt / retropie / configs / psx/retroarch.cfg
                      also cancel them by putting: 'nul'

                      once removed the residual allocations of the controls in the retroarch files everything works like a shot!

                      sure that is of help for more than one person.

                      now I have only assigned the controls of each command and each hotkey in
                      /opt/retropie/configs/all/retroarch-joypads/MYgamepad.cfg

                      I can put the game controller I want whenever I want , it works perfectly. I have configured 2 wirelless ps3, 2 snes usb, and 2 control panel with joystick.
                      they work all !!! all at once (4 controllers simultaneously, I have not tried more)
                      or disconnecting one and putting another! whenever I want

                      when I unplug all and put another game command, it works perfectly with the configuration of / opt / retropie / configs / all / retroarch-joypads /

                      very happy!

                      meleuM 1 Reply Last reply Reply Quote 1
                      • meleuM
                        meleu @pirossi
                        last edited by

                        @pirossi glad to know you sorted it by yourself!

                        By the way, if you want the default retroarch.cfg files, they usually are named retroarch.cfg.rp-dist.

                        Cheers!

                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        1 Reply Last reply Reply Quote 0
                        • P
                          pirossi
                          last edited by

                          @meleu said in Accidentally changed button mapping?:

                          @pirossi glad to know you sorted it by yourself!
                          By the way, if you want the default retroarch.cfg files, they usually are named retroarch.cfg.rp-dist.
                          Cheers!

                          Thanks for the information, it is very useful to know, if I have succeeded is thanks to comments like yours, each one brings some and so we are going up the mountain
                          then we help those who are down with our experience to others to climb.
                          very grateful for the contributions

                          meleuM 1 Reply Last reply Reply Quote 0
                          • meleuM
                            meleu @pirossi
                            last edited by

                            @pirossi haha. Good metaphor! ;-)

                            • Useful topics
                            • joystick-selection tool
                            • rpie-art tool
                            • achievements I made
                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post

                            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.