Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

4 Answers 4

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
8  
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

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 don't think there is a way in general but some programs will accept the middle button as paste

e.g.

  • 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
2  
scroll wheel = middle button (it is clickable on most of mouses nowadays). –  Installero Aug 13 '11 at 15:31

Your Answer

 
discard

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.