A macOS menu bar app that enables middle-click and middle-drag functionality using three-finger trackpad gestures.
- Three-finger tap → Middle mouse click
- Three-finger drag → Middle mouse drag (for panning in apps like Blender, CAD software, browsers, etc.)
- Works alongside system trackpad gestures without interference
- Configurable sensitivity and smoothing
- Menu bar icon with quick access to settings
- Launch at login support
- macOS 15.0 (Seqoia) or later
- Built-in trackpad or Magic Trackpad
- Accessibility permissions (required for mouse event generation)
brew tap nullpointerdepressivedisorder/tap
brew install --cask middledrag- Download the latest release from the Releases page
- Extract and move
MiddleDrag.appto your Applications folder - Launch the app
- Grant Accessibility permissions when prompted (System Settings → Privacy & Security → Accessibility)
Since MiddleDrag is not notarized with Apple, macOS will show a warning on first launch. To open:
Option 1: Right-click the app → Open → click "Open" in the dialog
Option 2: Run in terminal:
xattr -cr /Applications/MiddleDrag.appThis is standard for open source macOS apps that aren't distributed through the Mac App Store.
Once running, MiddleDrag appears as a hand icon in your menu bar:
- Three-finger tap: Performs a middle mouse click (useful for opening links in new tabs, closing tabs, etc.)
- Three-finger drag: Performs a middle mouse drag (useful for panning/orbiting in 3D applications)
- Enabled: Toggle gesture recognition on/off
- Drag Sensitivity: Adjust how fast the cursor moves during drag (0.5x - 2x)
- Advanced:
- Require Exactly 3 Fingers: Only recognize gestures with exactly 3 fingers
- Block System Gestures: Attempt to prevent system gesture interference
- Launch at Login: Start MiddleDrag automatically when you log in
MiddleDrag uses Apple's private MultitouchSupport framework to receive raw touch data from the trackpad before it's processed by the system gesture recognizer. This allows it to:
- Detect three-finger gestures independently
- Generate synthetic middle mouse events via the Accessibility API
- Suppress conflicting system-generated click events using a CGEventTap
- Xcode 16.0 or later
- macOS 15.0 SDK or later
# Clone the repository
git clone https://github.com/yourusername/MiddleDrag.git
cd MiddleDrag
# Build release version
./build.sh
# Or build and run debug version
./build.sh --debug --run- Open
MiddleDrag.xcodeproj - Select your signing team in project settings
- Build and run (⌘R)
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
| macOS Version | Status |
|---|---|
| macOS 15 (Sequoia) | ✅ Fully supported |
| macOS 26 beta (Tahoe) | ✅ Compatible |
Works with both built-in MacBook trackpads and external Magic Trackpads.
- Requires Accessibility permissions to generate mouse events
- Physical trackpad clicks (pressing down) with 3 fingers may still trigger system gestures - soft taps work best
- Some applications may not respond to synthetic middle mouse events
- Check that Accessibility permissions are granted in System Settings
- Try toggling the "Enabled" option in the menu bar
- Restart the app
- Use soft taps instead of physical clicks
- Adjust your trackpad settings in System Settings if needed
- Check Accessibility permissions
- Toggle "Enabled" in the menu
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
- Inspired by the need for middle-click functionality on macOS trackpads
- Uses the MultitouchSupport private framework for raw touch access
