SOLVED: Correctly working pinch/zoom and multitouch gestures in Firefox on Mac OS X

Sunday, March 4th, 2012 at 10:31 pm | 25,665 views | trackback url

Firefox for MacI’ve recently been moving the bulk of my personal and professional productivity needs (software, analog, digital) over to my OS X machine. Linux is my main OS and will be for awhile, but there is a distinct lack of efficient, well-written, intuitive software for Linux, so I’m bridging the gap right now by using OS X on the Mac.

One of the tools I use every day happens to be very cross-platform compatible; Firefox.

I need a working browser to get the bulk of my work done on a day-to-day basis and I prefer Firefox over any other, because of the speed, power and flexibility through the use of extensions. Nothing beats Firefox for this; not Chrome, not Safari, not Opera and certainly not MSIE.

The Mac has some interesting UI optimizations, one of which is “pinch zoom”. This basically means you can take two fingers, put them on the Touchpad or Magic Mouse (if you have one), and pull them together (pinch) or slide them apart (zoom) to zoom in or out on an app or a window. This comes in quite handy for webpages, Flash images and other things.

However, Firefox for Mac, doesn’t support these out of the box. It took a little bit of searching, but I found the solution! Enter about:config to the rescue!


If you open up a new browser tab in Firefox on the Mac and type “about:config“, then hit Enter, you’ll get a brief warning dialog (just click on “I’ll be careful, I promise!”), and then you’ll see all of the tunable features Firefox supports.

Firefox void warranty

Type “browser.gesture” or just “pinch” in the search box on the left side of this list of values you see. You’ll see a reduced list of values there. That list will look like this:

Firefox Gestures (original)

By default, these will be the following (text here, so you can cut and paste them later):

browser.gesture.pinch.in           default        string
browser.gesture.pinch.in.shift     default        string
browser.gesture.pinch.out          default        string
browser.gesture.pinch.out.shift    default        string      
browser.gesture.pinch.latched      default        boolean                true
browser.gesture.pinch.threshold    default        integer                150

You’re going to modify these to enable pinch to zoom (“multitouch”) and “twist” features, by changing the values above, to look like this:

Firefox Gestures (modified)

browser.gesture.pinch.in           user set      cmd_fullZoomReduce
browser.gesture.pinch.in.shift     user set      cmd_fullZoomReset
browser.gesture.pinch.out          user set      cmd_he fullZoomEnlarge
browser.gesture.pinch.out.shift    user set      cmd_fullZoomReset
browser.gesture.pinch.latched      user set      boolean                 false
browser.gesture.pinch.threshold    user set      integer                 10

A number of places on the Web will duplicate these same instructions, but the ones above are much better. Why? Because I actually included the smooth pinch-zoom values, so it’s not jerky and non-smooth.

Tune the browser.gesture.pinch.threshold value to a reasonable level to get it as smooth as you need it. I find that a value of ’10’ is just about right for me. Your mileage may vary, of course.

If you want the “twist” features, you can set those too like this:

browser.gesture.twist.left         user set      Browser:PrevTab
browser.gesture.twist.right        user set      Browser:NextTab

The twist features are neat, because you basically put two fingers down on the touchpad and “twist” like you’re turning a combination lock or unscrewing a toothpaste tube, and it will perform the defined action. I have them set as above, to go to the previous or next tab.

There are a number of other values you can set these gestures to. Here’s a comprehensive list for your reference:

# Add a bookmark and opens interface to add details
Browser:AddBookmarkAs

# Go back one Page
Browser:Back

# Go Back or duplicate the content into a new tab or window
Browser:BackOrBackDuplicate

# Adds all open tabs to bookmarks; EXTREMELY useful
Browser:BookmarkAllTabs

# Go forward one Page
Browser:Forward

# Go Forward or duplicate the content into a new tab or window
Browser:ForwardOrForwardDuplicate

# Go to the defined Home Page
Browser:Home

# Jump to the next tab from current (to the right) in the browser
Browser:NextTab

# Open a file from the local host, using the picker dialog
Browser:OpenFile

# Jump to the URI field, selcting all content there (same as Cmd-L)
Browser:OpenLocation

# Jump to the previous tab (to the left) from the current one in the browser
Browser:PrevTab

# Reload the current page (does not accept any modifiers)
Browser:Reload

# Reload or duplicates the page into a new tab or window
Browser:ReloadOrDuplicate

# Reloads the current page, but not from cache. Executes another remote request for the content
Browser:ReloadSkipCache

# Save the current frame to disk, opens the SaveAs dialog
Browser:SaveFrame

# Save the current page/file to disk, opens the SaveAs dialog
Browser:SavePage

# Send the link or page to the default, defined email application
Browser:SendLink

# Stop loading the current page (drop the socket connection)
Browser:Stop

# Re-open the previously-closed tab in the browser
History:UndoCloseTab

Tools:Addons
Tools:Downloads
Tools:PrivateBrowsing
Tools:Sanitize
Tools:Search

# Display the page in FullScreen mode (this is a toggle, FullScreen and previous view)
View:FullScreen

# Open a new window that provides detailed information about the media and other elements in the page
View:PageInfo

# View the full HTML source of the current page being displayed
View:PageSource
cmd_CustomizeToolbars

# Close the active tab
cmd_close - closes tab

# Close the current browser window, including any tabs in that window
cmd_closeWindow

# Open up a Find dialog (Cmd-F)
cmd_find

# Find the next matching occurrence of the word being searched for in the page content
cmd_findAgain

# Reverse the search (bottom up, instead of top down)
cmd_findPrevious

cmd_fullZoomEnlarge
cmd_fullZoomReduce
cmd_fullZoomReset
cmd_fullZoomToggle

cmd_handleShiftBackspace

# Open up a new Firefox navigation window
cmd_newNavigator

# Open up a new browser tab
cmd_newNavigatorTab
cmd_pageSetup

# Open up the Print dialog
cmd_print

# Opens a Print Preview view of the current page
cmd_printPreview

# Completely quit/terminate Firefox
cmd_quitApplication

# Turn the Task Bar on or off
cmd_toggleTaskbar

Last Modified: Sunday, March 6th, 2016 @ 05:37

One Response to “SOLVED: Correctly working pinch/zoom and multitouch gestures in Firefox on Mac OS X”

  1. Hey Dave,

    Glad to see that you got a mac. How are things in the EFS world? Just happened to come by one of my book marks. Hope things are well.

    Dennis


Leave a Reply

You must be logged in to post a comment.

Bad Behavior has blocked 2574 access attempts in the last 7 days.