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

    es_input.cfg key ID values

    Scheduled Pinned Locked Moved Help and Support
    gpioneeresinput.cfg
    11 Posts 5 Posters 6.5k 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.
    • G
      GeekDad66
      last edited by

      If I wanted to change one entry without having to redo the entire setup I can edit this file but the ID values are a complete unknown. If I use my wireless keyboard I get one set of values and if I use the GPIO pins (via GPioneer) I get another set. In particular I wanted to assign a GPIO combo which GPioneer supports but is rather difficult to do as part of setup.

      Is there a utility to determine the ID values of keys that are assigned within the
      es_input.cfg file?

      G BuZzB 2 Replies Last reply Reply Quote 0
      • G
        GeekDad66 @GeekDad66
        last edited by

        Does anyone know the ID values?

        TMNTturtlguyT 1 Reply Last reply Reply Quote 0
        • TMNTturtlguyT
          TMNTturtlguy @GeekDad66
          last edited by TMNTturtlguy

          @GeekDad66 you can run "evtest" you need to use an ssh like putty and type in: apt-get install evtest

          I am on my phone now but I think there are some videos on YouTube.

          G 1 Reply Last reply Reply Quote 0
          • G
            GeekDad66 @TMNTturtlguy
            last edited by

            @TMNTturtlguy Thanks for the reply. Just in case others are following, the command must be prefaced with sudo:

            sudo apt-get install evtest

            This does essentially what I was hoping but still does not relate back the values in the es_input.cfg file. For instance evtest returns

            Event: time 1494376356.898155, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
            Event: time 1494376356.898155, -------------- EV_SYN ------------
            Event: time 1494376357.019807, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0

            yet the es_input.cfg has an entry like:

            <input name="a" type="key" id="1073742048" value="1" />

            I was hoping to relate "1073742048" to a GPIO pin or pin combo.

            TMNTturtlguyT 1 Reply Last reply Reply Quote 0
            • TMNTturtlguyT
              TMNTturtlguy @GeekDad66
              last edited by

              @GeekDad66 can't you figure that out by looking at your wiring? If you hit a button, it gives you the id and input number, look at how you have it wired and write it all down?

              G 1 Reply Last reply Reply Quote 0
              • G
                GeekDad66 @TMNTturtlguy
                last edited by

                How do I equate something like:

                (EV_KEY), code 29 (KEY_LEFTCTRL)

                to:

                id="1073742048"

                TMNTturtlguyT 1 Reply Last reply Reply Quote 0
                • TMNTturtlguyT
                  TMNTturtlguy @GeekDad66
                  last edited by

                  @GeekDad66 since i don't know your controller or what exactly you did it appears that you had pushed 1 button in the event code above. you pushed a button that it is recognized as a keyboard stroke pushing the Left Ctrl button on your keyboard. This is being registered as button 29. value 1 is the down depression, value 0 is the button being released.

                  In the es_input.cfg, the top portion for keyboard strokes uses the key id as you suggested and the bottom for joystick uses the code number 29 for the same button press. What evetest has told you is that the way you have your button currently hooked up, it is reading it as the left control button on they keyboard.

                  Now i don't know if there is a better way to do this, but what i would do is write down what what pin number that button is wired to on your GPIO and then test another pin until you get the button where you want it as Left Ctrl does not currently do anything in retropie. Maybe someone else out there has a better solution. Did your gpio come with a key to tell you what pins are what?

                  Lastly, i am not sure what you are trying to avoid redoing and what outcome you are looking for? By modifying the es_input file, you are really only changing what the keys/buttons do in emulationstation only. This will not change how the keys/buttons react in retroarch.

                  Are you simply trying to avoid the controller setup dialogue box?

                  S 1 Reply Last reply Reply Quote 0
                  • BuZzB
                    BuZz administrators @GeekDad66
                    last edited by

                    @GeekDad66 https://wiki.libsdl.org/SDLKeycodeLookup

                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                    G 1 Reply Last reply Reply Quote 0
                    • G
                      GeekDad66 @BuZz
                      last edited by

                      @TMNTturtlguy - thanks for pointing me in the right direction

                      @Buzz - thank you for filling in the last piece of the puzzle

                      I now have what I need!

                      1 Reply Last reply Reply Quote 1
                      • S
                        spiderweb @TMNTturtlguy
                        last edited by

                        @TMNTturtlguy I have followed your tips, changing from 0 to 1 the value but issue is still there: whenever I run a game, hit of the button is done when the button is released and not when it is down depressed.
                        I'm using emulationstation and lm-mame as emulator and dragonrise zero delay joystick as input.
                        Do I have to change anything else? I mean in retroarch.cfg do I have to set anything?
                        Thanks and sorry for this since the post is quite old

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

                          @spiderweb Please don't bump (very) old topics.

                          Open a new topic and describe your problem, providing the info about your setup asked in https://retropie.org.uk/forum/topic/3/read-this-first. @TMNTturtlguy hasn't been online in 4 years and the info in this topic relates to using a keyboard, not a gamepad (which you seem to have).

                          1 Reply Last reply Reply Quote 0
                          • mituM mitu locked this topic on
                          • 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.