MagicMouseAgent is a small macOS helper for a very specific job: replacing a small BetterTouchTool setup for Magic Mouse gestures.
Chinese guide: README.zh-CN.md
If you only want to use it and do not want to read build instructions, do this:
- Download the latest packaged zip from GitHub Releases when one is available.
- Unzip it anywhere you like.
- Double-click
Start MagicMouseAgent.command. - The first time, macOS will ask for Accessibility permission.
- In
System Settings -> Privacy & Security -> Accessibility, enable:
build/MagicMouseAgent.app
- Test the gestures in Chrome.
- If you want it to launch automatically after login, double-click
Install at Login.command. Running it again also repairs a previously disabled login item.
If you downloaded the source code instead of a packaged zip:
- Install Xcode Command Line Tools.
- Double-click
Build and Start MagicMouseAgent.command. - Grant Accessibility permission when macOS asks for it.
- Global
One-Finger Tap-> left click - Global
Right-Front Tap-> right click - Google Chrome
One-Swipe-Left-> previous tab - Google Chrome
One-Swipe-Right-> next tab - Google Chrome
Two-Finger Tap-> close current tab - Google Chrome
Middle-Fix Index-Near-Tap-> reopen last closed tab - Google Chrome
Middle-Fix Index-Far-Tap-> reopen last closed tab - Google Chrome
Index-Fix Middle-Near-Tap-> new tab - Google Chrome
Index-Fix Middle-Far-Tap-> new tab
These files are meant for normal users who would rather click than type:
Build and Start MagicMouseAgent.commandStart MagicMouseAgent.commandStop MagicMouseAgent.commandInstall at Login.commandUninstall from Login.command
- Quit Chrome and open it again.
- Remove
build/MagicMouseAgent.appfrom Accessibility, then add it again. - Run
Stop MagicMouseAgent.command, thenStart MagicMouseAgent.command. - If macOS blocks the script or app because it is unsigned, right-click it once and choose
Open. - If it stopped launching after login, run
Install at Login.commandagain to re-enable the login item.
Build from source:
python3 ./generate_config.py
./build.shCreate a packaged zip:
./package.shUseful shell commands:
./start.sh
./stop.sh
./status.sh
./install-login-agent.sh
./uninstall-login-agent.shLogs:
/usr/bin/log show --style compact --last 8m --predicate 'process == "MagicMouseAgent"'- This project uses Apple's private
MultitouchSupportframework, like Jitouch. - The default build is ad-hoc signed, not notarized.
- If you want to distribute polished prebuilt binaries broadly, the next step is Developer ID signing and notarization.
MagicMouseAgent is distributed under GPL-3.0. See LICENSE and NOTICE.