You don't have javascript enabled. Good luck! :(

Haskell

  Feb 26, 2017     Lamsong     linux  UPDATE: Jan 9, 2018

Linux Controllers

linux hardware

All about my controllers under debian. Kernel version:

Linux debian 4.9.0-1-amd64 #1 SMP Debian 4.9.6-3 (2017-01-28) x86_64 GNU/Linux

λ> xpad

Already in my kernel.

λ> libsdl2

See libsdl, debian package: libsdl2-2.0-0 (compiling from source need: libsdl2-dev). For testing:

wget https://libsdl.org/release/SDL2-2.0.5.tar.gz
tar xvzf SDL2-2.0.5.tar.gz

cd SDL2-2.0.5/test
./configure
# you can view Makefile to see flags and libs
gcc -o testjoystick testjoystick.c -g -O2 -D_REENTRANT -I/usr/include/SDL2  -DHAVE_OPENGL -g -lSDL2_test -lSDL2
gcc -o controllermap controllermap.c -g -O2 -D_REENTRANT -I/usr/include/SDL2  -DHAVE_OPENGL -g -lSDL2_test -lSDL2

Now you get testjoystick and controllermap.

λ> joysticks

joystick or jstest-gtk

jstest /dev/input/jsX

xbox one

My xbox one controller.

$ lsusb
Bus 001 Device 017: ID 045e:02ea Microsoft Corp. 
$ testjoystick
INFO: There are 1 joysticks attached
INFO: Joystick 0: Generic X-Box pad
INFO:        axes: 6
INFO:       balls: 0
INFO:        hats: 1
INFO:     buttons: 11
INFO: instance id: 0
INFO:        guid: 030000005e040000ea02000001030000
$ controllermap 0    # instance id