Can I copy by highlighting and paste by middle click on Mac OS X?

I was using Linux for the last couple of years and I find it extremely useful to copy text by highlighting it as well as to paste by clicking a middle mouse button.

I'm using a Mac now and I wonder if I can achieve such behaviour on Mac OS X.


I wrote a free little C program that does something similar to Gilligan's answer. Whenever you drag-highlight or double-click text, it copies to the clipboard buffer. Then you can middle-mouse-click in any window to paste it. It is called "macpaste" and on Github (https://github.com/lodestone/macpaste). It works globally for every program I use that has textual data.

In iTerm2, disable their middle-click in Preferences, otherwise you'll get double pastes.


You can try BetterTouchTool. You can assign custom trackpad, mouse, and keyboard events to trigger specific actions on a global or application-specific basis.

Here's my configuration to bind a three-finger tap to ⌘V (as this is the global paste shortcut. Alternatively you can select from dozens of other trackpad and mouse gestures to emulate the paste command.

enter image description here


The macOS terminal can do copy/paste with two separate buffers:

  1. The copy/paste buffer which is shared with all other applications. It can be accessed by CommandC/CommandV.
  2. A separate copy/past buffer which is shared only between (macOS) terminals. It can be filled (copy) by dragging over the text by mouse, double clicking, or ShiftCommand double-clicking for file names (no CommandV). The content of this buffer is pasted by the middle mouse button, by ShiftCommandV, or by Command + two-finger-click.