Skip to content

Method to suppress the default CTRL+C/CTRL+V mapping specifically for WSL; profile-specific keybindings? #5790

Open

Description

@davea1

Editor's Note (Dustin L. Howett (MSFT) (@DHowett-MSFT)): This may be a good place to track profile-specific keybindings?

With the classic Windows terminal, Ctrl+c and Ctrl+v can be used for copy and paste when working within a Windows shell just as I would expect/prefer. However, when using WSL, this is typically not the case and those keys are available for use by Linux applications such as Vim.

How can I replicate this same behavior with the new Windows Terminal?

Background:
When working specifically within the WSL environment, Vim is my primary editor and the presence of any Ctrl+v mapping effectively blocks the use of blockwise Visual mode (http://vimdoc.sourceforge.net/htmldoc/visual.html#CTRL-V).

Removal of these mappings in a global scope is undesirable since I do not want to lose the use of Ctrl+c and Ctrl+v for copy and paste when working within a Windows shell.

I realize that similar issues have been discussed at length and that any choice here is somewhat of a compromise, but the ability to replicate the current behavior of the classic Windows terminal in this regard is a tradeoff that I find acceptable/desirable.

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 7, 2020
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on May 7, 2020
  3. davea1 commented on May 7, 2020

    @davea1
    Author

    This issue is somewhat related to: #5641

  4. DHowett-MSFT commented on May 15, 2020

    @DHowett-MSFT
    Contributor

    Maybe what we need is profile-specific keybindings. I'm surprised we don't have a workitem for that.

  5. added
    Area-SettingsIssues related to settings and customizability, for console or terminal
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    on May 15, 2020
  6. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on May 15, 2020
  7. changed the title [-]Method to suppress the default CTRL+C/CTRL+V mapping specifically for WSL[/-] [+]Method to suppress the default CTRL+C/CTRL+V mapping specifically for WSL; profile-specific keybindings?[/+] on May 15, 2020
  8. davea1 commented on May 17, 2020

    @davea1
    Author

    Dustin L. Howett (MSFT) (@DHowett-MSFT) This was actually what I had considered as the most obvious solution to this issue, but simply wanted to leave it up to the developers to choose whatever path they were the most comfortable with. Thanks!

  9. adamjstewart commented on Jun 3, 2020

    @adamjstewart

    For the vim Ctrl+V use case, would it be possible to do something similar to what we do for Ctrl+C?

    Proposed Behavior

    Ctrl+C:

    1. When text is selected, copy the text
    2. When no text is selected, send the SIGINT signal to terminate an application

    Ctrl+V:

    1. When in vim insert mode, paste copied text
    2. When in vim normal mode, use blockwise visual mode

    Possible Workaround

    Is there any way to remap the behavior of Ctrl+V in my .vimrc to produce the desired effect right now?

  10. motosir commented on Jul 18, 2020

    @motosir

    For the vim Ctrl+V use case, would it be possible to do something similar to what we do for Ctrl+C?

    Proposed Behavior

    Ctrl+C:

    1. When _text is selected_, copy the text
    
    2. When _no text is selected_, send the SIGINT signal to terminate an application
    

    Ctrl+V:

    1. When in vim _insert_ mode, paste copied text
    
    2. When in vim _normal_ mode, use blockwise visual mode
    

    Possible Workaround

    Is there any way to remap the behavior of Ctrl+V in my .vimrc to produce the desired effect right now?

    is it possible for terminal to detect if vim is running/current vim mode?

  11. DHowett commented on Jul 18, 2020

    @DHowett
    Member

    Not generally, no. We would only be able to detect instances of vim.exe and miss all instances of vim in WSL or over SSH (because you can’t inspect the processes inside a virtual machine or on a remote system just through SSH)

  12. 43 remaining items

  13. pm100 commented on Oct 27, 2023

    @pm100

    its not just WSL, I have a text mode app that wants to receive the ctrl-v key stroke. It has its own idea for what that means

  14. pm100 commented on Oct 27, 2023

    @pm100

    shouldnt it be that if ENABLE_PROCESSED_INPUT is off then ctrl-v should be ignored? Or could we have another mode bit for paste (ENABLE_PASTE)

  15. alex-jitbit commented on Nov 22, 2023

    @alex-jitbit

    Actually, if there was a simple method to send Ctrl + V to the app just once it would be enough.

    My use-case: I use "micro" editor via ssh. And copy-pasting in it is a huge pain in Windows terminal, because it intercepts my input.

    PS. disabling the default "Ctrl+V" helps, but offering the above option would still be nice

  16. Hobart commented on Mar 26, 2024

    @Hobart

    Actually, if there was a simple method to send Ctrl + V to the app just once it would be enough.

    Using Windows Terminal to run a Cygwin bash shell runs into this problem, the default 'lnext' (literal next character) tty setting is Ctrl-V, which lets you e.g. put control characters into regexps you're typing instead of backslash escapes.

  17. daviddwlee84 commented on Jul 26, 2024

    @daviddwlee84

    I found there are options in the Actions tab that can easily delete the key bindings
    image

  18. taiwork commented on Aug 6, 2024

    @taiwork

    For the vim Ctrl+V use case, would it be possible to do something similar to what we do for Ctrl+C?

    Proposed Behavior

    Ctrl+C:

    1. When text is selected, copy the text
    2. When no text is selected, send the SIGINT signal to terminate an application

    Ctrl+V:

    1. When in vim insert mode, paste copied text
    2. When in vim normal mode, use blockwise visual mode

    Possible Workaround

    Is there any way to remap the behavior of Ctrl+V in my .vimrc to produce the desired effect right now?

    #5790 (comment)
    To achieve the desired behavior, follow these steps after removing the <C-v> key binding as mentioned in the link above:

    1. Open your .vimrc file.
    2. Add the following line to remap <C-v> in insert mode to paste the copied text:
    inoremap <C-v> <C-r>+

    This will allow to paste copied text in insert mode while keeping its default behavior in normal mode.

  19. rhoog-ine commented on Jun 5, 2025

    @rhoog-ine

    Proposed Behavior

    Ctrl+C:

    1. When text is selected, copy the text
    2. When no text is selected, send the SIGINT signal to terminate an application

    Converting ctrl-C into sigint is a function of the termios layer. The running application can configure the termios layer, not 'guestimate' what is the appropriate action depending on what is on screen/selected that is a bad idea!

  20. mh166 commented on Aug 30, 2025

    @mh166

    Hi everyone,
    thanks as always for all the hard work that goes into Windows Terminal. It’s such a great project that makes life on Windows a lot more comfortable! 🙌

    Dustin L. Howett (MSFT) (@DHowett-MSFT) Just curious if there are any updates on the idea of profile-specific keybindings. From what I gathered it seems generally accepted, but I wasn’t sure if it’s just waiting for prioritization or if there are technical/architectural challenges holding it back. No pressure at all, just asking out of interest. Thanks again!

  21. lhecker commented on Sep 1, 2025

    @lhecker
    Member

    No updates as of yet. We work on a mix of things that interest us personally (e.g. improvements to stability, or the settings UI) as well as issues/workitems that are popular on GitHub. This one is somewhat popular, so I expect it to be worked on sooner than some other issues. There aren't any plans for it yet, though.

  22. g-berthiaume commented on May 28, 2026

    @g-berthiaume

    +1
    This makes the Windows Terminal pretty much unusable for any TUI using keyboard shortcuts.

  23. DHowett commented on May 28, 2026

    @DHowett
    Member
  24. locked and limited conversation to collaborators on May 28, 2026
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-SettingsIssues related to settings and customizability, for console or terminalIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions