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

    Map any key to a button

    Scheduled Pinned Locked Moved Help and Support
    map key button
    9 Posts 3 Posters 3.6k 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.
    • I
      iwanttobefreak
      last edited by

      Hi!
      I want to map any key to a button. It's possible?
      I know with retroarch you can map specific actions, but I can't found how to map any key.
      For example, in Livingstone Supongo for Amstrad to change weapon is the key 1,2,3 and 4.
      Can I map to a button?
      I have Xin Mo controller with joystick and buttons and a 8bitdo gamepad

      Thanks!

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Please add more info about your system, as requested in the https://retropie.org.uk/forum/topic/3/read-this-first topic.
        What emulator are you using ?

        1 Reply Last reply Reply Quote 0
        • I
          iwanttobefreak
          last edited by

          Excuse me, I'm using a raspberry pi 3 with retropie 4.4
          Thanks

          1 Reply Last reply Reply Quote 0
          • ClydeC
            Clyde
            last edited by

            That is not the full information that is asked for in @mitu's link. Please add the rest.

            1 Reply Last reply Reply Quote 0
            • I
              iwanttobefreak
              last edited by

              Pi Model or other hardware: 3
              Power Supply used: 5v 2A
              RetroPie Version Used : 4.4
              Built From: retropie-4.4-rpi2_rpi3.img
              USB Devices connected: tried with usb keyboard, EG start controller and XIN MO 2 players
              Controller used: tried with usb keyboard, EG start controller and XIN MO 2 players
              Error messages received: No errors, I don't know how to configure
              Log found in /dev/shm/runcommand.log (if relevant): N/A
              Guide used: (Mention if you followed a guide) N/A
              File: (File with issue - with FULL path) N/A
              Emulator: (Name of emulator - if applicable) emulestation (inluded with retropie)
              Attachment of config files: (PLEASE USE PASTEBIN.COM FOR LARGE LOGS) No config
              How to replicate the problem:
              I want to use key 1 in a button for a specific game

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @iwanttobefreak
                last edited by

                @iwanttobefreak said in Map any key to a button:

                Emulator: (Name of emulator - if applicable) emulestation (inluded with retropie)

                Emulationstation is just the front-end (launcher), the emulator depends on the game you're starting. Anyway, when in-game, press Select + X and this should bring up the RetroArch GUI, which has a controls/input section. Use that section to re-map your button to your liking and then save is as a Game or Core remap (see here). This should work for most RetroArch based emulators, (such as lr-caprice for Amstrad), individual emulators may have their own control configuration menu or configuration file.

                1 Reply Last reply Reply Quote 0
                • I
                  iwanttobefreak
                  last edited by iwanttobefreak

                  Thanks for response.
                  I use lr-caprice32 for Amstrad. With Retroarch I only can map buttons A,B,X,Y. I play Livingstone Supongo with keyboard, with key numbers 1,2,3 and 4 I select weapon. How Can I map this keys of keyboard to a button?
                  Thanks

                  1 Reply Last reply Reply Quote 0
                  • I
                    iwanttobefreak
                    last edited by

                    Hello, finally I found the solution.
                    In retroarch select Amstrad Keyboard for device type
                    alt text
                    Now you can map keys to a button, In my case, start for key space, button X to keyboard 1, button Y to Keyboard 3.....
                    In retroarch:
                    alt text
                    Auto: 4 -> Keyboard 2
                    Auto: 7 -> Keyboard Space
                    Auto: 3 -> Keyboard 1
                    Auto: 5 -> Keyboard 3
                    Auto: 2 -> Keyboard 4

                    The file of map with ASCII code of the key and 259 of type of Amstrad Keyboard:
                    /opt/retropie/configs/amstradcpc/cap32/livingstone.rmp

                    input_player1_key_y = "50"
                    input_player1_key_start = "32"
                    input_player1_key_x = "49"
                    input_player1_key_l = "51"
                    input_player1_key_r = "52"
                    input_libretro_device_p1 = "259"

                    Thank you!!

                    mituM 1 Reply Last reply Reply Quote 2
                    • mituM
                      mitu Global Moderator @iwanttobefreak
                      last edited by

                      @iwanttobefreak Thank you for adding the solution.

                      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.