You are not logged in.

#1 2010-01-29 20:55:35

Registered: 2009-04-07
Posts: 26

Invert Mouse

I have a Dell Mini 9 with a synaptic trackpad.  I use xrandr to rotate the screen, but the trackpad orientation does not change.  That is, when I attempt to move the mouse up, it goes right; when I attempt to move the mouse right, it goes down.  I think what I need to do is invert the mouse axis (please correct me if I'm wrong).  Could anyone please point me in the right direction?  How would I do this?


Last edited by normman (2010-01-29 20:57:47)


#2 2010-01-30 12:09:16

Registered: 2006-12-22
Posts: 246

Re: Invert Mouse

In the section Section "InputDevice" in your /etc/X11/xorg.conf

Add the following where appropriate:

Option "FlipXY" "boolean"
Enable/disable swapping the X and Y axes. This transformation is applied after the InvX, InvY and AngleOffset transformations. Default: off.
Option "InvX" "boolean"
Invert the X axis. Default: off.
Option "InvY" "boolean"
Invert the Y axis. Default: off.

Something like:

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5 6 7"
    Option         "FlipXY" "True"

I am not sure if you will need InvX and/or InvY or not, but you can play around with it.

Last edited by fumbles (2010-01-30 12:16:58)


#3 2010-01-30 13:03:49

Registered: 2009-04-07
Posts: 26

Re: Invert Mouse

Thanks, but I should have mentiioned that I'm not using a xorg.conf.  I assume then that I need to put the InvX and InvY in one of my hal fdi files.  I have tried to edit them but to no avail.  Does anyone know which fdi file I should edit and how to write this?

Last edited by normman (2010-01-30 13:04:14)


#4 2020-03-30 12:32:50

From: Stockholm, Sweden
Registered: 2010-06-02
Posts: 10

Re: Invert Mouse

To help others. I have successfully managed to invert my trackball.
The device I want to change is the Kensington Orbit

$ xinput list                               
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Kensington      Kensington USB/PS2 Orbit  id=21   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Video Bus                                 id=6    [slave  keyboard (3)]

In a script I do the following:

#invert mouse axels.
#Find id of mouse
for id in $(xinput --list | sed -n '/Kensington USB\/PS2 Orbit/s/.*=\([0-9]\+\).*/\1/p')
  #shift left-right mousebutton 3 _ 1 disable all other 0 0 0 0
  xinput set-button-map $id 3 2 1 0 0 0 0   
  #invert mouse axels
  xinput set-prop $id 171 -1 0 1 0 -1 1 0 0 1


#5 2020-03-30 13:14:26

Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Invert Mouse

Thanks for the contribution. I am going to close this ancient thread now.


Board footer

Powered by FluxBB