Xbox360 Dpad not working in runcommand menu
-
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!
-
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. -
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... :)
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.