
With this I can use ctrl+x to navigate to any visible editor or terminal. You can try adding this to your keybindings.json directly but I would recommend you go through the keybinding UI ( cmd+K cmd+S on a Mac) so you can review/manage conflicts etc. Here is my approach, which provides a consistent way of navigating between active terminals as well as jumping between the terminal and editor panes without closing the terminal view.
Visual studio code editor code#
In modern versions of VS Code (as of 2022) the Default Keyboard Shortcuts (JSON) file is read-only, so that is why for the custom settings you need to edit a separate dedicated file keybindings.json. See if ctrl + ` works before attempting to add it. The key combination suggested here is now built into VSCode as a default (as of 1.72.2, maybe earlier).

With these shortcuts you can focus between the editor and the Integrated Terminal using the same keystroke. Toggle between terminal and editor focus Type " Preferences: Open Keyboard Shortcuts (JSON)" and press Enter.Īdd the following entries to the keybindings.json file:

Open the Command Palette ( Ctrl+ Shift+ P Windows/Linux or ⇧ ⌘ P Mac). You can achieve the desired effect by adding the appropriate settings to the keybindings.json file. However you can compose the two steps by overloading the key and using the when clause. While there are a lot of modal toggles and navigation shortcuts for VS Code, there isn't one specifically for "move from editor to terminal, and back again".
