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

    Mapping a keypress to a joystick (Fuse/others)

    Scheduled Pinned Locked Moved Help and Support
    controlsmappingfuseretroarchkeyboard
    14 Posts 4 Posters 2.4k 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.
    • S
      SpudsMcToole Banned @mediamogul
      last edited by

      @mediamogul Ha, I forgot to include my standard "please don't mention the absolutely terrifying xboxdrv" disclaimer :D

      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @SpudsMcToole
        last edited by

        @spudsmctoole

        Understandable. I might be confusing you with someone else I've spoken to in the past, but I thought I remembered you being pretty proficient with it. The learning curve can indeed be pretty steep.

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        S 1 Reply Last reply Reply Quote 0
        • S
          SpudsMcToole Banned @mediamogul
          last edited by

          @mediamogul No, that definitely wasn't me :D

          S 1 Reply Last reply Reply Quote 0
          • S
            SpudsMcToole Banned @SpudsMcToole
            last edited by

            @spudsmctoole So I guess from the lack of answers (and going by similar previous threads), this is a thing that basically just can't be done. What a weird thing to omit in a platform as endlessly configurable as Retropie/Retroarch - you'd think mapping controls to buttons would be the first thing anyone would ever want to do. Oh well, thanks for the replies anyway.

            S mediamogulM 2 Replies Last reply Reply Quote 0
            • S
              spud11 @SpudsMcToole
              last edited by

              @spudsmctoole @mediamogul It was me, I reckon!

              RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

              S mediamogulM 2 Replies Last reply Reply Quote 2
              • S
                SpudsMcToole Banned @spud11
                last edited by

                @spud11 What? We look NOTHING alike! :D

                1 Reply Last reply Reply Quote 1
                • mediamogulM
                  mediamogul Global Moderator @spud11
                  last edited by mediamogul

                  @spud11 said in Mapping a keypress to a joystick (Fuse/others):

                  It was me, I reckon!

                  Hey, there you are! I was about to chalk you up to a hallucination, or the Mandela effect. I'm working on solving a few big things with xboxdrv right now. First, is allowing control of the Runcommand menu on launch, which only needs a little more testing. Second is much bigger and involves getting the exec mapping command to work in xboxdrv when executed as root.

                  This would open the door for a million use cases, as it could launch any bash script from a button command. Two examples off hand are universal screen shot capabilities using Raspi2PNG and the ability change your entire controller mapping on the fly with a simple button press or combo. The latter could be put to great use for changing a joystick from digital to analog on the fly, or 8-way direction to 4-way restricted. In effect, one map that called two others could be used universally throughout the entire MAME library. Keen stuff.

                  RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                  S 1 Reply Last reply Reply Quote 0
                  • mediamogulM
                    mediamogul Global Moderator @SpudsMcToole
                    last edited by mediamogul

                    @spudsmctoole said in Mapping a keypress to a joystick (Fuse/others):

                    you'd think mapping controls to buttons would be the first thing anyone would ever want to do.

                    When I was setting up RetroPie for the first time, this was exactly the problem I ran into over and over. I had six other emulation rigs on various platforms prior to this and was used to a level of control over input that I wasn't finding in RetroPie as a whole. This is not the fault of the RetroPie project itself mind you. It's simply a side-effect of having the option to run so many different software solutions in one package. Rather than throw my hands up and admit defeat, I sought out external mapping solutions, which ultimately led me to xboxdrv.

                    Since there were no guides available at the time, it took me THREE MONTHS of on and off experimenting to come up with a work flow that would mesh with RetroPie. I've heard you mention several times about being "terrified" at learning various control schemes, but I think you're expecting that you should understand it all immediately and that can indeed be terrifying. Why not start small and just work on this one issue as you have time. The success and failures you have will in-turn give you the knowledge to solve other issues that might arise.

                    So I guess from the lack of answers... this is a thing that basically just can't be done.

                    @dudleydes gave you a software alternative for ZX Spectrum emulation that has mapping capabilities and I offered a solution that can be used universally. However, both might depend on exactly what kind of joystick you're using. If you could post the model, it might help.

                    RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                    1 Reply Last reply Reply Quote 0
                    • S
                      spud11 @mediamogul
                      last edited by

                      @mediamogul That would be very useful. My runcommand-onstart file is now 113Kb in size, but I've found it has to be devoted purely to xboxdrv and case $2. If I try to add anything else to it with more general application like trying to invoke a bash script unrelated to xboxdrv, runcommand-onstart just doesn't work.

                      Also, because I'm using $2, it's got to the point where I've found myself regularly having to copy binaries like advmame, rename them to something else like "cocktail" (for vertical/cocktail oriented games) and then create a whole new xboxdrv command in runcommand-onstart just to cater for those roms.

                      It would be handy to have a bit more flexibility in runcommand-onstart indeed.

                      RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                      mediamogulM 1 Reply Last reply Reply Quote 0
                      • mediamogulM
                        mediamogul Global Moderator @spud11
                        last edited by mediamogul

                        @spud11 said in Mapping a keypress to a joystick (Fuse/others):

                        My runcommand-onstart file is now 113Kb in size, but I've found it has to be devoted purely to xboxdrv and case $2. If I try to add anything else to it with more general application like trying to invoke a bash script unrelated to xboxdrv, runcommand-onstart just doesn't work.

                        I run 26 systems that make use of xboxdrv, sometimes having several dozen exceptions made for individual games. I've managed to keep the size of my runcommand-onstart.sh down to 39.9k by offloading the execution of xboxdrv itself to separate scripts. All the if/then stuff is still there, but once the conditions are met, it launches an outside script with the xboxdrv command. That may help to alleviate your situation.

                        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                        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.