Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add copy on select (per Unix terminals) #524

Closed
mikemaccana opened this issue May 7, 2019 · 42 comments · Fixed by #2152
Closed

Feature: add copy on select (per Unix terminals) #524

mikemaccana opened this issue May 7, 2019 · 42 comments · Fixed by #2152
Assignees
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@mikemaccana
Copy link
Contributor

mikemaccana commented May 7, 2019

Similar to #523, except the reverse: selected data in the terminal is not copyable to other apps.

Your Windows build number: (Type ver at a Windows Command Prompt)

Can't tell you, because when I select it it won't paste into this form!

But using another terminal app (and fixing the command to work with Windows default shell):

$ #[Environment]::OSVersion.VersionString
Microsoft Windows NT 10.0.18890.0

What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

Both:

  • Highlighting text to select it then pasting it fails
  • Highlighting text, pressing Ctrl C (which shouldn't be necessary) and then pasting it fails

What's wrong / what should be happening instead:

Different data is pasted

It should be pasting whatever was selected in the terminal.

Here's the options provided by Fluent Terminal:

Annotation 2019-07-21 175305

@zadjii-msft zadjii-msft added this to the Windows Terminal v1.0 milestone May 7, 2019
@zadjii-msft zadjii-msft added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 7, 2019
@zadjii-msft
Copy link
Member

@carlos-zamora is working on this currently :)

@nizos
Copy link

nizos commented May 7, 2019

I have no problem doing this. This is how I copy/paste:
Mouse left click and hold to select text.
Release left click.
Mouse right click once on selected text.
It is now in your clipboard.


Microsoft Windows [Version 10.0.18362.86]

@mikemaccana
Copy link
Contributor Author

mikemaccana commented May 8, 2019

@nizos Selecting should copy the text to the clipboard immediately per any other terminal. Doing additional steps is a workaround, not a fix.

@nizos
Copy link

nizos commented May 8, 2019

@mikemaccana I have read the bug report. I just didn’t know that the terminal is supposed to copy anything selected immediately. Where did you read that it is supposed to work that way? I have always used the method I described to copy text in command prompt.

@mikemaccana
Copy link
Contributor Author

@nizos Copying immediately on select has been default on Unix terminals for at least 21 years, but probably longer than that.

@zadjii-msft
Copy link
Member

Clearly, lots of people have varying opinions on how they want their text to be copy/pasteable from the terminal. That's why we're hoping to make it a feature that's customizable to however you like :)

@carlos-zamora
Copy link
Member

Yeah. I'm working on the keybindings. Really just need to make sure I send the VT sequence.

As for the copying immediately on selection, I'll be sure to make a setting and add that functionality.

@mikemaccana mikemaccana changed the title Selected data is not copyable into other apps Feature: add copy on select (per Unix terminals) May 16, 2019
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Needs-Tag-Fix Doesn't match tag requirements and removed Area-UserInterface Issues pertaining to the user interface of the Console or Terminal labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@jberanek
Copy link

Middle mouse button paste would be awesome too.

@mikemaccana
Copy link
Contributor Author

@jberanek Right click paste works now, but agreed it would be good to allow it to be middle mouse too. You should probably make a separate issue though!

@zadjii-msft
Copy link
Member

Man what we really need is a way to set mouse-bindings as well as keybindings. I believe @carlos-zamora is working on a spec for that (and I'll let him link the appropriate thread in for that discussion)

@timriker
Copy link

timriker commented Jun 19, 2019

More details from #1332 :
Dragging should highlight like console, but automatically put the highlighted text into the clipboard and leave it highlighted.

Selection should NOT include trailing spaces as the current terminal incorrectly does with ctrl-shift-c, It should post multiple lines to the clipboard.
The selection should look for characters are actual spaces, and not blanks and not replace blanks with spaces.

Dragging with alt or control held down should select a block instead of rolling lines.

Clicking the middle mouse button should paste the clipboard.

Mouse wheel should scroll, perhaps 3 lines at a time.

This functionality can be compared with xfce4-terminal or gnome-terminal on a Linux box, or on WSL under X servers like VcXsrv. Also compare to MoboXterm support. XTerm is similar but lacks the block select feature.

@cyberixae
Copy link

I am happy that there already seems to be some way to do copy/paste. However, I'm not a big fan of right click performing actions. Typically right click would open a context menu. Trying to open a menu and running a set of commands in a terminal by accident sounds like a nightmare.

I did some voluntary work on Freedesktop.org clipboard specification back in 2007. Clipboards seem to be a rather controversial topic and I think unix clipboards are still not consistent. I tried to post an update to the specification back then to fill in some gaps and add some ideas that I gathered from elsewhere. Not sure what happened after I stopped working on it. However, my original mailing list post seems to still be available if someone is interested. https://lists.freedesktop.org/archives/xdg/2007-November/008985.html

@Shorotshishir
Copy link

regarding highlight and copy, I see some abnormal behavior. left click selects a character and if you click and drag from the tab it marks everything in between and copies. if you double click right, it pastes too. Works for any terminal.

reference video: https://imgur.com/a/jomxTJY

@TCB13
Copy link

TCB13 commented Jun 24, 2019

@nizos Copying immediately on select has been default on Unix terminals for at least 21 years, but probably longer than that.

Yeah, basic functionality that should be available from day one in Windows Terminal.

@shamoons
Copy link

Can't wait for this feature to work. Having to use a mouse is detestable

@solacens
Copy link

solacens commented Jul 8, 2019

Is this my problem or double-clicking words won't smart select the word at the moment?

@carlos-zamora
Copy link
Member

Is this my problem or double-clicking words won't smart select the word at the moment?

In PR #1197

@solacens
Copy link

solacens commented Jul 8, 2019

Thanks @carlos-zamora

Will it be included in the next preview version from Microsoft Store? Can't wait to test it!

@shamoons
Copy link

shamoons commented Jul 8, 2019

Do we know when the next preview will be released from the Store?

@MoshiBin
Copy link

Can we have a keybind for paste? I personally like Shift+Insert but if there's a way to set any binding to paste that would be better.

@ghost ghost added the In-PR This issue has a related PR label Jul 30, 2019
@carlos-zamora carlos-zamora added In-PR This issue has a related PR and removed Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR labels Jul 30, 2019
@cactysman
Copy link

This currently is the only thing keeping me away from the terminal.

@mikemaccana
Copy link
Contributor Author

I just tried 0.3, in case there was any updates not mentioned in the thread, status is same as #524 (comment)

@ghost ghost closed this as completed in #2152 Aug 20, 2019
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Aug 20, 2019
@ghost
Copy link

ghost commented Aug 27, 2019

🎉This issue was addressed in #2152, which has now been successfully released as Windows Terminal Preview v0.4.2382.0.:tada:

Handy links:

@DHowett-MSFT
Copy link
Contributor

@JonDavis-AZED Sorry, the resolution to the already-resolved “add an optional copy on select feature” request should include something about dragging the tab strip?

@Enorma
Copy link

Enorma commented Dec 29, 2019

just my two cents...
RIGHT click should paste the CLIPBOARD,
MIDDLE click should paste the SELECTION.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.