How to Reverse The Mouse Scrolling Direction in Ubuntu (aka Natural Scrolling)

When Apple releases Mac OSX Lion, one of the changes is the switching of the trackpad/mouse scrolling direction. Instead of scrolling the mouse wheel down to move down the page, you have to scroll up to move down. Apple imported this feature from iOS and call this feature “natural scrolling”. Not everyone love this feature, but if you are one of those who love it, and wish to implement this feature in Ubuntu, here’s how you do it:

1. Open a terminal. Type:

2. Paste the following to the text file.

You can see that the sequence 4 and 5 are switched. This represents the switch in the vertical scrolling direction. If you want the horizontal scrolling to switch as well, switch the 6 and 7.

3. Save the file with the name ‘.Xmodmap’ (without the quote, but with the dot in front) in your Home folder.

4. Close the file and terminal.

5. Log out and log in again. Your mouse scrolling direction should change now.

To revert the setting, simply delete/remove the .Xmodmap file.

If you are using KDE (Kubuntu), the tweak is slightly different.

1. Go to “System Setting -> Input Devices -> Mouse”.

2. Check the box “Reverse Scrolling Direction”. Click Apply.

naturalscrolling-kde

That’s it.

Note: There is another app call naturalscrolling. I have tried it in Ubuntu Oneiric beta and it doesn’t work. If you are keen to try it out, here is how you can install it:

Open a terminal and type:

If everything goes well for you, you should see an appindicator where you can tick to change the mouse scrolling direction. Let me know how it works for you.

via OMGUbuntu

Image credit: A l i = ???????

13 comments

  1. “Instead of scrolling the mouse wheel down to move down the page, you have to scroll up to move down.”

    The reverse is true. In Lion you scroll up and the page also moves in an upwards direction. This reveals text that is down the bottom of the page. So your view may seem as though it is going downwards but the page contents is definitely moving upwards. (Your view is in fact fixed looking at the middle of the screen)

    The default for windows and linux is to scroll up and the page contents will move down. This behaviour mimics the sidebar scrolling control that you had to click on and drag up for the page to move down. Interestingly enough – even though the default scroll direction changed in OS X Lion the sidebar scroll retained the old behaviour.

  2. There is also a file “.Xmodmap” in home folder pointer = 1 – 12
    If you don’t have naturalscrolling installed, you’ll see “5 4”. Reverse this pair into proper sequence.

  3. Tried. Thank’s.
    It works, but NOT in Nautilus, just like “Natural Scrolling app”, that I’ve tried.
    Is there a trick to solve this in Nautilus, please?

    Thank’s for your good post. ;)

    • It seems that this is a bug in Ubuntu Precise. Bugs reported have been filed, but there has been no solution yet.

  4. What is with this thread?????

    The space that has what to type or paste in the file just has 3 adds.

    • Got it! I am ued to Win7 and XP with an add blocker.
      pointer = 1 2 3 5 4 6 7 8 9 10 11 12
      Except it did not work.

      I read Robert’s post:
      “… you’ll see “5 4?. Reverse this pair into proper sequence.”
      That worked. Thanks for the help!

Comments are closed.

Sponsored Stories