Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to give OS X the usual X-windows behavior where selecting text in any application automatically copies it to the clipboard, and the middle mouse button automatically pastes it? ⌘-C, ⌘-V is a little annoying.

share|improve this question
3  
Well, it works as expected in X...don't know of a solution in quartz. –  dmckee Dec 25 '09 at 0:02
    
Bumping the question, because I don't want to ask it again. –  dag729 May 6 '10 at 20:05
1  
bump too for me... would be great to have this –  CharlesB Jun 24 '10 at 15:17
1  
I just wanted to ask the same question. I recently started to work on MacOS X at my workplace and I am long time Linux user, this is one hell of a Linux feature I am missing on MacOS. –  Patkos Csaba Aug 9 '10 at 19:01
4  
You mean you want to give up your ability to replace the selected text with what's on the clipboard? –  Spiff Sep 14 '10 at 17:40

10 Answers 10

This has already been discussed (and answered) on apple.stackexchange.com. The accepted answer in that discussion was to use Better Touch Tool.

However, all those solutions that suggest using some tool to map a mouse click to Cmd-V do not completely mimic the behaviour of X, where you can have different content in the mouse-controlled buffer and the keyboard-controlled buffer (i.e., you can paste two different strings depending on whether you middle-click or press CTRL-V).

share|improve this answer
5  
And more problematic. It doesn't have the "highlight text to copy" feature. –  Nifle May 11 '12 at 11:52

Just for the archives: what you want does actually work in Terminal, but only in the very same Terminal window:

Select some text (and release the mouse button), and use the middle mouse button to paste.

Alternatively, when using the trackpad or a two-button mouse: after selecting, click and drag the selection just a bit; you'll see the pointer change. Now, when you let go of the button, the selected text is pasted at your cursor. Hitting Esc while dragging cancels.

drag and drop

Of course, Terminal is just one out of many programs. But for me, it is the only place I actually want this behaviour, if only because of Spiff's comment about being able to replace (mouse) selected text with what's on the clipboard.

share|improve this answer
    
Actually copy/drag text works great for me in any editor target (ie, Terminal, BBEdit, text input box on this page, etc)... you can combine a drag with Exposé and CMD-tab. Also, if you want to "copy to clipboard", you can just drag to desktop and it will create a text clipping that you can then drag to other locations repeatedly (it's like a visual clipboard in a way). –  r00fus Sep 22 '10 at 5:04

If you just need it for Terminal then you can install iTerm which is a terminal which has the X windows cut and paste.

share|improve this answer
1  
How do I copy-on-select across Terminal <-> Browser <-> Email? –  Aleksandr Levchuk Feb 5 '12 at 21:39
    
As I said just for terminal to/from something nothing else –  Mark Feb 6 '12 at 11:50
    
Unfortunately iTerm feels much slower in responsiveness. –  iltempo Sep 19 '12 at 8:57
1  
For the record, iTerm2 (iTerm's successor) can be found here: iterm2.com –  deizel Dec 21 '12 at 13:09

As a long time linux user I've been desperatly searching for such functionality in osx. Mark is right - iTerm is the answer plus some settings in the X11 Preferences. Visit here for more info.

share|improve this answer

I am using BetterTouchTool and have configured it to emulate a middle mouse button in Termina l application on three finger click.

share|improve this answer

I didn't find a native way either. After trying different things I ended up using TotalTerminal.

It adds some additional functionality to the terminal app. Besides copy-on-select you can set a global key to bring up the terminal whenever you like.

share|improve this answer

You might try fiddling with your mouse settings to see if the driver lets you assign the paste function to middle-click. If it doesn't, try looking into USB Overdrive.

As for copy-on-select, I am unaware of any software that gives you this functionality, and judging from what I can find on Google, none probably exists.

share|improve this answer

I know this isn't exactly the same, but if you select text and right click on it, you do have the option to copy. Once something is on the pasteboard, a right click can paste as well.

I fooled around with my Logitech multi-button mega mouse and couldn't make anything exactly like what you describe, even though one of the options is a "middle click" button.

Theo

share|improve this answer

DISCLAIMER: I have not tested this because I don't have a mac. But, the content was too large to post as a comment. So, I am posting it as an answer instead.

I am windows user and have implemented exact same function in windows using a script written for a program called Autohotkey.

Now, as per this question, IronAHK runs AHK scripts on Mac.

Here's the one I am using for windows (Ofcourse, you would have to tweak it a lot to make it work):

    cos_mousedrag_treshold := 20 ; pixels


#IfWinNotActive ahk_class ConsoleWindowClass

~lButton::
  MouseGetPos, cos_mousedrag_x, cos_mousedrag_y
  keywait lbutton
  mousegetpos, cos_mousedrag_x2, cos_mousedrag_y2
  if (abs(cos_mousedrag_x2 - cos_mousedrag_x) > cos_mousedrag_treshold
    or abs(cos_mousedrag_y2 - cos_mousedrag_y) > cos_mousedrag_treshold)
  {
    wingetclass cos_class, A
    if (cos_class == "Emacs")
      sendinput !w
    else
      sendinput ^c
  }
  return

~mbutton::
  WinGetClass cos_class, A
  if (cos_class == "Emacs")
    SendInput ^y
  else
    SendInput ^v
  return

#IfWinNotActive


;; clipx
^mbutton::
  sendinput ^+{insert}
  return

Script credit goes to this post. Try experimenting and comment if you get it to work. I'll try to help as much as possible.

Meanwhile, have a look at this as well. But, I don't think it is advanced enough for the function you desire.

share|improve this answer

I don't have a mac so I can't check this out and the content was too long for just a comment so I'm posting it as an answer. Maybe it will prove helpful to others.

Solution1:

Go to X11 preferences - highlight "emulate 3 button mouse".

Now middle click = option+click.

Highlight/paste will work just like in Linux.

Solution2:

Another way is to install the better touch tool, this allows you to assign your own commands to different mouse/touchpad gestures.

  • 1 finger right tap = cmd c (copy) and
  • 2 finger tap = cmd v (paste)

It is one step more than the highlight = copy, but still preferable over the keyboard shortcuts.

From the macworld hintforums.

share|improve this answer

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.