Skip to content

Copy & Paste Keybindings #968

Closed

Description

Environment

Windows build number: 10.0.18362.86
Windows Terminal version (if applicable):

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.

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on May 23, 2019
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on May 23, 2019
  3. zadjii-msft commented on May 23, 2019

    @zadjii-msft
    Member

    This sounds right up Carlos Zamora (@carlos-zamora)'s alley

  4. added
    Area-UserInterfaceIssues pertaining to the user interface of the Console or Terminal
    Help WantedWe encourage anyone to jump in on these.
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    on May 23, 2019
  5. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on May 23, 2019
  6. zadjii-msft commented on May 23, 2019

    @zadjii-msft
    Member

    Or actually, anyone could hop on this. You'd want to set up copy and paste actions in App.cpp (like _Scroll, for example) that trigger the appropriate actions on the TermControl. There should already be Copy and Paste ShortcutActions, so it's just a matter of registering defaults for them, and wiring the actions to the bindings (see HookupKeyBindings or similar in App.cpp).

  7. DHowett-MSFT commented on May 23, 2019

    @DHowett-MSFT
    Contributor

    I must insist that the default bindings for this not be Ctrl+-only.

  8. DHowett-MSFT commented on May 23, 2019

    @DHowett-MSFT
    Contributor

    Agh, sorry. I didn't intend to close this issue.

  9. CobusKruger commented on May 23, 2019

    @CobusKruger
    Author

    I must insist that the default bindings for this not be Ctrl+-only.

    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 ^V has never been useful and I suspect that this is true for a very significant number of people. Would it be possible to enable this as a setting?

  10. DHowett-MSFT commented on May 23, 2019

    @DHowett-MSFT
    Contributor

    Maybe we'll need profile-specific key bindings. Right now, all binds are re-bindable 😄

  11. 49 remaining items

  12. mikepurvis commented on Apr 9, 2020

    @mikepurvis

    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.

  13. bjorn-ali-goransson commented on Apr 9, 2020

    @bjorn-ali-goransson
  14. jave27 commented on Apr 9, 2020

    @jave27

    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. :)

  15. gakio12 commented on Apr 10, 2020

    @gakio12

    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 ctrl+shift+c/v, so I am glad that Windows Terminal also has that set as the default.

  16. bjorn-ali-goransson commented on Apr 10, 2020

    @bjorn-ali-goransson

    Why not have both Ctrl+C/V and Ctrl+Shift+C/V though?

  17. zadjii-msft commented on Apr 10, 2020

    @zadjii-msft
    Member

    Björn Ali Göransson (@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.

    See this PR and #5187

  18. soilstack commented on Apr 19, 2020

    @soilstack
    • It appears as though the popular behavior has been set as the default.

    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.

  19. DHowett-MSFT commented on Apr 19, 2020

    @DHowett-MSFT
    Contributor

    Michael (@soilstack) thanks. Consider reading the most recent messages on this thread.

  20. SteveIves commented on Jun 9, 2020

    @SteveIves

    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.

  21. zadjii-msft commented on Jun 9, 2020

    @zadjii-msft
    Member

    Steve Ives (@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"},
      ]
    }
  22. SteveIves commented on Jun 10, 2020

    @SteveIves

    Mike Griese (@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.

  23. zadjii-msft commented on Jun 10, 2020

    @zadjii-msft
    Member

    Out of curiosity, what part of

    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.

    is us not fixing this?

  24. jagojar commented on Jun 11, 2020

    @jagojar

    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.

  25. DHowett commented on Jun 11, 2020

    @DHowett
    Member

    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.

  26. locked as resolved and limited conversation to collaborators on Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalHelp WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions