Skip to content

NullPointerDepressiveDisorder/MiddleDrag

MiddleDrag

Three-finger trackpad gestures for middle-click and middle-drag on macOS.

Finally use your MacBook for CAD work without carrying a mouse.

macOS 15+ Swift 5.9+ License: MIT Homebrew GitHub release Downloads

MiddleDrag demo showing three-finger trackpad navigation in CAD software

The Problem

Professional 3D software expects middle-mouse-button navigation. MacBook trackpads don't have one.

For years, CAD users on Mac have been forced to either carry an external mouse, use awkward four-key modifier combinations, or fight with unreliable workarounds. Forum threads dating back to 2017 are filled with users pleading for a solution.

MiddleDrag fixes this. Three-finger tap for middle-click. Three-finger drag for middle-drag. Works alongside Mission Control and other system gestures.

Who This Is For

MiddleDrag is essential for users of applications with broken or missing trackpad navigation:

Application Native Trackpad Support MiddleDrag Value
FreeCAD ❌ Broken gestures Essential — native gestures misfire constantly
OnShape ❌ Force-click only Essential — no tap gestures, causes hand strain
ZBrush ❌ None Essential — zero multi-touch recognition
SketchUp Pro ❌ 4-key combos Essential — Ctrl+Cmd+Shift+drag is unusable
SolidWorks ❌ N/A (Windows VM) Essential — only zoom works through Parallels
Cinema 4D ⚠️ Alt-key required High — every action needs a modifier key
Fusion 360 ⚠️ Buggy High — breaks after updates and sleep cycles
Maya ⚠️ Erratic High — viewport spins without input
Rhino ✅ Good Moderate — sleep-wake bug breaks gestures
Blender ✅ Good Optional — native support works, but Alt-key conflicts exist

Also useful for browsers (middle-click to open links in new tabs, close tabs) and any application expecting middle-mouse input.

Features

  • Three-finger tap → Middle mouse click
  • Three-finger drag → Middle mouse drag (pan/orbit in 3D apps)
  • Works with system gestures — Mission Control, Exposé, and other macOS gestures remain functional
  • Native macOS app — Menu bar interface, no terminal configuration required
  • Configurable — Adjust sensitivity and smoothing to your preference
  • Launch at login — Set it and forget it

Installation

Homebrew (Recommended)

brew tap nullpointerdepressivedisorder/tap
brew install --cask middledrag

Manual Download

  1. Download from Releases
  2. Move MiddleDrag.app to Applications
  3. Launch and grant Accessibility permissions when prompted

Gatekeeper Notice

MiddleDrag isn't notarized with Apple (standard for open source apps). On first launch:

Right-click → Open → Click "Open" in the dialog

Or run: xattr -cr /Applications/MiddleDrag.app

Usage

MiddleDrag runs in your menu bar as a hand icon.

Gesture Action
Three-finger tap Middle click
Three-finger drag Middle drag (pan/orbit)

Settings

  • Enabled — Toggle gesture recognition
  • Drag Sensitivity — Cursor speed during drag (0.5x – 2x)
  • Require Exactly 3 Fingers — Ignore 4+ finger touches
  • Launch at Login — Auto-start with macOS

Why MiddleDrag?

vs. BetterTouchTool ($10-24)

BetterTouchTool is powerful but overwhelming. Hundreds of options, complex interface, middle-click buried among features you'll never use. MiddleDrag does one thing well.

vs. Middle ($8)

Middle costs $8 for functionality that should be free. It's also closed-source. MiddleDrag is MIT-licensed and community-maintained.

vs. MiddleClick (open source)

MiddleClick requires terminal commands for all configuration — no GUI. MiddleDrag provides a native macOS settings interface. Both are open source, but MiddleDrag is actively maintained for modern macOS versions.

Requirements

  • macOS 15.0 (Sequoia) or later
  • Built-in trackpad or Magic Trackpad
  • Accessibility permissions

How It Works

MiddleDrag uses Apple's private MultitouchSupport framework to intercept raw touch data before the system gesture recognizer processes it. This allows three-finger gestures to generate middle-mouse events while leaving Mission Control and other system gestures intact.

Technical flow:

  1. MultitouchSupport framework provides raw touch coordinates
  2. GestureRecognizer detects three-finger tap/drag patterns
  3. Accessibility API generates synthetic middle-mouse events
  4. CGEventTap suppresses conflicting system click events

Building from Source

git clone https://github.com/NullPointerDepressiveDisorder/MiddleDrag.git
cd MiddleDrag
./build.sh

Or open MiddleDrag.xcodeproj in Xcode 16+.

Project Structure
MiddleDrag/
├── Core/
│   ├── GestureRecognizer.swift    # Gesture detection logic
│   ├── MouseEventGenerator.swift  # Mouse event synthesis
│   └── MultitouchFramework.swift  # Private API bindings
├── Managers/
│   ├── DeviceMonitor.swift        # Trackpad monitoring
│   └── MultitouchManager.swift    # Main coordinator
├── Models/
│   ├── GestureModels.swift        # Configuration types
│   └── TouchModels.swift          # Touch data structures
├── UI/
│   ├── AlertHelper.swift          # Dialog utilities
│   └── MenuBarController.swift    # Menu bar interface
└── Utilities/
    ├── LaunchAtLoginManager.swift # Login item management
    └── PreferencesManager.swift   # Settings persistence

Compatibility

macOS Version Status
macOS 15 (Sequoia) ✅ Supported
macOS 26 beta (Tahoe) ✅ Compatible

Works with built-in MacBook trackpads and external Magic Trackpads.

Troubleshooting

Gestures not working
  1. Check Accessibility permissions: System Settings → Privacy & Security → Accessibility
  2. Toggle "Enabled" in the menu bar
  3. Restart the app
After updating, gestures stopped

macOS treats each app version as a new application. Re-grant permissions:

  1. System Settings → Privacy & Security → Accessibility
  2. Toggle MiddleDrag off then on
  3. Restart MiddleDrag
Conflicts with system gestures

Use soft taps instead of physical clicks. The app is designed to coexist with system gestures, but pressing down hard may still trigger Mission Control.

Contributing

Contributions welcome. See CONTRIBUTING.md.

License

MIT License


Built for the CAD users who've been asking for this since 2017.

About

 Three-finger trackpad gestures for middle-click and middle-drag on macOS

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks