How to modify Mac multi-touch gestures in Firefox 3.1b2

Firefoxgesture

Ever since we found out that the latest Firefox 3.1 beta for Mac supports multi-touch trackpad gestures, I’ve been giving my fingers a work out. Just as a refresher, here are the commands that are natively supported:

- 3 finger swipe Left: Go back in history (hold Cmd to open it in a tab)
- 3 finger swipe Right: Go forward in history
- 3 finger swipe Up: Go to the top of the page
- 3 finger swipe Down: Go to the end of the page
- Pinch Together: Zoom out
- Pinch Apart: Zoom in
- Twist Right: Next tab
- Twist Left: Previous tab

Dave Zatz asked a great question in the comments from yesterday’s post: "Whatever I’ve been doing accidentally has been zooming in and out ofpages and occasionally flipping tabs. I seriously thought Beta 2 wasbuggy. Glad to know it’s only multitouch. But how do I turn it off??"

After some digging, I can answer that question. In fact, you can not only turn these commands off, but you can customize them if you know how.

As usual, it’s all in the "about:config" page in Firefox. That’s the URL you type in the address bar to get at the guts and settings of the browser. Bear in mind before you read any further: tinkering in here can cause unintended issues with your browser’s behavior. That’s why Mozilla offers a warning when you go to "about:config" in the address bar. Or at least they used to. I’m a rebel and turned the warning off. In any case, any changes you make in here are your own responsibility.

Now, on to the good stuff. To answer Dave’s question, I started searching for different preferences in the about:config settings. The Firefox team makes it easy to do this: all of the preferences are alphabetical and there’s a search feature. I searched for the obvious terms: mouse, trackpad and such. No luck. Then I searched for the word "gesture" and scored the native 10 gesture command settings:

Aboutconfig

Here you can see the gesture preferences and the command values that make the magic happen. To turn one of these off, you can go extreme and simply delete the value. For example, if I didn’t want to use the swipe.up to return to the top of a page, I could simply double click it to see this modification box:

Swipeup

To disable the gesture, simply remove the value and click OK. Essentially, the preference is still there in Firefox, but the browser won’t know what to do if you swipe up on the trackpad. Want to get it back? No problem. Simply right-click on the preference in the "about:config" screen and choose the Reset option. Done!

Using this method, you can easily disable one or more of the gestures. And you can bring them back as well. But what about modifying them for other features? I’m no programmer, but the little bit of research I did might be useful here. I did some searching for the values in the gesture preferences and found that there are some standard commands used here. I’m not certain if they’re JavaScript or something unique to Firefox, but I’ll give you an example of one command: copy.

I decided for this example that I can easily navigate through my tabs by using just one of the twist functions. Why? Because if you keep twisting through the tabs in one direction and get to the end of the tab list, it simply repeats from the other end. Yes, it’s nice to twist left and right for ease of navigation, but remember, this is just an example.

So for the moment, I’m only going to use the twist left gesture to move through my tabs. This frees up the twist right gesture and for that I’m going to assign a copy command. I use copy and paste throughout the day, so this could be useful for me. I simply double-clicked on the Browser.gesture.twist.right preference and changed the value from Browser.NextTab to cmd_copy and then clicked OK. That’s it!

Cmdcopy

Now I can highlight any amount of text or images in the browser and do a quick twist right gesture with two fingers to have the information sent to my clipboard. A nice complement to this might be to mod the twist left gesture to a cmd_paste value, but I’m not sure I want to give up the quick tab navigation. In any case, you get the idea. Remember: you can always go back to the native command by choosing the Reset option.

If you find a list or any individually useful commands to be used here with custom gestures be sure to share them in the comments!

loading

Comments have been disabled for this post