MiddleDrag
Three-finger trackpad gestures for middle-click and middle-drag on macOS
Install / Use
/learn @NullPointerDepressiveDisorder/MiddleDragREADME
MiddleDrag
Three-finger trackpad gestures for middle-click and middle-drag on macOS.
The middle mouse button your Mac trackpad is missing.
<div align="center"> </div> <p align="center"> <img src="https://raw.githubusercontent.com/NullPointerDepressiveDisorder/MiddleDrag/gh-pages/docs/assets/demo.gif" alt="MiddleDrag Demo" width="600"> </p>The Problem
Mac trackpads don't have a middle mouse button. Many apps expect one.
MiddleDrag fixes this. Three-finger tap for middle-click. Three-finger drag for middle-drag. Works alongside Mission Control and other system gestures.
Use Cases
Browsers
- Open links in new background tabs
- Close tabs with a click
- Open bookmarks/history in new tabs
Design & Creative Tools
- Pan canvas in Figma, Photoshop, Illustrator, GIMP
- Navigate large documents in PDF viewers
- Scroll in any direction without modifier keys
Development
- Close editor tabs in VS Code, Sublime Text, IDEs
- Middle-click paste in terminals (where supported)
- Pan around large codebases in code visualization tools
3D & CAD Software
- Orbit and pan viewports in Blender, FreeCAD, Fusion 360, SketchUp, Maya, ZBrush, OnShape
- Navigate Google Earth and mapping applications
- Essential for apps with broken or missing trackpad support
Productivity
- Autoscroll in supported applications
- Any workflow that expects 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 install --cask middledrag
MacPorts
sudo port install MiddleDrag
Manual Download
- Download the latest
.pkginstaller from Releases - Open the installer and follow the prompts
- Launch MiddleDrag from your Applications folder
- Grant Accessibility permissions when prompted
Verify Download Integrity
Downloads are cryptographically attested via GitHub Artifact Attestations.
# Requires GitHub CLI: brew install gh
gh attestation verify ~/Downloads/MiddleDrag-{VERSION}.pkg --repo NullPointerDepressiveDisorder/MiddleDrag
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:
- MultitouchSupport framework provides raw touch coordinates
- GestureRecognizer detects three-finger tap/drag patterns
- Accessibility API generates synthetic middle-mouse events
- 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+.
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
</details>
Compatibility
| macOS Version | Status | |---------------|--------| | macOS 15 (Sequoia) | ✅ Supported | | macOS 26 beta (Tahoe) | ✅ Compatible |
Works with built-in MacBook trackpads and external Magic Trackpads.
Troubleshooting
<details> <summary>Gestures not working</summary>- Check Accessibility permissions: System Settings → Privacy & Security → Accessibility
- Toggle "Enabled" in the menu bar
- Restart the app
macOS treats each app version as a new application. Re-grant permissions:
- System Settings → Privacy & Security → Accessibility
- Toggle MiddleDrag off then on
- Restart MiddleDrag
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.
</details>Contributing
Contributions welcome. See CONTRIBUTING.md.
Acknowledgements
MiddleDrag uses Sentry for crash reporting and Sparkle for auto-updates. See THIRD_PARTY_LICENSES for full license texts.
Trademark
MiddleDrag™ is used as a trademark by Karan Kunal Mohindroo. The MIT License grants rights to the code, not the name. You may use the name "MiddleDrag" for:
- Forks intended for contribution back to this project
- Describing compatibility (e.g., "works with MiddleDrag")
- Factual references and reviews
If you distribute a modified version as a separate project, we ask that you choose a different name to avoid user confusion.
License
<p align="center"> <i>The middle mouse button your Mac trackpad is missing.</i> </p>
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
