Binding Ctrl-C to "copy" prevents using Ctrl-C for cancelling a command #3081

Closed
opened 2026-01-30 23:12:26 +00:00 by claunia · 5 comments
Owner

Originally created by @hach-que on GitHub (Aug 3, 2019).

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".

Originally created by @hach-que on GitHub (Aug 3, 2019). # 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".
Author
Owner

@Luuk34 commented on GitHub (Aug 3, 2019):

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

@Luuk34 commented on GitHub (Aug 3, 2019): This is fixed in 0.3, "copy" is now bound to "ctrl+shift+c" (see #2014, # 2014, #1093, and possibly others...)
Author
Owner

@hach-que commented on GitHub (Aug 3, 2019):

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

@hach-que commented on GitHub (Aug 3, 2019): 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).
Author
Owner

@mehmetilker commented on GitHub (Aug 3, 2019):

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

@mehmetilker commented on GitHub (Aug 3, 2019): 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
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 5, 2019):

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

@DHowett-MSFT commented on GitHub (Aug 5, 2019): The copy key handler should be returning `false` if there was no active selection.
Author
Owner

@zadjii-msft commented on GitHub (Aug 13, 2019):

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.

@zadjii-msft commented on GitHub (Aug 13, 2019): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3081