Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I have the integrated VSCode terminal not capture CTRL-E, CTRL-X, and CTRL-A?

How can I have the integrated VSCode terminal not capture CTRL-E, CTRL-X, and CTRL-A?

Actual behavior: does what the keyboard shortcuts normally do outside of terminal

Expected behavior:

CTRL-X-E should open $EDITOR in the integrated terminal, like it does in Readline-based terminals

like image 697
Max Heiber Avatar asked Jan 23 '26 07:01

Max Heiber


2 Answers

From the Command Palette I selected to view the JSON Keyboard Shortcuts, then entered this into the resulting file:

// Place your key bindings in this file to override the defaults
[
    {
        "key": "ctrl+e",
        "command": "ctrl+e",
        "when": "terminalFocus"
    },
]

This allows me to use CTRL+E in the terminal when I have the terminal in focus, rather than it being interpreted by VS Code.

like image 200
Shafiq Jetha Avatar answered Jan 24 '26 21:01

Shafiq Jetha


modify vscode settings.json to avoid Ctrl + E conflict:

{
    "terminal.integrated.commandsToSkipShell": [
        "-workbench.action.quickOpen"
    ]
}

Find other command ID: Ctrl + K , Ctrl + S open "Keyboard Shortcuts", press Alt + K and then record the conflict key combination.

like image 24
A Code Cow Avatar answered Jan 24 '26 22:01

A Code Cow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!