A lightweight (~100KB) macOS utility for Logitech MX Master mice. Built because Logitech Options has certificate issues and is bloated (141MB just for basic mouse features).
- Reverse mouse scroll - Reverses scroll direction for mouse only (trackpad stays natural)
- Thumb wheel zoom - Smooth pinch-style zoom using the side scroll wheel (works in Safari, Preview, Maps, etc.)
- Thumb button → Mission Control - Press the thumb button to open Mission Control
# Clone the repo
git clone https://github.com/gitethanwoo/mxmaster.git
cd mxmaster
# Build
swiftc -O -o MXMaster MXMaster.swift
# Create app bundle
mkdir -p /Applications/MXMaster.app/Contents/MacOS
cp MXMaster /Applications/MXMaster.app/Contents/MacOS/
# Create Info.plist
cat > /Applications/MXMaster.app/Contents/Info.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>MXMaster</string>
<key>CFBundleIdentifier</key>
<string>com.mxmaster.app</string>
<key>CFBundleName</key>
<string>MXMaster</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSUIElement</key>
<true/>
</dict>
</plist>
EOF
# Sign the app (use your own identity or ad-hoc)
codesign --force --deep --sign - /Applications/MXMaster.app
# Launch
open /Applications/MXMaster.appOn first launch, grant Accessibility permission:
- Open System Settings → Privacy & Security → Accessibility
- Click + and add
/Applications/MXMaster.app - Enable the toggle
mkdir -p ~/Library/LaunchAgents
cat > ~/Library/LaunchAgents/com.mxmaster.daemon.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mxmaster.daemon</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/MXMaster.app/Contents/MacOS/MXMaster</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
EOF
launchctl load ~/Library/LaunchAgents/com.mxmaster.daemon.plistOnce running, you'll see a mouse icon in your menu bar. Click it to access Settings:
- Reverse mouse scroll - Toggle scroll reversal for mouse (trackpad unaffected)
- Thumb wheel zooms - Enable pinch-style zoom with the side scroll wheel
- Zoom sensitivity - Adjust how fast the zoom responds
- Thumb button → Mission Control - Map the thumb button to Mission Control
- Uses
CGEventTapto intercept mouse events - Detects mouse vs trackpad via
scrollWheelEventIsContinuousflag - Generates native macOS magnification gesture events for smooth zoom
- Interpolates scroll deltas at 120Hz for buttery smooth animation
The zoom feature uses undocumented CGEvent fields discovered through reverse engineering (credit to mac-mouse-fix):
- Event Type 29 (
NSEventTypeGesture) - Field 110 = 8 (
kIOHIDEventTypeZoom) - Field 113 = magnification value
- Field 132 = phase (began/changed/ended)
- macOS 12.0+
- Logitech MX Master mouse (or similar with thumb wheel)
MIT