Create a tab-switching gesture shortcut in Firefox 3.5

Rob Griffiths
10 July, 2009
View more articles fromthe author
AAA
Help

The recently-released Firefox 3.5 supports multi-touch gestures on newer Mac laptops, at least if you believe this Firefox features page. However, these gestures don’t seem to be documented in detail anywhere on the Firefox Web site—it’s acknowledged that they exist, but there’s no apparent documentation on which gestures do what.

To save you some experimentation, today’s hint will cover the pre-programmed Firefox gestures, and explain how to activate gestures to support switching between tabs. You can find all the pre-programmed gestures in Firefox by going to the “hidden” configuration page. Open a new browser window and enter about:config in the URL entry area. When you press Return, you’ll be greeted by a scary warning, letting you know that you may void your (non-existent) warranty if you proceed. Click the “I’ll be careful, I promise” button to go ahead and enter Firefox’s detailed configuration page.

This page is definitely somewhat scary looking—and the warning shouldn’t be taken too lightly, because you can really break Firefox if you just make arbitrary changes to the preferences you’ll see listed here. What you’re looking at are the values for every preference that Firefox uses—both those that are user-settable (browser.tabs.warnOnClose reflects the setting on the Tabs tab in Preferences for warning before closing multiple tabs) and those that are not (such as those we’re about to change).

To see all the existing gestures, click in the box next to Filter and type browser.gesture; you don’t have to press Return, as Firefox will update the list of matching preferences on the fly. The resulting list shows all the pre-defined gestures and their associated actions; for ease of reference, they are:

  • Pinch: If you pinch in (move two fingers towards one another), you’ll zoom out on the current page. Pinch out to zoom in on the current page. In addition, if you add the Shift key to either gesture, you’ll reset the zoom level to the default value (100 percent).
  • Swipe: Swipe left (three fingers on trackpad; drag left) to move back to the prior page in the current window; swipe right to jump to the next page in the current window. If you swipe down, the browser will jump to the bottom of the current page; swipe up to jump to the top.

The one gesture that seems to be missing is the ability to switch tabs. However, if you’ll look at the matches on the about:config page, you’ll see both browser.gesture.twist.left and browser.gesture.twist.right are listed. In the Value column, however, neither shows a value, indicating that they’re undefined. With two simple changes, you can activate these gestures, too.

Double-click on browser.gesture.twist.left; this will drop down a sheet showing an empty text input box. Type Browser:PrevTab into the box, then click OK. Then double-click on the browser.gesture.twist.right preference, and enter Browser:NextTab into the text box and click OK.

That’s it; you can now use a pinch gesture—put two fingers on the trackpad and then twist them to the right or left—to move between tabs in Firefox 3.5. If you want to, you can also redefine the other gestures (maybe you want pinch in to zoom in, though I would find that very confusing!). If you make a change you want to undo, Control-click on the preference in question and choose Reset from the contextual menu.

I’m not sure why the twirl gesture is disabled by default, but with it active, I find it a very intuitive way to change tabs in Firefox 3.5.

Leave a Comment

Please keep your comments friendly on the topic.

Contact us