This page looks best with JavaScript enabled

Mouse Gestures (the useful ones)

 ·  ☕ 6 min read

In this post I’m going to talk about the Gesturefy Firefox extension (in Chrome, I think the extension you use is CrxMouse Chrome Gestures).

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.

A screenshot of my Gesturefy configuration
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.

  • Forward: Up-Right - Self explanatory, equivalent to Alt+Left Arrow.
  • Back: Up-Left - Self explanatory, equivalent to Alt+Right Arrow.
  • Refresh: Up-Down - Self explanatory, equivalent to Ctrl+R or F5. Less useful than Cache Refresh honestly, but sometimes you want to clear out all of the changes you’ve made in Inspector, also I use the non-JavaScript Recent Changes interface, so I need to refresh to get updates there.
  • Refresh, with cache invalidate: Up-Down-Right-Left - Get your CSS and JS updates! Equivalent to Ctrl+F5.
  • 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.

Manipulating tabs

  • 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 Ctrl+T.
  • Close current tab: Down-Right - Equivalent to Ctrl+W.
  • 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 qq that I set up. My go-to way to clean out a window of tabs; go to the first tab in the window and then close all tabs to the right. Alternatively, clear out everything after a certain point that I no longer need. Also, see next gesture.
  • 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.

Manipulating windows

  • 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:

A screenshot of my Gesturefy 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.

Conclusion

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 Ctrl+C, Ctrl+W, and Alt+Tab, you’ll be amazed how much more quickly you can accomplish wiki tasks (and general internet browsing)!

Share on

river
WRITTEN BY
River
River is a developer most at home in MediaWiki and known for building Leaguepedia. She likes cats.


What's on this Page