Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Mac: Paste on mouse middle button click

Open upachler opened this issue 4 years ago • 16 comments

Describe the solution you'd like?

I use the MacOS terminal quite a lot. One feature I use often and that I miss in Warp is middle mouse button insertion (this is a feature inherited from X Window back in the day).

Basically, you select text in the terminal with the mouse, and then later, in some other context, press the middle mouse button, which causes that text to be inserted where the cursor is. Maybe that doesn't translate 100% to what Warp wants to do; I could imagine that Warp may also want to place the insertion cursor where the user clicked (this is not done by the MacOS terminal).

Is your feature request related to a problem? Please describe.

No response

Additional context

No response

upachler avatar Nov 16 '21 10:11 upachler

This is also a feature I'm missing in Warp, however I'm used to copy on select and paste with right mouse click. This is super efficient when working on putty terminals on remote x servers from a Windows host. Recently switched to Mac, this is the feature I miss the most. When warp introduced copy on select I was super happy, I can just hope that paste with mouse could be implemented.

Maybe it's a good idea to make it a config option to choose, middle or right mouse button to paste content.

All the best

rlinq avatar Jan 12 '22 08:01 rlinq

FWIW, this is available in iTerm2 and I also use middle-click to paste a lot. Quite convenient and middle-click isn't used for anything else (not yet anyway).

mkartashev avatar Feb 09 '22 13:02 mkartashev

Another thing to note is that middle mouse button is often used to close the tab when hovering over it. This feature is available in web browsers, text editors, IDE's, etc. and I would love to see it implemented in Warp as well.

AlexZurek avatar Jun 21 '22 12:06 AlexZurek

+1 for this awesome feature

PRNDA avatar Jun 29 '22 05:06 PRNDA

Will reach back out to the team on this.

elviskahoro avatar Jul 06 '22 13:07 elviskahoro

This definitely needs to exist ;)

alexander-beedie avatar Oct 28 '22 09:10 alexander-beedie

Yep, missing this a lot as well. One important thing to note: Selecting and pasting something in this way does NOT overwrite what you have currently copied/cut in your clipboard. It will simply insert the selected text directly at the prompt.

ncri avatar Jan 09 '23 13:01 ncri

YA +1. Would love to have this.

cdcasey avatar Feb 01 '24 14:02 cdcasey

Not sure why this was closed, but we're not tracking middle-click paste support here: https://github.com/warpdotdev/Warp/issues/4329

dannyneira avatar Mar 07 '24 01:03 dannyneira

Duplicate of https://github.com/warpdotdev/Warp/issues/4329

dannyneira avatar Mar 07 '24 01:03 dannyneira

s/not/now/ I assume :)

joey-squid avatar Mar 07 '24 16:03 joey-squid

Technically this feature request was for Mac and the other one is for Linux, though it probably makes sense to have one across the board. Would it make sense to retitle/retag the other one so it's not platform-specific?

joey-squid avatar Mar 07 '24 16:03 joey-squid

Keeping this open to track middle click paste support on Mac

alokedesai avatar Mar 19 '24 20:03 alokedesai

Keeping this open to track middle click paste support on Mac

Appreciate you!

jeremyronking avatar Mar 19 '24 20:03 jeremyronking

Please please please :D

wandoschneider-liber avatar Mar 28 '24 16:03 wandoschneider-liber

Is there an ETA for this feature? It was there for a hot minute before it was peeled out for Linux only.

jeremyronking avatar Jun 26 '24 14:06 jeremyronking

A coworker just said to me "For me, it's a no-go if I can't use middle button". It's the only feature missing for him to move to Warp.

smbpunt avatar Jul 16 '24 11:07 smbpunt

THREE YEARS!!! Is this tooooo hard to implement, or the team just don't want to do it?

PRNDA avatar Jul 17 '24 00:07 PRNDA

I don't understand why this works on Linux but not Mac OS. Middle-click paste is standard across all terminals.

jabalsad avatar Jul 30 '24 20:07 jabalsad

Hey all! Warp engineer here. First, I'd like to share why this hasn't been done yet. Middle-click paste is very much a concept originating from the Linux world. Linux actually has separate, independent clipboards. The clipboard that you interact with when you ctrl-c/ctrl-v is separate from the one you interact with when you select/middle-click. Both can have different content concurrently, and Linux desktop environments will provide distinct slots for these.

Of course, several terminal apps have emulated this interaction on other OSes, such that its becoming standard. The complication is that MacOS just doesn't have separate clipboards. It's only got the one. So, the OS isn't providing the APIs to help back this functionality. Basically, Warp has to build its own space for the middle-click clipboard, and that is effectively mutable global state (not trivial in Rust). Middle-click paste also won't work across apps like it does in Linux. For example, on Linux you can select text (without copying with ctrl-c) in Firefox and middle-click paste it into your terminal. This won't be possible on MacOS. We were hesitant to introduce a feature that didn't behave as expected.

That said, the demand for this feature is undeniable. I'm finally looking into building a version of this in Warp. Stay tuned!

acarl005 avatar Aug 15 '24 18:08 acarl005

Closing as completed as we've shipped this feature in v0.2024.10.01.08.02.stable_00. if anyone needs to disable this for some reason, it can be done in preferences > features > editor > middle-clock to paste.

acarl005 avatar Oct 14 '24 07:10 acarl005