Lightweight daemon for middle-click emulation on macOS.
- Supports:
- MacBook onboard trackpad;
- Magic Trackpad;
- Magic Mouse.
- Uses 12 MB of RAM (compared to 40+ for MiddleClick)
- Highly configurable.
To open links in a new tab or close tabs in browsers with a single action using one hand (without pressing cmd) and paste highlighted text in the Terminal app.
I don't think these kinds of background apps need any UI or menu items. The background daemon is launched once, configured via the terminal, and then left for a long time.
It just works, consuming the minimum possible resources.
brew install mishamyrt/tap/nanomiddleclickTo build the project, you must have the Rust toolchain installed on your computer.
make
make installOnce the app is installed, you need to start the background process. To do this, run the following in your terminal:
nanomiddleclick daemon on
The daemon reads settings from co.myrt.nanomiddleclick. After changing the configuration, you must restart the daemon:
kill -HUP "$(pgrep -x nanomiddleclick)"You can use any number of fingers (up to 10) to middle-click.
βοΈ Note: setting fingers to 2 will conflict with normal two-finger right-clicks.
defaults write co.myrt.nanomiddleclick fingers -int 4This is useful if your second hand accidentally touches the touchpad.
Disabled by default.
defaults write co.myrt.nanomiddleclick allowMoreFingers -bool trueThe default values for these settings should work for most users, but if they aren't working correctly for you, you should start by adjusting them.
The maximum distance the cursor can travel between touch and release for a tap to be considered valid. The position is normalized and values go from 0 to 1.
Default is 0.05.
defaults write co.myrt.nanomiddleclick maxDistanceDelta -float 0.03The maximum interval in milliseconds between touch and release for a tap to be considered valid.
Default is 300
defaults write co.myrt.nanomiddleclick maxTimeDelta -int 150Some (actually very rare) applications have built-in separate support for 3-finger taps. To avoid conflicts with them and prevent the daemon from running, use can use ignoredAppBundles parameter.
Default is empty.
defaults write co.myrt.nanomiddleclick ignoredAppBundles -array com.apple.finder com.apple.TerminalThe app can handle both clicks and trackpad taps. By default, it follows the system behavior for 1 and 2 fingers, but you can set a custom one:
defaults write co.myrt.nanomiddleclick tapToClick -bool trueMagic Mouse supports several types of actions to emulate a middle-click:
centerβ click with one finger in the horizontal center zone.threeFingerβ click with 3 fingers anywheredisabledβ ignore Magic Mouse and emulate middle-click only with trackpad.
Default is center.
defaults write co.myrt.nanomiddleclick mouseClickMode -string threeFingerHeavily inspired by MiddleClick.app
MIT.