logoalt Hacker News

gorgoiler • today at 4:39 AM • 1 reply • view on HN

It is indeed frustrating.

Historically, of course, copy and paste on a Unix machine was a mouse thing and followed X11 conventions. You selected text with the left mouse button — automatically be saved to the primary clipboard just by virtue of being selected, no key press needed — and the middle mouse button pasted it at the location you clicked.

This is somewhat different to having the two part motion/action of select/control-C and click/control-V. It’s boiled down to just select and middle-click. Separately, you can often use shift-Insert to paste the primary buffer.


Replies

russellbeattie • today at 7:01 AM

I only recently learned that when using the MacOS trackpad with the terminal, you can simulate a middle button click to paste: Highlight some text anywhere in the console, drag it a little and let go. As you pull the text, a little green arrow will pop up and when you let go of the drag (anywhere) it'll paste the text into the prompt, just like middle click does.

Maybe everyone has known this forever and I'm the last to find out, but I thought I'd share as it was a revelation. I middle click all the time when using a mouse, so it was nice to finally discover a replacement while using the trackpad.

➕ show 1 reply