• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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.1k 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 8 May 2017, 00:44

    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 B 2 Replies Last reply 9 May 2017, 23:36 Reply Quote 0
    • G
      GeekDad66 @GeekDad66
      last edited by 9 May 2017, 23:36

      Does anyone know the ID values?

      T 1 Reply Last reply 9 May 2017, 23:42 Reply Quote 0
      • T
        TMNTturtlguy @GeekDad66
        last edited by TMNTturtlguy 5 Oct 2017, 00:43 9 May 2017, 23:42

        @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 10 May 2017, 00:40 Reply Quote 0
        • G
          GeekDad66 @TMNTturtlguy
          last edited by 10 May 2017, 00:40

          @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.

          T 1 Reply Last reply 10 May 2017, 01:05 Reply Quote 0
          • T
            TMNTturtlguy @GeekDad66
            last edited by 10 May 2017, 01:05

            @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 10 May 2017, 10:56 Reply Quote 0
            • G
              GeekDad66 @TMNTturtlguy
              last edited by 10 May 2017, 10:56

              How do I equate something like:

              (EV_KEY), code 29 (KEY_LEFTCTRL)

              to:

              id="1073742048"

              T 1 Reply Last reply 10 May 2017, 12:12 Reply Quote 0
              • T
                TMNTturtlguy @GeekDad66
                last edited by 10 May 2017, 12:12

                @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 28 Apr 2022, 12:17 Reply Quote 0
                • B
                  BuZz administrators @GeekDad66
                  last edited by 10 May 2017, 13:22

                  @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 10 May 2017, 23:56 Reply Quote 0
                  • G
                    GeekDad66 @BuZz
                    last edited by 10 May 2017, 23:56

                    @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 28 Apr 2022, 12:17

                      @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

                      M 1 Reply Last reply 28 Apr 2022, 12:54 Reply Quote 0
                      • M
                        mitu Global Moderator @spiderweb
                        last edited by 28 Apr 2022, 12:54

                        @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
                        • M mitu locked this topic on 28 Apr 2022, 12:54
                        • 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.

                          This community forum collects and processes your personal information.
                          consent.not_received