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

    EmulationStation - Rebinding the Hotkey as the Random Game ES button

    Scheduled Pinned Locked Moved Help and Support
    hotkey4.8rpi3b+keybindrandom game
    6 Posts 3 Posters 1.0k 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.
    • sLyc3S
      sLyc3
      last edited by sLyc3

      Raspbery Pi 3b+
      Retropie Version 4.8
      Official Image

      Hey all.

      I'm building a Neo-Geo inspired 2Player bartop arcade system. This is to be a dedicated coin operated semi-public use machine. So - the design from the start was to have a large central red RANDOM button that would select a random game for the user, since I saw ES has that functionality by default. (I'm using 2 Ali-Express ordered USB encoders)

      > Project Gallery Link< (unfinished)

      The problem - I can't seem to find a way to rebind the X key functionality (the X button randoms by default) to the Hotkey button instead.
      I also want to keep all the functionality INGAME (once a core is running) as is.

      I've checked config files, such as
      \configs\all\emulationstation\es_input.cfg

      but had no luck, as the hotkey button doesn't appear to be listed in it.

      <?xml version="1.0"?>
      <inputList>
        <inputAction type="onfinish">
          <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
        </inputAction>
        <inputConfig type="keyboard" deviceName="Keyboard" deviceGUID="-1">
          <input name="rightanalogup" type="key" id="1073741920" value="1"/>
          <input name="pageup" type="key" id="113" value="1"/>
          <input name="rightanalogdown" type="key" id="1073741914" value="1"/>
          <input name="up" type="key" id="1073741906" value="1"/>
          <input name="left" type="key" id="1073741904" value="1"/>
          <input name="select" type="key" id="1073742053" value="1"/>
          <input name="rightanalogleft" type="key" id="1073741916" value="1"/>
          <input name="leftanalogdown" type="key" id="107" value="1"/>
          <input name="leftanalogright" type="key" id="108" value="1"/>
          <input name="right" type="key" id="1073741903" value="1"/>
          <input name="leftanalogleft" type="key" id="106" value="1"/>
          <input name="rightanalogright" type="key" id="1073741918" value="1"/>
          <input name="pagedown" type="key" id="119" value="1"/>
          <input name="leftanalogup" type="key" id="105" value="1"/>
          <input name="y" type="key" id="122" value="1"/>
          <input name="x" type="key" id="97" value="1"/>
          <input name="down" type="key" id="1073741905" value="1"/>
          <input name="start" type="key" id="13" value="1"/>
          <input name="b" type="key" id="120" value="1"/>
          <input name="a" type="key" id="115" value="1"/>
        </inputConfig>
        <inputConfig type="joystick" deviceName="DragonRise Inc.   Generic   USB  Joystick  " deviceGUID="03000000790000000600000010010000">
          <input name="pageup" type="button" id="6" value="1"/>
          <input name="up" type="axis" id="1" value="-1"/>
          <input name="left" type="axis" id="0" value="-1"/>
          <input name="select" type="button" id="3" value="1"/>
          <input name="right" type="axis" id="0" value="1"/>
          <input name="pagedown" type="button" id="7" value="1"/>
          <input name="y" type="button" id="10" value="1"/>
          <input name="x" type="button" id="8" value="1"/>
          <input name="down" type="axis" id="1" value="1"/>
          <input name="start" type="button" id="2" value="1"/>
          <input name="b" type="button" id="9" value="1"/>
          <input name="a" type="button" id="11" value="1"/>
        </inputConfig>
      </inputList>
      

      I've read quite a few forum posts and websites by now with little luck, so I'm posting here.
      Any help would be appreciated!

      sLyc3S LolonoisL 2 Replies Last reply Reply Quote 0
      • sLyc3S
        sLyc3 @sLyc3
        last edited by

        No good anwser huh?

        I've been looking at claims that the only way to rebind some of the hotkey is to edit and recompile from source. Any truth to that, and how would one go about doing so?

        S 1 Reply Last reply Reply Quote 0
        • S
          sleve_mcdichael @sLyc3
          last edited by sleve_mcdichael

          @sLyc3 essentially, you want to swap the "Select" and "X" buttons' functionality, only in ES and nowhere else, yeah?

          What I would try is go into ~/.emulationstation/es_input.cfg and in the section that's for the controller you are using (there might be more than one), swap the id values of those two functions. For example if your "big red button" is (edited because I see you have posted your actual file contents) button 3 which is usually "select (screensaver)" but you want it to be "X (random)" instead, (which is currently "button 8"), then you would change:

          <input name="select" type="button" id="3" value="1"/>
          <input name="x" type="button" id="8" value="1"/>
          

          ...to:

          <input name="select" type="button" id="8" value="1"/>
          <input name="x" type="button" id="3" value="1"/>
          
          sLyc3S 1 Reply Last reply Reply Quote 1
          • LolonoisL
            Lolonois @sLyc3
            last edited by

            @sLyc3 said in EmulationStation - Rebinding the Hotkey as the Random Game ES button:

            This is to be a dedicated coin operated semi-public use machine.

            Be aware that FBNeo and MAME 2003 and all libretro implementations, just to name a few, prohibit commercial use of their products. I would seek for approval of those parties, and then still the copyright of the ROMs you deploy could be a legal issue.

            sLyc3S 1 Reply Last reply Reply Quote 0
            • sLyc3S
              sLyc3 @Lolonois
              last edited by

              @sleve_mcdichael

              Thank you, but that swaps the "select" and "x" buttons, I need to swap the HOTKEY and X buttons. The hotkey button doesn't appear to be listed in the CFG however, and I worry its system-hardcoded.

              @Lolonois

              Thanks for the warning. I am aware. What I meant was "I will bring this to private parties, but won't always be around to supervise and help out with the machine." Hence the semi-public part. I'm not renting this out, selling it, and while there are functional coin slots on the machine their use will be optional.
              From the use case you can see however - the arcade needs to be as straight forward as possible to use, hence, big red button = random game, and also the system hotkey.

              1 Reply Last reply Reply Quote 0
              • sLyc3S
                sLyc3 @sleve_mcdichael
                last edited by

                @sleve_mcdichael

                Hey. Figured it out. The answer was more or less staring me in the face.
                In the "es_temporaryinput.cfg" there was a line for the hotkey, which I more or less copied.

                <input name="hotkeyenable" type="button" id="8" value="1" />
                <input name="x" type="button" id="0" value="1"/>
                

                This is my solution. From what I've tested this hasn't messed up anything else even though it does share the
                id="0" with one of the axis entries.

                Thanks for the input. You can consider this topic "solved".

                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.