• 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

Automatic cursor movement in runcommand

Scheduled Pinned Locked Moved Help and Support
runcommand
25 Posts 2 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.
  • M
    MiK @mitu
    last edited by 31 Oct 2021, 21:50

    @mitu said in Automatic cursor movement in runcommand:

    If it actually has 2 buttons, then it would be able to fully operate the runcommand menus (1 button is enough for most actions anyway). I'll think of something and may have an updated version you could test in a day.

    The adapter supports two joysticks. Each joystick has one button.

    But the driver in RetroPie doesn't support the button of the second joystick at all. sdl2-jstest shows that the axis of the second joystick results in the same values as the first joystick. In both cases it says "joystick: 0".

    1 Reply Last reply Reply Quote 0
    • M
      MiK @mitu
      last edited by 1 Nov 2021, 09:27

      @mitu said in Automatic cursor movement in runcommand:

      I'll think of something and may have an updated version you could test in a day.

      One more information, I forgot: This problem wasn't there in older versions. It appeared in one of the last updates. Unfortunately I can't say which update, because I used only Kodi in the last months an didn't try to start a game.

      M 1 Reply Last reply 1 Nov 2021, 14:24 Reply Quote 0
      • M
        mitu Global Moderator @MiK
        last edited by mitu 11 Jan 2021, 16:46 1 Nov 2021, 14:24

        @mik said in Automatic cursor movement in runcommand:

        This problem wasn't there in older versions.

        Probably because joy2key was updated at the end of June and the new version uses now SDL2 under the hood.
        I have a tentative fix for this class of problems. Can you repeat the test from yesterday, but with [this version] of joy2key:

        wget https://raw.githubusercontent.com/cmitu/RetroPie-Setup/99fb97f5aef306f522850c6ebeea0117c2c6dd48/scriptmodules/admin/joy2key/joy2key_sdl.py
        python3 joy2key_sdl.py kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 0x1b 0x00 kpp knp -d

        You should see the connected devices and any inputs from your gamepad(s). You can try with both controllers connected and see if the inputs are correctly registered.

        M 2 Replies Last reply 1 Nov 2021, 16:45 Reply Quote 0
        • M
          MiK @mitu
          last edited by 1 Nov 2021, 16:45

          @mitu I will try later in the evening.
          I'm not very familiar with python, but shouldn't there be the file name in the second line?

          M 1 Reply Last reply 1 Nov 2021, 16:46 Reply Quote 0
          • M
            mitu Global Moderator @MiK
            last edited by 1 Nov 2021, 16:46

            @mik said in Automatic cursor movement in runcommand:

            but shouldn't there be the file name in the second line?

            Yes, I forgot to add it. Should be fine now, thanks for noticing.

            1 Reply Last reply Reply Quote 0
            • M
              MiK @mitu
              last edited by 1 Nov 2021, 22:27

              @mitu said in Automatic cursor movement in runcommand:

              I have a tentative fix for this class of problems. Can you repeat the test from yesterday, but with [this version] of joy2key:

              The fix seems to work. After starting the script, I only get:

              pi@retropie:~/joy2key-test $ python3 joy2key_sdl.py kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 0x1b 0x00 kpp knp -d
              pi@retropie:~/joy2key-test $ 2021-11-01 23:18:54,466 DEBUG  Using SDL Version 2.0.10, PySDL2 version 0.9.3.
              2021-11-01 23:18:54,467 DEBUG  Joystick #0 Microsoft X-Box 360 pad added
              2021-11-01 23:18:54,467 DEBUG  Added configuration for known device Microsoft X-Box 360 pad, hats: {0: [(1, 'up'), (8, 'left'), (2, 'right'), (4, 'down')]}, buttons: {4: 'pageup', 5: 'pagedown', 2: 'y', 3: 'x', 0: 'b', 1: 'a'}, axis: {3: [(-1, 'up'), (1, 'down')], 2: [(-1, 'left'), (1, 'right')], 1: [(1, 'down'), (-1, 'up')], 0: [(1, 'right'), (-1, 'left')]}
              2021-11-01 23:18:54,468 DEBUG  Joystick #1 hexagons.de Joystick added
              2021-11-01 23:18:54,468 DEBUG  Added configuration for known device hexagons.de Joystick, hats: {}, buttons: {0: 'a'}, axis: {1: [(-1, 'up'), (1, 'down')], 0: [(-1, 'left'), (1, 'right')]}
              

              Moving the joystick and pressing the buttons on the gamepad results in the corresponding outputs.

              1 Reply Last reply Reply Quote 0
              • M
                mitu Global Moderator
                last edited by 2 Nov 2021, 04:25

                Thank you for testing and reporting the problem.
                We'll add the fixes to the the RetroPie version, so one of the next updates will have the new joy2key version.

                M 1 Reply Last reply 2 Nov 2021, 10:08 Reply Quote 0
                • M
                  MiK @mitu
                  last edited by 2 Nov 2021, 10:08

                  @mitu said in Automatic cursor movement in runcommand:

                  Thank you for testing and reporting the problem.
                  We'll add the fixes to the the RetroPie version, so one of the next updates will have the new joy2key version.

                  Thanks for your quick response and for your work on the fix.

                  How could I try the fixed version in the real environment (runcommand, RetroPie-Setup)?

                  M 1 Reply Last reply 2 Nov 2021, 10:11 Reply Quote 0
                  • M
                    mitu Global Moderator @MiK
                    last edited by mitu 11 Feb 2021, 10:17 2 Nov 2021, 10:11

                    @mik Just copy the .py file to /opt/retropie/admin/joy2key, overwriting the existing file, and it should be used instead for all menus.

                    EDIT: actually, just update your RetroPie-Setup script, the fixed version should be now included.

                    M 1 Reply Last reply 4 Nov 2021, 22:36 Reply Quote 0
                    • M
                      MiK @mitu
                      last edited by 4 Nov 2021, 22:36

                      @mitu Sorry for the late reply: Everything works fine in runcommand and RetroPie-Setup with your new version.

                      1 Reply Last reply Reply Quote 0
                      • M mitu referenced this topic on 6 Jul 2022, 05:55
                      • S sirhenrythe5th referenced this topic on 6 Jul 2022, 09:26
                      25 out of 25
                      • First post
                        25/25
                        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