20. September 2024 By Guus de Wit
The Power of Mouse Shortcuts
Software developers tend to love keyboard shortcuts. For some, it even becomes a sport not to use their mouse at all. I, too, have caught myself using more and more of these shortcuts when at work. After some time however, it dawned on me that there is such a thing as too many keyboard shortcuts. I will explain why in this blog, and show you a powerful alternative: mouse shortcuts. It's time to embrace your mouse and explore the possibilities that custom mouse shortcuts can bring!
The problem with too many keyboard shortcuts
I’m a big fan of keyboard shortcuts. In every app that I use regularly, I look up what the shortcuts are. I've recently written a blog about seamless switching between apps on your Mac with custom global shortcuts. I have since also started using the popular Vimium extension, that allows users to browse without their mouse. So I asked myself: "Do I even still need a mouse?". The short answer: "Yes!".
Firstly, lots of applications I use don't have any keyboard shortcuts. Secondly, for things like dragging/dropping files, or pointing to something while screen sharing, a mouse is just more convenient to use in general. In all honesty, I don't actually mind using my mouse at all.
So, you might be asking: "Why all the fancy custom keyboard shortcuts?". Well, let me rephrase my earlier comment: I don't mind using a mouse. What I do mind is switching between my keyboard and mouse. Most delays I experience during work come from switching between my input devices. The reason I started investing more time in shortcuts is to avoid having to switch to my mouse for only a few clicks. For instance, when you have to use your mouse to move to a different text segment, before resuming typing with both hands.
Now here is the problem: I noticed that using all these shortcuts could have the reverse effect. When using my mouse for file organization, I wanted to move the app window to my other screen and make it full size. In my last blog, I described how I mapped the Arrow keys + some modifiers to do this with custom window management software on my Mac.
The result is that I now had to briefly switch to my keyboard, just to press the arrow button, and then back to my mouse for the rest of the work. In other words: using a keyboard shortcut here was triggering the exact motion that I was trying to avoid!
The versatility of mouse shortcuts
Let's think of some solutions for this scenario: I have my right hand on my mouse, and my left hand on my keyboard, and I want to quickly move the current app to my other screen. I have a keyboard shortcut for this (Hyper + Arrow Keys), but I don't want to switch my right hand to my keyboard. How to do this? Here are some possible solutions:
- Just drag the window between the screens. This is a valid option, but it does require quite some movement with the cursor, and can be slow. There are better alternatives.
- Customize the shortcut to use a button on the left side of my keyboard instead of the arrow key. This has the benefit that it is faster than dragging, and can be triggered with just one hand. However, I already have a lot of shortcuts defined for the left side buttons, and I also want to be able to use all my fingers there for different (combinations of) modifier keys. So this could work for this one case, but it loses flexibility.
- Use a combination of some modifier keys on the left side of the keyboard with a specific mouse button/behavior to trigger the window movement. In other words: a mouse shortcut! Let me explain that in more detail.
Using modifier keys in combination with mouse buttons is probably not new to you. Think of using Control+Click to open a link in a new browser tab, or holding down Control while scrolling to zoom in/out on a map section on a web site. Software exists (recommendations below) that let you customize what happens in these scenarios. For a given input, you can choose what the output is. One of the options is to have a keyboard shortcut as output. I like to use scrolling up and down to replicate the arrow keys. So in the scenario above, I want to have the Hyper key + scrolling combination to move apps between my monitors. The mouse software is set up to just translate the mouse shortcut “Hyper+Scroll Down” into the keyboard shortcut “Hyper+Right Arrow”. And voilà, no need to move my hands at all to instantly move an app to my other monitor.
I now regularly examine the moments when I briefly switch input devices, and try to create a shortcut to prevent it. Other examples that I use this technique for include Alt+Scroll to switch between tabs in Chrome, and Control+Shift+Scroll to move through the browser history. I actually use the exact same mouse shortcuts in my code editor to move through tabs and history. The underlying keyboard shortcuts are different though, so when looking for customization software, you want to have something that can behave differently, across different applications.
What software and mouse to use
A lot of mice these days have more than just two buttons and a scroll wheel. Back- and next buttons are very common, and some mice, like the Logitech MX Master 3 and Apple Magic Mouse, let you even scroll sideways and recognize gestures. All of these give you more options for custom mouse shortcuts, which can be overwhelming at first. Therefore, if you want to customize some things, I recommend starting with just the scroll wheel and some modifier keys. Every mouse has at least that option! I myself use a trackball at home, and a smaller mouse on the go. Since the buttons are different between the two, using the scroll wheel makes the shortcuts feel consistent.
As for software, you have a couple of options. Some mouse manufacturers, like Logitech and Kensington, provide their own software to customize their devices. Some pros and cons of these:
Pros
- the software comes free with the device
- a lot of default customizations for specific apps
- often lets you sync your settings to an account, for use on multiple computers
Cons
- only work for devices produced by the vendor
- you are often restricted by the choices made by the producer on what is customizable
If you have a mouse that does not have such software, or if you want to customize something that's not supported there, you can have a look at SteerMouse for Mac, or X-Mouse Button Control (XMBC) for Windows. Of the two, I've only used SteerMouse, but from what I read, XMBC has mostly the same features:
Pros
- supports all the devices I tried
- shortcuts for modifiers with mouse behaviors
- profiles for individual apps
Cons
- no way to sync automatically between computers
- SteerMouse costs money (but you can try it out for free)
- XMBC only supports up to 5 mouse buttons
Enhancing your workflow
So, whatever mouse or operating system you use, software exists that enables you with the power and versatility of custom mouse shortcuts! By integrating them into your daily routine, you can streamline your workflow and reduce interruptions caused by switching between keyboard and mouse. Start by experimenting with custom mouse actions and see how they fit into your existing setup.