joystick input driver odd button mapping

davor emard davoremard at gmail.com
Sat Mar 8 04:02:41 PST 2008


HI

I've just tried joystick driver... well it works moves pointer
and but I can't use it with one-button joystick (atari digital
joystick on linux db9 driver - it only has fire button 1)

Section "InputDevice"
        Identifier      "Joystick"
        Driver          "joystick"
        Option          "Device"                "/dev/input/js0"
EndSection

Is there a way to remap joystick buttons?

I think fire button 1 is currently right click and I'd like it
to be left click. To my logic, this is not a good default setting and I
propose this as default: mapping of fire buttons to mouse clicks

fire button 1 (evdev Trigger) = left click (absolutely needed)
fire button 2 (evdev ThumbBtn) = right click (less needed)
fire button 3 (evdev ThumbBtn2) = middle click (even less needed can
be simulated with above two)

USB Joysticks tend to have buttons in order, so
1-button joystick has only button 1,
2-button joystick has buttons 1 and 2 and
3-button has buttons 1,2,3 etc.

Best regards, Davor



More information about the xorg mailing list