Skip to content

jackharvest/SideNav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SideNav app icon — a white double arrow on a blue-to-purple rounded square, representing back and forward navigation

SideNav

Fix mouse back/forward buttons not working in macOS Finder.

Latest release macOS 13 or later MIT License

SideNav is a free, open-source macOS menu bar app that remaps your mouse's side (back/forward) buttons so they actually work in Finder — as well as Safari, Chrome, and any other app that supports the standard back/forward keyboard shortcut. It's built for mice that don't ship an official macOS driver, most commonly Razer mice (DeathAdder, Basilisk, Viper, etc. — Razer Synapse is Windows-only), but it works with any mouse whose side buttons register as standard HID buttons.

The problem

On Windows, a mouse's dedicated back/forward buttons "just work" thanks to the vendor's driver. On a Mac, without that driver, clicking those same buttons in Finder does nothing — no back, no forward, nothing happens at all. That's because Finder doesn't listen for raw mouse button numbers; it only responds to the ⌘[ (back) and ⌘] (forward) keyboard shortcut. This affects Razer, and often also unofficial/unbranded, mice on macOS — anything without first-party Mac driver support for extra buttons.

SideNav fixes this by listening for those button clicks system-wide and translating them into that shortcut, so Finder navigation works exactly the way you'd expect it to.

Requirements

  • macOS 13 (Ventura) or later
  • A mouse with distinct back/forward buttons that report as HID button 3 and button 4 (the common default across most mice — see Troubleshooting if yours differ)

Installing

Option 1: Download the DMG (easiest)

  1. Grab the latest SideNav-x.y.z.dmg from Releases.
  2. Open it and drag SideNav onto the Applications shortcut.
  3. Open SideNav from your Applications folder.

SideNav isn't notarized by Apple (no paid developer account behind this), so on first open, macOS Gatekeeper will refuse to launch it as "from an unidentified developer." Right-click (or Control-click) SideNav.app in Applications and choose Open, then confirm - you only need to do this once.

On first launch, macOS will also show a permission dialog and add SideNav to System Settings > Privacy & Security > Accessibility in an off state - toggle it on there, then click Enabled in SideNav's menu bar menu if it isn't already checked.

Option 2: Build from source

No Xcode required - just the Swift toolchain that ships with Command Line Tools:

git clone https://github.com/jackharvest/SideNav.git
cd SideNav
./build.sh
cp -R SideNav.app /Applications/
open /Applications/SideNav.app

Usage

Click the ↔ icon in the menu bar:

  • Enabled - turns the remap on/off instantly. This is your quick undo: switch it off and your mouse behaves stock again.
  • Launch at Login - starts SideNav automatically next time you log in.
  • Uninstall SideNav… - turns off the remap, removes the login item, clears saved settings, and moves SideNav.app to the Trash (recoverable until you empty it).
  • Quit SideNav - exits without uninstalling.

Uninstalling

Use the Uninstall SideNav… menu item above - it handles everything and only takes one confirmation click. If SideNav won't launch for some reason, you can undo everything by hand instead:

  1. Open System Settings > General > Login Items, remove SideNav if it's listed.
  2. Open System Settings > Privacy & Security > Accessibility, remove SideNav if it's listed.
  3. Delete /Applications/SideNav.app.
  4. Optionally delete its saved settings: defaults delete com.jackharvest.sidenav

Troubleshooting

If your mouse's back/forward buttons don't report as HID button 3/4, the remap won't fire. Confirm your button numbers with the included diagnostic script:

cd scripts
swiftc diagnose_buttons.swift -o diagnose_buttons
./diagnose_buttons

Click your side buttons and watch the printed buttonNumber values (grant Accessibility permission to your terminal app if prompted). If they're not 3/4, update kBackButton / kForwardButton at the top of main.swift and rebuild.

How it works

SideNav creates a session-level CGEventTap that listens for otherMouseDown/otherMouseUp events. When it sees button 3 or 4, it swallows the click and synthesizes a ⌘[ or ⌘] key event instead. Everything else passes through untouched. Login-item registration uses the modern SMAppService API rather than a hand-installed LaunchAgent, so enabling/disabling it is always clean and fully reversible. Requesting Accessibility access goes through AXIsProcessTrustedWithOptions(prompt: true), which is what makes SideNav auto-register (in a denied state) in System Settings the first time it runs, instead of requiring you to add it manually.

Releasing

./release.sh builds the app and packages it into a DMG (SideNav-x.y.z.dmg) with the custom background in scripts/dmg_background.png and a drag-to-Applications layout, via create-dmg (brew install create-dmg). Bump CFBundleShortVersionString in Info.plist first.

FAQ

Why don't my mouse's back and forward buttons work in Finder on Mac? Because Finder (and most Mac apps) only responds to the ⌘[ / ⌘] keyboard shortcut for back/forward navigation, not to raw mouse button numbers. Mice with an official macOS driver translate their buttons into that shortcut for you; mice without one (most Razer mice, plus many generic/unbranded mice) don't, so the buttons do nothing.

Does this fix Razer mouse buttons on macOS, since Razer Synapse doesn't support Mac? Yes - that's the primary use case SideNav was built for. It doesn't need Synapse or any vendor software at all; it works at the macOS input-event level, independent of the mouse brand.

Will this work with my mouse if it's not a Razer? Almost certainly, as long as its back/forward buttons register as HID button 3 and 4, which is the near-universal default for mice with programmable side buttons. Use the diagnostic script in Troubleshooting to confirm your button numbers if you're not sure.

How is this different from Karabiner-Elements or SensibleSideButtons? Those tools can do this too (and more), but they're general-purpose remappers with a much larger surface area. SideNav is a single-purpose, from-scratch, fully open-source implementation that does exactly one job, with nothing else to configure.

Is SideNav safe to run? Does it send any data anywhere? SideNav has no network code at all - it only reads mouse-button events locally and posts synthetic keystrokes locally. Read main.swift; the entire app is ~200 lines.

License

MIT, see LICENSE.

About

Fix mouse back/forward buttons not working in macOS Finder — free menu bar app that remaps side buttons (Razer DeathAdder and others) to Cmd+[ / Cmd+]

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors