Switching trackpad scroll direction in Linux

If you’re like me and use both a Mac and a Linux laptop (or perhaps dual-booting on the same hardware) and like the scroll-direction that Lion gives you, you probably found it annoying having to switch between the two platforms… going the wrong way and forgetting which way is which on each platform!

I take no credit for this solution, but I thought I’d write an easy article on how to change the scroll behaviour on your Linux machine to be the same as your Mac. It’s a very simple procedure; open up a terminal as your local user (which, I hope, isn’t root!) and type the following:

$ echo "pointer = 1 2 3 5 4 6 7 8 9 10 11 12" >> ~/.Xmodmap

After you restart your session, it should have switched the scrolling direction. For the curious amongst you, you’ll notice that the ’4′ and ’5′ are switched around here. You can easily verify that the above has successfully included your changes by simply using the following command:

$ cat ~/.Xmodmap | grep pointer
pointer = 1 2 3 5 4 6 7 8 9 10 11 12

I tested this on my Fedora 16 laptop using GNOME3. Any problems, let me know… have fun!

 

2 thoughts on “Switching trackpad scroll direction in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *


− two = 7

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>