Swap 2-Finger and 3-Finger Tap in Linux

When I upgraded my netbook from Ubuntu 9.04 to 9.10, I quickly noticed that they had flipped the functionality of 2-finger and 3-finger tapping. I need middle-click (3rd mouse button) functionality far more often than I need right-click, and by default GNOME uses Alt+Middle-Click as a shortcut to resize windows. Doing this with 3 fingers, as well as manipulating links and tabs and dragging objects in my panel is just cumbersome, so I embarked on a Google journey to find out how to swap 2- and 3-finger tap functionality. I found the solution on the Ubuntu Forums.

Just create a script like this:

#!/bin/sh

synclient TapButton2=2
synclient TapButton3=3

You can put this anywhere. I called mine ~/bin/swaptaps. Remember to chmod +x swaptaps. For the best effect, add it as a Startup Application (GNOME menu → System → Preferences → Startup Applications).

My testing shows that this works after rebooting as well as after logging in and out. I haven’t tested this with multiple users on the same machine, so if anybody does, please comment and share your results.

Update: Using this as a login script no longer works reliably. I frequently have to run it manually. I’ve tried adding a delay of a few seconds, and it doesn’t seem to help. It’s possible that the default behavior switched back, and my login script is switching it back. I haven’t tested this theory yet. I’ll update if I do.

This entry was posted in input, ubuntu and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

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

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>