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

Open
opened 2026-01-30 23:12:23 +00:00 by claunia · 0 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".
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3078