17 October 2025

Visual Studio Code: Keep Keyboard Commands Inside Terminal




Microsoft Visual Studio Code for Linux is a brilliant, free IDE (Integrated Development Environment). Especially handy is the ability to use the terminal without leaving the editor. However, it can be frustrating when a familiar shell key combination gets "intercepted" by the IDE, even when the terminal window has the focus. A key combination that should take the user to the end of a line, for instance, might bring up a list of recent files - not what the user had in mind.

Most common shell commands like command recall (Ctrl+R) work as expected. But some don't. Here's how to keep chosen commands from being intercepted by VS Code.

Please note: a newer version of this story is available on the Seasoned Developer Medium Site.


1. Find the command ID


Under File | Preferences | Keyboard Shortcuts you'll find a list of all keybindings:

Screenshot of VS Code keyboard shortcuts











Here you can search for the offending keybinding. Once you have it, right click and copy its ID:

Screenshot of VS Code command ID right click menu



2. Update Your settings.json File


This will give you a Command ID you can paste in your settings.json file. The user-level version of this file is located under ~/.config/Code/User.

Within the settings file add the command to skip, e.g. Ctrl-E, quick open:

terminal.integrated.commandsToSkipShell: [
               -workbench.action.quickOpen
]

Note the minus symbol in front. Now VS Code will keep your terminal keyboard commands where they belong!


No comments:

Post a Comment