You are not logged in.

#1 2019-06-08 08:07:03

jsteel
Package Maintainer (PM)
From: England
Registered: 2008-03-18
Posts: 119

Possible to change USB controller axis to buttons?

jstest shows my USB controller has the following axes and buttons:

Axes:  0:     0  1:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off

I would like to change the axes to buttons, is it possible to do this? Via Xorg conf or udev? I need to be able to press left and right at the same time but on an axis you can only press one direction at a time. I'd appreciate any pointers as web searches have failed me. I see some workarounds as userspace utilities but hoping I can do this at a lower level.


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#2 2019-06-10 10:57:31

Wild Penguin
Member
Registered: 2015-03-19
Posts: 320

Re: Possible to change USB controller axis to buttons?

As the controller reports axis, I'm not sure you can use any software solution to enable pressing left+right at the same time (even if possible physically on the said controller). It might be that the controller is electrically wired so that those buttons actually are on the same axis - or the controller inside the game controller might advertise as having axises, (despite they are separate buttons in the gamepad). You probably already know this: Axis are originally meant for analog axis (i.e. the controller can be in any position between extremes and that value is read), but some gamepads might use axis even though the buttons are not analog. This design decision might have been made because of compatibility reasons with software / games...

However, I've seen some utilities which can fake or bind any joystick key to any input device, such as use the joystick as a mouse, or bind a button to a key etc; however, the names escape my mind currently. You might want to search for one via Google (I will post here if I remember/find them). But as I said, they can not separate an axis, if that is what the computer sees (the gamepad is at fault here!).

Last edited by Wild Penguin (2019-06-10 10:58:32)

Offline

Board footer

Powered by FluxBB