As a long time user of the Multiclutch, which lets anyone configure their own multitouch gesture commands, I was concerned when my custom gestures stopped working for the new 64 bit Firefox 4. I searched on the internet, but really found only moderate amounts of help, aimed at computer geniuses. I decided to forage and hack my way through the "about:config" tangles of Firefox on the rumor that a "gesture" filter would uncover the precious Firefox 4 update that included multitouch gestures. This is what I learned.
For anyone who does not use gestures already, they're extremely helpful. Multitouch gestures allow you to input a physical motion on the trackpad in place of a keyboard or virtual menu command on your computer. In time, the correlation between physical motion and virtual reaction becomes second nature, and allows for very quick computing. I'll give my recommendations and current set up, but the time-saving possibilities and shortcuts are endless.
The new Firefox has some gestures to start with. You can:
I will also show how to do some other modifications you can make in the sensitivity and functionality department of the twist and pinch gestures.
Though the instructable was introduced following the release of Firefox 4 and it's increased support for gestures, it still is applicable to all of the versions since.
Step 1: Types of gestures
There are many multitouch gestures, but some of they you may not want to customize in Firefox (for example, two finger scroll). Here is a list of all of the gestures that Firefox accepts for modification.
When pairing your gestures to commands, consider their function. If you want to switch to the tab on your right, it doesn't make any sense to use swipe up or pinch in as your gesture to get there. If you set it up comfortably, it will feel natural and require little or no explanation to a new user on your computer.
Step 2: Types of Commands
There are many commands you can set a gesture to. Some are more useful than others.
all of the possible commands to my knowledge are located Here and here, but many of them seem like a waste to have taking up one of your precious multitouch gestures.
Some of the most useful ones are:
If you have a very specific command you're looking for, and it's not in this list, check the links at the top. If it's not there, do some research into what the keyboard shortcut or menu selection equivalent is referred to in the source code.
Step 3: Setup
type "about:config" into your address bar. It will prompt you with a warning, read it, and click on the "I'll be careful, I promise!" button. Don't touch anything in here, it's like the china cabinet you had in your dining room as a kid. Just go and get the Christmas plates your mom asked for as quickly and quietly as you can without touching or breaking anything else.
Select the filter bar at the top (NOT the address bar) and search "gesture" to bring up all of the actions and commands dealing with gestures.
Sort by type at the column headers. This will group all of the string preferences together, they are the ones you can designate a command to.
You'll notice a preference called "browser.gesture.tap" which represents a single tap/click. It is set to reset the zoom so that, for example, your 400% zoom setting for that size 6 font news site doesn't continue on into an ad you click on that site informing you that you can "Last 2x As Long!" (note: this does not mean you can last 800% longer). If you stay on the same website though, it is my experience that the zoom level stays consistent with your adjustments. My explanation for this feature is completely sourced from personal use though, and may not be correct.You could change this, so that Firefox does something every time you click (perhaps a prank?), but I'm not really sure how it would be useful.
To make the adjustments, simply identify the gesture that you want to adjust, double click it under the "value" column, and paste in the desired command from the list. It is important that you keep the commands the exact same; they only work with the correct, case sensitive version.
I have attached images of the successive pages and screens you should be encountering in order to get to the right place to change your settings. The text is very small in the default window, so click the small "i" in the top left hand corner and go to the original file in order to get a more detailed picture. I should mention that the last picture is not what your screen will look like, but it is what my screen looks like after all of it's modification.
Please note that any customizations and modifications you make to the gesture settings here will not transfer to any other applications on your computer. If you want to customize multitouch gestures in other applications, you need to use an application like Multiclutch.
Step 4: Controlling the twist and pinch threshold
Besides the string preferences, there are also integer and boolean preferences. You can not change the functionality here by adding a command, but you can change the minutia of gestures themselves using these preferences.
Integer preferences allow you to change a number. "browser.gesture.twist.threshold" is the preference for the sensitivity of your twist command. The default for this is 25. The 25 represents a value for how far your twist gesture must go before Firefox recognizes it as a twist.
When you put two fingers on the trackpad, Firefox recognizes this, but it isn't until your gesture has passed the set threshold that Firefox calls it a legitimate twist. most of the time if you are not able to have it recognize your twist command, it is simply because you haven't twisted enough for Firefox to distinguish between an accident and intentional twist. This means that the integer value is too high for your unique interpretation of the twist gesture.Adversely, you may find Firefox incorrectly recognizing twist commands being inputted, which means the integer value is too low for your personal way of gesturing.
If you want to make the twist command easier for Firefox to recognize, lower the integer value to something like 10 or 15. This will help a lot.
If you want to make twisting harder to do, raise the value to around 40 or 50. A value like this makes it extremely hard to accidentally perform a twist.
If you'd like to disable the twist, but keep your precious commands set, you could set the twist value to some arbitrary massive number, like 1000. This would make it quite a challenge to get a twist recognized in firefox. It would literally take walking around the computer with your fingers on the trackpad twisting the whole time for several revolutions to get one to register. A competition where people set their browser.gesture.twist.threshold value to massive numbers and get one recognized by Firefox would be entertaining.
The pinch is the exact same as the twist in terms of the interpretation of it's integer value and the problems associated with it, but the value starts much higher. The default is 150.
For an easier time pinching, set the value to around 60-80. I personally am shocked that the value's default is not somewhere in this range.
To make pinching harder, set the value to around 180-200. This is like pinching someone that is really, really fat.
To disable pinching, set the number to a "Jabba the Hutt" sized pinch, say 1000 or so, which will make pinching impossible.
Another prank might be to set this value as 1. Just try it.
Step 5: Adjusting the twist and pinch latch
There are three boolean preferences you can change: browser.gesture.twist.latched, browser.gesture.pinch.latched, and gestures.enable_single_finger_input. I can't figure out exactly what the last one does, but from my experimentation it does nothing.
To adjust these settings, double click on their value (either true or false) under the value column. It will change when your double click is recognized.
For the latches, a setting of false allows you to perform multiple commands from a single input of the gesture. For instance, if you have twist set to back, you can twist and hold your fingers in the end position, and Firefox will continue to go back, one page after another, until you release your hand from the twisted position.
When a latch is set to true, it means that when you perform one gesture, you get one output. To expand on the example before, a twist latch set to true would allow you only one page back for every time you perform the twist gesture.
please note that my explanations are from experience mainly, and may not be precise; feel free to correct me!
Step 6: Suggested settings
Here are the settings that I find most intuitive for the gestures offered. You could start with these, but in the end, everyone will probably feel differently about what command is the most becoming to each gesture. Part of the influence for my settings is Stumbleupon, which has influenced the way i spend my time and the features that I use most in Firefox.
My commands are:
The only downside is that while many of the settings are very intuitive, the presence of multitouch to someone who has never used it before can be very confusing if they are not aware of the gestures they are inadvertently making.