You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Method to suppress the default CTRL+C/CTRL+V mapping specifically for WSL; profile-specific keybindings? #5790
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.
Reacted by nbros, anthonyyoshimura, ccn, Xin Wang, Ryan C Blanchard, Kevin Lloyd Bernal, Konstantin Scherban, Spenser Black, Daniel Macák, nop0x07bc and 107 more
Reacted by aesyondu, Stéphane Archer, Jonathan Rascher, Gabriel Ziegler, Anupam Asok, Krzysztof Arendt, Christophe Haddad, Jevgeni Kiski, Ahmad Nugroho, 0z4ck and 7 more
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
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!
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)
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.
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!
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!
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.
Activity
davea1 commentedon May 7, 2020
This issue is somewhat related to: #5641
DHowett-MSFT commentedon May 15, 2020
Maybe what we need is profile-specific keybindings. I'm surprised we don't have a workitem for that.
[-]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?[/+]davea1 commentedon May 17, 2020
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!
adamjstewart commentedon Jun 3, 2020
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:
Ctrl+V:
Possible Workaround
Is there any way to remap the behavior of Ctrl+V in my
.vimrcto produce the desired effect right now?motosir commentedon Jul 18, 2020
is it possible for terminal to detect if vim is running/current vim mode?
DHowett commentedon Jul 18, 2020
Not generally, no. We would only be able to detect instances of
vim.exeand 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)43 remaining items
pm100 commentedon Oct 27, 2023
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
pm100 commentedon Oct 27, 2023
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)
alex-jitbit commentedon Nov 22, 2023
Actually, if there was a simple method to
send Ctrl + V to the app just onceit 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
Hobart commentedon Mar 26, 2024
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.
Add a spec for "Snippets" (#17329)
daviddwlee84 commentedon Jul 26, 2024
I found there are options in the Actions tab that can easily delete the key bindings

taiwork commentedon Aug 6, 2024
#5790 (comment)
To achieve the desired behavior, follow these steps after removing the
<C-v>key binding as mentioned in the link above:.vimrcfile.<C-v>in insert mode to paste the copied text:This will allow to paste copied text in insert mode while keeping its default behavior in normal mode.
rhoog-ine commentedon Jun 5, 2025
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!
mh166 commentedon Aug 30, 2025
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!
lhecker commentedon Sep 1, 2025
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.
g-berthiaume commentedon May 28, 2026
+1
This makes the Windows Terminal pretty much unusable for any TUI using keyboard shortcuts.
DHowett commentedon May 28, 2026
G. Berthiaume (@g-berthiaume) then unbind them?