Sample Header Ad - 728x90

Mapping two joysticks with Xorg

2 votes
1 answer
1253 views
I already managed to map the input of a joystick to keyboard inputs by writing a file in my xorg.conf.d/ directory (the file is named 51-joystick.conf). Now I would like to map the inputs of a second joystick (same model) to use them together. So I wrote a second file in xorg.conf.d/; roughly the same content, only differing by device path and mapping. Unfortunately, it doesn't work this way: - if I call the file for the second joystick 51-joystick2.conf, no joystick work any more - if I call the file for the second joystick 52-joystick2.conf, only the second one works Can someone explain me how to proceed? edit: the content of 51-joystick.conf is Section "InputClass" Identifier "Joystick 1 mapping" Option "device" "/dev/input/js0" Option "path" "/dev/input/js0" Option "StartKeyEnabled" "False" Option "StartMouseEnabled" "False" #MatchIsJoystick on #Option "MapAxis1" "keylow=113 keyhigh=114" #Option "MapAxis2" "keylow=111 keyhigh=116" Option "MapButton1" "key=52" Option "MapButton2" "key=53" Option "MapButton3" "key=38" Option "MapButton4" "key=39" Option "MapButton5" "key=40" Option "MapButton6" "key=54" Option "MapButton7" "key=14" Option "MapButton8" "key=10" EndSection edit (11/03/15): - both of my joysticks are shown with the command xinput ; each of them have two entries (two different IDs) and are marked as slave to the keyboard. The four entries have exactly the same name ("Logitech Gamepad F310 (keys)") - if I give a higher number to the config file of the first joystick ("52-joystick1.conf" and "51-joystick2.conf"), only the first joystick's inputs are mapped to keyboard inputs - this is now what is written to the xorg log when I plug the first joystick - this is now what is written to the xorg log when I plug the second joystick I note that in both cases, InputClasses "Joystick 1" and "Joystick 2" seems to be applied to the two joysticks, and in the end, only the mapping to /dev/input/js0 is applied.
Asked by SLakx (21 rep)
Mar 9, 2015, 07:49 PM
Last activity: Nov 13, 2016, 01:18 PM