A short post about setting up a mouse on macOS to mimic trackpad gestures.
I usually use Apple’s trackpad because macOS is really designed for gestures, and I have gotten used to using them.
I recently connected my mouse through a KVM - because performing some actions - like right-click and drag (quite common in games) - is too difficult to perform on a trackpad.
Since I have a I have a 7-button mouse button mouse, I wanted to map the extra buttons to mimic common macOS trackpad gestures. As usual, I always make things too complicated!
Scrolling (aka 2-finger swipe)
Firstly, my trackpad is setup for Natural Scrolling but this setting also applies to the mouse scroll wheel. This makes the mouse scroll wheel behave in the opposite way that I would prefer! My desired behaviour is natural scrolling using a trackpad but un-natural scrolling on the mouse:
- scroll down = trackpad: two finger swipe up, mouse: scroll wheel down
- scroll up = trackpad: two finger swipe down, mouse: scroll wheel up
Confusingly, macOS has - what seems to be - two different natural scrolling switches: one under Trackpad settings and the other under Mouse settings. However, it is the same setting and turning one on turns on the other! I’d assume they were two seperate settings - instructions unclear!
The solution for me was to use UnnaturalScrollWheels to “fix” this. It’s simple - just enable invert vertical scrolling. Note: Requires Accessibility permission under System Settings > Privacy & Security.
macOS does not support zooming windows with the Ctrl-scroll wheel combination. You can try Mac Mouse Fix 3 beta, but alas, this app is no longer free (v2.2.3 is the last free version)
Mission Control and Application Windows (aka 3-finger Swipe Up/Down)
Secondly, I’d like my mouse to be able to trigger the three finger swipe gestures that I find are a requirement to navigate macOS! Specifically, I configure my mouse to mimic my trackpad as follows.
- Mission Control = trackpad: three finger swipe up, mouse = button 4
- Application Windows = trackpad: three finger swipe down, mouse = button 5
Confusingly, macOS calls the Application Windows feature App Exposé under the Trackpad settings!
To do this, System Settings > Desktop & Dock and hit the Shortcuts... button right at the bottom of the page.
macOS only allows these three functions to be mapped to the extra mouse buttons - Mission Control, Application Windows and Show Desktop. A rather limited selection. Also confusingly, why aren’t mouse settings like these under the Mouse settings?!
I have no idea why my screenshot says there is a hotkey conflict when I use only standard macOS keyboard shortcuts. You might get the same error.
Switch Spaces (aka 3-finger Swipe Left/Right)
Thirdly, the last gesture I often use is to move between “Spaces” using a three finger swipe left or right. By default, the keyboard shortcut is Ctrl+← or Ctrl+→.
Confusingly, macOS calls Spaces “Desktops” in the Mission Control overview.
As mentioned, I have a 7-button mouse, a 1stPlayer DK3.0 - to be clear, I do not recommend this mouse at all! I merely hope that perhaps guide will still be able to help people with mice that behave in a similar manner.
My mouse has a programmable mode, which unfortunately, can only be done via a clunky Windows application. Fortunately, I do have Windows and can additionally configure my mouse this way:
- Button 6 is always Esc
- Button 7 toggles between two “Modes” - Mode A and B.
In Mode A, mouse button 4 and 5 mapped to
Foward which are the normal two extra mouse buttons for mice that cannot be programmed. So Mode A simply gives me the 3-finger swipe up/down behaviour in the previous section:
In Mode B, I instead configure button 4 and 5 to map to custom keyboard shortcuts, i.e. Ctrl+← and Ctrl+→ respectively. This gives me the “move spaces” 3-finger swipe left/right I require.
Pressing button 7 toggles between the two modes - both work to allow me to switch spaces (desktop), though Mode B saves me a click.
Aside: I am torn between using Mode B to navigate back and forward in a browser instead. For that I need to map button 4 and 5 to Win+← and Win+→ respectively, since on Windows the Command key is the Windows key.
Bonus: Windows set to switch Desktops
How about configuring Windows to also switch Desktops using the same two mouse buttons? By default, the hotkey is Ctrl+Win+← and Ctrl+Win+→.
Using PowerToys Keyboard Manager, it’s possible to Remap a Shortcut and “convert” Ctrl+← and Ctrl+→ into the desired keystroke:
Be warned! This would be terrible for games that use the Ctrl key! PowerToys can be configured to only listen for the right Ctrl key, which would solve my problem, but my mouse mapping app does not support this. Alternatively, try specifying a Target App.