joystick input driver odd button mapping

davor emard davoremard at gmail.com
Sun Mar 9 03:43:50 PDT 2008


Thanks Sacha,

This has helped I have remapped the buttons
and I also added some acceleration too.

(seems in my debian version
Linux Debian (xorg-server 2:1.3.0.0.dfsg-12lenny2)

default buttons are already remapped.

When I have explicitely set them to default as in man page
then it started to work correctly. This is my final joystick section

Section "InputDevice"
        Identifier      "Joystick"
        Driver          "joystick"
        Option          "Device"                "/dev/input/js0"
        Option          "MapButton1"            "button=1"
        Option          "MapButton2"            "button=2"
        Option          "MapButton3"            "button=3"
        Option          "MapAxis1"              "mode=accelerated axis=+1x"
        Option          "MapAxis2"              "mode=accelerated axis=+1y"
EndSection


On 3/9/08, Sascha Hlusiak <saschahlusiak at arcor.de> wrote:
> Hi,
>
> > Is there a way to remap joystick buttons?
> There is. Put a line like
> 	Option	"MapButton2"	"button=1"
> to map joystick button number 2 to the left mouse button (=1).
>
> If that does not help; what version of the driver are you using?
>
> > 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
> The default mapping already is:
> 1. Joystick button -> 1. Mouse button (left click)
> 2. Joystick button -> 2. Mouse button (middle click)
> 3. Joystick button -> 3. Mouse button (right click)
>
> The driver does not know anything about the physical order of the button, so
> that looks fine to me.
>
> You might set
> 	Option "DebugLevel" "integer"
> to find out which physical button does what and read "man joystick" to find
> out how to remap the buttons.
>
> > Best regards, Davor
> Greetings,
> Sascha
>



More information about the xorg mailing list