Joypads - PS3 SIXAXIS and XBox 360

Joypads - PS3 SIXAXIS and XBox 360

Either this is a recent development or I have an exceptional talent for not noticing things, but today I discovered that XBox 360 pads are supported by GNU/Linux. Unlike the official Windows DirectInput driver, the triggers are mapped to individual axes and the central logo button is accessible.

For those of you who don't already know, PlayStation 3 SIXAXIS pads are also supported and have been for some time now, minus the tilt-sensor functionality. It's even possible to read many of the buttons as axes in order to get pressure-sensitive input, a feature which some of you may recall was supposed to be one of the major innovations of the PlayStation 2 DualShock 2 controllers (and perhaps 3 games actually took advantage of).

I have never managed to get a SIXAXIS pad to work with Windows - the device is detected, but none of the axes or buttons respond to input. I've tried pressing the central PSLOGO button a few times, since that usually does the job when I'm using Trisquel, but it doesn't seem to have any effect.

XBox 360 pads, on the other hand, work just fine on Windows, a fact that will only startle you if you happen to be Pokédex entry number 79.

For convenience, I have documented the button and axis mappings for both pads here, so that anyone planning to include support for these pads in their own game projects can avoid the hassle of having to figure everything out for themselves.