How do I fix inverted movement of mouse?

I have downloaded Ubuntu 19.04.

The problem is that the screen looks normal but the movement of the mouse is inverted.

When I used xrandr command this would not work with the movement of mouse.

How can I fix this problem?


If the mouse is moving in the wrong direction, but your screen is correct, then you can do the following.

  1. Identify the mouse using xinput:

    xinput list
    
  2. Once you find the mouse and the line that says id=X (where X is the mouse id), then do the following:

    xinput set-prop X "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1
    

Don't forget to replace X with the actual number you got from id=X.

Here's what I got on my machine for xinput list.

output in terminal including "PixArt Dell MS116 USB Optical Mouse  id=10"


You can change the mouse behaviour in Settings -- Mouse & Touchpad -- Natural Scrolling. Natural "Scrolling moves the content not the view".