Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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

share|improve this answer
FWIW this only solves the middle-click; I don't believe its possible to auto-copy highlighted text without an additional command. (Except for apps that specifically provide the feature, like iTerm2) – adamrmcd Nov 10 '11 at 19:00
And has anyone come up with a reasonable solution for that so far? I miss my select-wheelpaste SO MUCH!!! – Rubens Feb 27 '15 at 21:00

Create the following Automator service: enter image description here

Assign it a keystroke, like shiftcontrol] (something unlikely to conflict with anything). Then, use BetterTouchTool to assign that keystroke to the middle mouse button.

The middle shell script comes from this fine answer. The first shell script copies the selection to the clipboard, the middle script clicks the mouse at its current location, and the AppleScript sends a V to paste the contents of the clipboard

share|improve this answer

After highlighting text in the Terminal, I can middle-click to paste it back into the Terminal without using the copy/paste keyboard shortcuts. This does not seem to work when the text comes from other applications ie. I can't copy text from TextEdit and then paste into Terminal with a middle-click. I am running Lion and I did not have configure anything to get this default behavior. I'm not sure about other versions of OS X.

share|improve this answer

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 ( 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.

share|improve this answer
This is AWESOME! So close. If it only had a separate buffer to hold the highlighted text separately from normally copied text it would be almost as close to Linux as possible. Nice job – Ryan Martin Jun 24 at 20:27

I don't think there is a way in general but some programs will accept the middle button as paste


  • Aquamacs - an OSX configured emacs

  • iTerm2 - a replacement for Terminal

I suspect there won't be many more as mice now have scroll wheels rather than a middle button.

share|improve this answer
scroll wheel = middle button (it is clickable on most of mouses nowadays). – installero Aug 13 '11 at 15:31

I tried the Automator script suggested by Daniel. It did NOT work for me on OS X 10.10.

I was able to make BetterTouchTool (v 1.15), alone, work for some applications. Like this:

enter image description here

I did Left Mouse twice for several reasons. The first one usually only changes the focus to the new window, but does not position the cursor. Also, clicking in a text box usually selects all of the text, which is then deleted when something is pasted there. I usually want the original text to stay.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.