Skip to content

Lightweight macOS utility for Logitech MX Master mice. ~100KB replacement for Logitech Options.

Notifications You must be signed in to change notification settings

gitethanwoo/mxmaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

MXMaster

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).

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

Installation

Build from source

# 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.app

Grant Accessibility Permission

On first launch, grant Accessibility permission:

  1. Open System Settings → Privacy & Security → Accessibility
  2. Click + and add /Applications/MXMaster.app
  3. Enable the toggle

Auto-start on Login

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.plist

Usage

Once 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

How It Works

  • Uses CGEventTap to intercept mouse events
  • Detects mouse vs trackpad via scrollWheelEventIsContinuous flag
  • Generates native macOS magnification gesture events for smooth zoom
  • Interpolates scroll deltas at 120Hz for buttery smooth animation

Technical Details

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)

Requirements

  • macOS 12.0+
  • Logitech MX Master mouse (or similar with thumb wheel)

License

MIT

About

Lightweight macOS utility for Logitech MX Master mice. ~100KB replacement for Logitech Options.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages