When you work with MediaWiki a lot as a wiki admin, it’s pretty prohibitive to have a full-keyboard-based workflow: you’re constantly looking at pending changes, patrolling, checking diffs, editing sections, all through the web UI, and all by clicking individual links on pages that have hundreds of other links you could have clicked. This density makes Vimium impractical, so instead of “let’s make everything keyboard-based” we turn to “let’s make our mouse as keyboard-like as possible!” Gesturefy accomplishes this initiative, and I adore the extension for it.
As with literally every piece of software I use, I have a lot of configurations and I’m right about every single one of them and everyone else is wrong if they think otherwise. 🙂 So let’s go over the tasks I commonly do with Gesturefy, the bindings I use for them, and why my version is right - at least given the workload of wiki editing.
Note that in this screenshot, some of the gestures’ diagrams are a bit misleading because they physically retrace over themselves, so read below to see what the correct configuration is. For example, “New tab” is Left-Right, even though the picture looks like just a right arrow. Also, some gestures come with additional settings, such as “Reload tab” and “Open link in new tab,” and the duplicate copies of them have different settings.
Navigating within a tab
- Forward: Up-Right - Self explanatory, equivalent to
- Back: Up-Left - Self explanatory, equivalent to
- Refresh: Up-Down - Self explanatory, equivalent to
- Refresh, with cache invalidate: Up-Down-Right-Left - Get your CSS and JS updates! Equivalent to
- In a new tab (focused): Up - This is the same as my preference for center-clicking a link in Firefox, but for symmetry I have a gesture for it as well - I use both the gesture and center-click.
- In a new tab (unfocused): Down - Use this repeatedly when you want to open a bunch of diffs, or rollback a bunch of changes all at once (particularly useful!!), etc.
- Go one tab to the right: Right - Equivalent to
Ctrl+Page Down, though I rebound this to
Alt+]. After opening a bunch of links in unfocused tabs, navigate between them this way. You may instead prefer to close the tabs after doing a single task in each, but (a) maybe you need to do more than one task per tab (and therefore revisit them later); (b) maybe the task takes some time to load and you can’t immediately close; and (c) sometimes the logic of which tab to focus after closing gets kinda screwy, so the deterministic approach is nicer.
- Go one tab to the left: Left - Equivalent to
Ctrl+Page Up, though I rebound this to
Alt+[. Similar usage to above.
- New tab: Left-Right - Equivalent to
- Close current tab: Down-Right - Equivalent to
- Restore closed tab: Right-Left - Equivalent to
Ctrl+Shift+T- note that when configuring this, you have the option to constrain this to current window or not; I do enable that constraint. You might want to make two binds for this gesture, one with each option, but I only have the one.
- Close all tabs to the right: Down-Right-Down-Right - Equivalent to a custom Vimium bind
- Close all tabs to the left: Down-Left-Down-Left - Use along with the previous gesture to isolate a single tab in the middle.
If your general workflow doesn’t frequently involve mass tab navigation, then I’d suggest switching the definitions of one-tab-to-the-left-or-right and forward/back. In fact, in earlier versions of Gesturefy, when they gave you a default set of gestures, that was the binding you got for free: Forward was Right, Back was Left, one tab to the right was Up-Right, and one tab to the left was Up-Left. I rebound it because when working with wikis I’m much more frequently navigating between tabs than navigating forward/back within a single tab. But this is definitely a workflow-dependent decision.
- New private window: Down-Left-Up - Equivalent to
Ctrl+Shift+P. Extremely useful when I want to see the wiki as an anonymous user, to check cache updates, or see how it looks without my custom CSS/JS or with ads, etc.
- New window: Down-Right-Up - Equivalent to
Ctrl+N. TBH I never use this, if I want a new window I click and drag a tab out of my current window, but I use “New private window” constantly, so I keep this around for symmetry.
Some general usage notes & advice
Here are my settings:
- If you mess up your gesture, just draw random circles and then let go. A deactivation key would defeat the purpose, which is to have mouse-hand-only “key bindings” for tasks.
- Use right-mouse-button as your gesture-drawing button; anything else is pretty annoying.
- There’s a couple matching algorithms; at some point the developer introduced a new one, and a lot of people hated it, and then they gave the option to use the old one. I’m using the old one and I definitely prefer it. When I was (briefly) using the new one, a lot of my gestures were incorrectly recognized by the extension.
- I don’t use any extras. There used to be a lovely one that brought up tab-specific history (forward/back), but Firefox discontinued the API that supported it when WebExtensions was introduced. There’s a task for it, but it’s been open for forever and seems unlikely to be implemented any time soon. If they ever do add it, the extension will probably readd this extra and then I’ll enable it and be happy. I’ll probably write a blog post when (okay, if) that happens.
Gesturefy is a super cool extension that I highly recommend using! It takes some time to get used to it, and I suggest adding gestures to your repertoire a couple at a time instead of all at once; otherwise you’ll find it impossible to remember what gesture does what. But once you’ve internalized all your gestures as deeply as
Alt+Tab, you’ll be amazed how much more quickly you can accomplish wiki tasks (and general internet browsing)!