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

    Xbox360 Dpad not working in runcommand menu

    Scheduled Pinned Locked Moved Help and Support
    x86runcommandjoy2key
    3 Posts 1 Posters 938 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.
    • vbsV
      vbs
      last edited by

      When I enter the runcommand menu I can control it with keyboard without problems but on my connected X360 Gamepad only button 'A' is working to select a menu item. But I cannot use neither Dpad nor analog stick to change the select menu item.
      I am on x86 (Lubuntu) and I remember it worked fine on RPi3.

      I configured the config to just joystick (it would not work at all otherwise I think) and also joy2key is runnign when entering runcommand but it seems like some buttons (Dpad) are mapped wrong.

      Thanks for help!

      1 Reply Last reply Reply Quote 0
      • vbsV
        vbs
        last edited by vbs

        I have put some debug outputs into joy2key.py and this is what it sends to the tty when I press the buttons:

        Type: 1 Number: 0 Value: 1
        Sending: 0a
        
        Type: 1 Number: 1 Value: 1
        Sending: 09
                Type: 1 Number: 16 Value: 1
        Type: 2 Number: 5 Value: 32767
        ****Sending: 1b
        ^[Sending: 5b
        [Sending: 42****
        BType: 1 Number: 14 Value: 1
        Type: 2 Number: 4 Value: 32767
        Sending: 1b
        ^[Sending: 5b
        [Sending: 43
        CType: 1 Number: 15 Value: 1
        Type: 2 Number: 5 Value: -32767
        Sending: 1b
        ^[Sending: 5b
        [Sending: 41
        AType: 1 Number: 13 Value: 1
        Type: 2 Number: 4 Value: -32767
        Sending: 1b
        ^[Sending: 5b
        [Sending: 44
        

        So it sent "0x0a", "0x09", "0x1b5b42", "0x1b5b43", "0x1b5b41", "0x1b5b44". That is correct so far, right?
        Might the problem be related to the terminal or something? Does it expect other codes for the cursors or something? The two buttons are working fine.

        1 Reply Last reply Reply Quote 0
        • vbsV
          vbs
          last edited by

          I think I found the reason: The hex values that are getting sent are terminal-specific and don't work for my terminal. I fixed it (hopefully) by using curses which uses terminfo to translate to the actual terminal values.
          PR soon... :)

          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.