-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Copy & Paste Keybindings #968
Comments
This sounds right up @carlos-zamora's alley |
Or actually, anyone could hop on this. You'd want to set up copy and paste actions in App.cpp (like |
I must insist that the default bindings for this not be |
Agh, sorry. I didn't intend to close this issue. |
I know why you're saying that, and that's of course why the normal console has it behind a setting one must enable. But having them behind Ctrl+Shift or something similar defeats the purpose. It's the muscle memory that make these the keybindings worth having. For me, having Ctrl+V enter |
Maybe we'll need profile-specific key bindings. Right now, all binds are re-bindable 😄 |
I like the way that WSL+Bash handles copy/paste. Ctrl+C only copies when something is selected. If nothing is selected then Ctrl+C behaves as usual and sends an SIGINT. |
@namatoj That's perfect; exactly the way it should be. |
I guess we should at least support Ctrl-Insert/Shift-Insert/Shift-Delete if Ctrl-C/V/X may have conflicts? |
IMO the options should be:
|
All of the discussion about "CTRL+C being copy only if something is selected" ignores CTRL+V -- there's no indicator to know that we should paste, and if one values consistency above all else it's problematic to say "CTRL+C only works when X, but CTRL+V works always". The alternative, "CTRL+C if selected, CTRL+SHIFT+V to paste always" isn't particularly consistent either. |
But CTRL-C is universally "send a SIGINT", there's a huge ambiguity there. Ubuntu's terminal resolves this by using CTRL-SHIFT-C/V for copy/paste; the MacOS terminal resolves it by using CMD-C for copy and CTRL-C for interrupt. CTRL-V has no such conflict. Some emacs users might bind it to things, but if you're enough of an emacs power user to be rebinding keys, you're probably using capslock as your meta key anyway. I think the main risk of making the "smart" behaviour the default is just that users will accidentally interrupt a process because they missed their selection. If that's a concern or we want consistency then I would say to just copy Ubuntu and make the default bindings for both CTRL-SHIFT-C/V. |
By implementing Customised Keybindings per profile, this could allow the default Ubuntu keyboard shortcuts to behave as they should, or allow the user to change them to allow Windows clipboard shortcuts to behave as they should. |
@mikepurvis The smart Ctrl-C behavior is used in many Windows terminals with no issues. I like how https://github.com/Eugeny/terminus does it where it flashes a short pop-up to indicate text has been copied or pasted. |
Tooltips for Copied would be good, especially where Ctrl+C is not always assigned to Copying |
As we can see, this is a constantly occurring problem because it's unintuitive. See ayugioh2003/today-i-learned#281 Ctrl+C, Ctrl+V should "just work", and there is no way of going around that. The users have made (and keep on doing) their verdict. And as the new command line tool (not this one) works "correctly", ie. as expected, this one should too. If you developers are fond of another scenario, please add it as a setting and let the popular behavior be the default. |
I appreciate your input here. Thanks! Just to underscore a couple of points:
|
But that's assuming people know how to change it. Pardon my bad manners.
A more meaningful metric would be how many pressed Ctrl+V having something
in their clipboard, and then got the ^V, then erased it, or simply ended in
quitting the application ...
Den tors 19 mars 2020 02:31Dustin L. Howett (MSFT) <[email protected]>
skrev:
|
For anyone landing on this thread from Google: the default keybindings are Also, I don't see this discussed here, but I think it is worth mentioning: Enter to copy and right-click to paste does not work either. |
for my dual-bound paste to be separate records, rather than "chorded" See: - microsoft/terminal#968 (comment) - microsoft/terminal#5015
From an accessibility standpoint having combinations of 3 keys, or a mouse click+key is very difficult if not impossible for people with one hand or otherwise limited hand function. This is a big reason why I can't use emacs and stuck with vi/vim. The default behavior that we have had in Linux/Xwindows for the last 20yrs is the most accessible. DoubleClick to select a word, tripleclick the line, and right click pastes. This appears to work within a Terminal frame but it doesn't reliably populate the clipboard. Note - ConEmu has this functionality - I can select text in a terminal and it populates the clipboard. |
@DHowett-MSFT, I was also stuck not understanding why copy/paste doesn't work just like every other terminal on Windows or Linux (which is what lead me to this github issue after some searching). I don't think that people prefer this setting, they just have no clue how to change it and don't feel comfortable editing the keybindings file. |
That's a little dramatic, given that the present default behaviour of Terminal (Ctrl-Shift-C/V) matches exactly what the default terminal on Ubuntu does. |
That's a higher-level question; who should we optimize for? Clearly not the
windows users ...
Den tors 9 apr. 2020 19:08Mike Purvis <[email protected]> skrev:
|
I'm just calling out that it's unfair to be clutching our pearls and claiming the Terminal team have made the wrong call here because it's different from "every other terminal on Windows or Linux", when every other terminal on Windows is a third party affair and the team here has copied as defaults what the leading Linux distribution has been doing since forever. And the only reason this isn't an issue on Mac OS as well is that cmd and ctrl on that system happen to be separate buttons. |
All fair points Mike, but let's face it, most windows users will not know
how to paste in this terminal.
That's my only problem here. Not only mine, but many people, lots of people
being quite proficient in windows but no experience at all with linux, and
there's a problem with noone knowing just how many. Do we want these people
to use terminal or dismiss it as feature-incomplete?
If we're content with the current state of affairs, then at the very least,
let's measure how many try pasting but can't.
If we don't want telemetry on this, then how about a small counter and when
you've tried it 3 times in 3 minutes, show a notification with a link to
this issue.
... I'm kidding, instructions on how to change it.
Den tors 9 apr. 2020 19:57Mike Purvis <[email protected]> skrev:
|
For telemetry's sake, I just downloaded and built this terminal today, and this is my only major complaint so far. There's an option in Preferences that indicates to me that Ctrl-C/V should work, but it quite obviously doesn't. Please enable the "Smart Ctrl-C" feature mentioned above, it's been my #1 complaint about CMD since the dawn of time. :) |
I want to point out that I found this issue searching for how Windows Terminal implemented copy paste. One of the biggest complaints I hear from developers working on both Linux and Windows is that Windows copy/paste is inconsistent with whatever third party shell is installed and between Linux. Nearly every Linux distribution / terminal uses |
Why not have both Ctrl+C/V and Ctrl+Shift+C/V though? |
@bjorn-ali-goransson We actually just changed the default settings file to include both, so users can easily opt-out of Ctrl+C/Ctrl+V if they want. |
Nonsense. It means people abandon trying to fix it, or don't know that it can be fixed. It's the reason I am on this thread at all now. |
@soilstack thanks. Consider reading the most recent messages on this thread. |
It is truly astounding to me that you guys can't figure out how to make something as fundamental as this work! This is a huge deal. I love everything else about the Terminal app, but this basic flaw catches me out every time I use it. |
@SteveIves You know you can change your keybindings to be whatever you'd like, right? If you want Ctrl+C/V as copy-paste, go ahead and add those to your keybindings. If you want Ctrl+Shift+C/V, you can use those too. If you want alt+q as copy and shift+0 as paste, go for it. As of 1.0, the defaults include Ctrl+Shift+C/V as copy-paste, and new users will also get Ctrl+C/V as copy/paste in their settings file. EDIT: use whatever subset of these you want: {
"keybindings": [
// Ctrl+C / Ctrl+V for copy paste
{ "keys": "ctrl+c", "command": "copy"},
{ "keys": "ctrl+v", "command": "paste"},
// Ctrl+Shift+C / Ctrl+Shift+V for copy paste
{ "keys": "ctrl+shift+c", "command": "copy"},
{ "keys": "ctrl+shift+v", "command": "paste"},
// Disable Ctrl+Shift+C / Ctrl+Shift+V for copy paste
{ "keys": "ctrl+shift+c", "command": "unbound"},
{ "keys": "ctrl+shift+v", "command": "unbound"},
]
} |
@zadjii-msft yes, I know this, and as a dev I can do this. But if you want Terminal to replace cmd.exe then you need to fix this. |
Out of curiosity, what part of
is us not fixing this? |
Ctrl+Shift+C/V is not natural. Also not right-click menu? I find Windows Terminal useful, but the lack of the menu and Ctrl+C/V is making me reconsider my options. |
Yeah, this thread has run its course. Anybody who is inclined to comment: read the most recent four comments. It says all you need to know. |
Environment
Steps to reproduce
In the standard Windows 10 console, you can enable the use of Ctrl+C/V for copy and paste. Windows Terminal doesn't have this, and it is extremely frustrating.
Expected behavior
Enable the use of Ctrl+C for copy and Ctrl+V for paste.
Actual behavior
Ctrl+C doesn't copy anything, and Ctrl+V just writes ^V at the prompt.
The text was updated successfully, but these errors were encountered: