You are not logged in.

#1 2018-06-10 21:32:37

gugah
Member
Registered: 2013-01-02
Posts: 27

[SOLVED] make xpad bind xbox360's d-pad to 4 buttons instead of 2 axis

Hi all,

I'm posting this because I'm having the same issue as this guy, but with the XBox 360 Wired Controller.

Basically, the xpad driver works fine and the gamepad behaves the same way it would on Win7. Now, because of a racing game I use to play, I'd like to use the dpad to steer the car instead of the left stick, which would improve my reaction times. For this, I need xpad to bind the controller's dpad to 4 buttons instead of 2 axis. I can't use dpad_to_buttons=1 to override the behaviour since the controller is recognized, and that parameter only works on unrecognized gamepads. One alternative is to build a custom module like this guy did.

As of 2018, is there any better way to override xpad default's behaviour?

Last edited by gugah (2018-06-12 04:29:21)


"The problem with quotes on the Internet is that it is hard to verify their authenticity." ~ Abraham Lincoln

Offline

#2 2018-06-11 16:21:10

Ttz_ztT
Member
Registered: 2015-10-03
Posts: 2

Re: [SOLVED] make xpad bind xbox360's d-pad to 4 buttons instead of 2 axis

This might not be exactly what you're looking for, but I think it's the most versatile solution for this kind of problem right now:

https://github.com/jgeumlek/MoltenGamepad

or in aur:

https://aur.archlinux.org/packages/moltengamepad/

It will allow you to switch the configuration of your gamepad (d-pad as hat or vice versa ...) in different ways (i.e. writing to a fifo or using moltengamepadctl).

Offline

#3 2018-06-12 04:28:33

gugah
Member
Registered: 2013-01-02
Posts: 27

Re: [SOLVED] make xpad bind xbox360's d-pad to 4 buttons instead of 2 axis

I was able to solve this using the userspace driver (xboxdrv) following the wiki steps. So glad I can finally do something in Linux that can't even be done in Windows (unless you use unofficial drivers from taken rare sources).

This is the /etc/default/xboxdrv I end up using:

[xboxdrv]
silent = true
# next-controller = true
deadzone = 6000
dpad-as-button=true
[xboxdrv-daemon]
dbus = disabled

Note that this driver (which, if I remember properly, is older than the kernel's xpad) won't ignore the dpad-as-button parameter, even though that is not the default behaviour in the official Windows driver.


"The problem with quotes on the Internet is that it is hard to verify their authenticity." ~ Abraham Lincoln

Offline

Board footer

Powered by FluxBB