Terminal: Binding Ctrl-C to "copy" prevents using Ctrl-C for cancelling a command

Created on 3 Aug 2019  路  5Comments  路  Source: microsoft/terminal

Description of the new feature/enhancement

Right now when you add the following to your keybindings:

{
                "command" : "copy",
                "keys" : 
                [
                    "ctrl+c"
                ]
            },

It prevents Ctrl-C from terminating processes, even when there's no current text selection.

If I remove the keybinding (or change it to "ctrl+shift+c"), then I get my Ctrl-C for terminating processes back, but lose the ability to copy with Ctrl-C when text is selected.

Compare this with the current command prompt, where pressing Ctrl-C when no text is selected cancels/terminates whatever process is running, while pressing Ctrl-C with text selected copies the text.

My guess is that keybindings probably need to have an extra additional option for "this keybinding is only active while text is selected".

Area-Input Area-Settings Help Wanted Issue-Bug Product-Terminal Resolution-Duplicate

Most helpful comment

I don't want to use Ctrl-Shift-C for copy; I'd like to use Ctrl-C for copy when I have text selected, as I can in both the native Windows terminal and ConEmu (as well as Ctrl-C being "copy" in every other Windows application).

All 5 comments

This is fixed in 0.3,
"copy" is now bound to "ctrl+shift+c"
(see #2014, # 2014, #1093, and possibly others...)

I don't want to use Ctrl-Shift-C for copy; I'd like to use Ctrl-C for copy when I have text selected, as I can in both the native Windows terminal and ConEmu (as well as Ctrl-C being "copy" in every other Windows application).

ctrl+shift+c still does not work.

Ctrl+c is a standard is another thing... And one of the most important thing we can expect from shell environment. There should be a way to extract info...

Version: 0.3.2142.0

The copy key handler should be returning false if there was no active selection.

Oh hey, #2285 is totally a dupe of this issue, but that thread has a bit more details in it, so I'm gonna close this one as a dupe of that one.

Was this page helpful?
0 / 5 - 0 ratings