How to switch between terminals in Visual Studio Code?

alt + up/down left/right arrows to switch between splitted terminals.

If alt unfocuses your terminal and focuses the menu, add this to the settings file

// settings.json
"window.titleBarStyle": "custom",
"window.customMenuBarAltFocus": false

Looking deeply I found it:

{
  "key": "shift+cmd+]",
  "command": "workbench.action.terminal.focusNext",
  "when": "terminalFocus"
}

:)


As of Release 1.56.0, there is inbuilt support for switching terminals in VS Code:

New keybindings

The terminal has several new default keybindings this release:

  1. Move to previous terminal - Ctrl+PageUp (macOS Cmd+Shift+])
  2. Move to next terminal - Ctrl+PageDown (macOS Cmd+shift+[)
  3. Focus terminal tabs view - Ctrl+Shift+\ (macOS Cmd+Shift+\) - Terminal tabs preview

As always, these default keybindings can be removed or custom keybindings can be added via the keybindings system.


Go to FilePreferencesKeyboard Shortcuts or just press Ctrl + k + Ctrl + s.

Then click the icon in upper right corner, it opens keybindings.json file:

Visual Guide

Try adding the following two entries to this file:

{
    "key": "ctrl+pagedown",
    "command": "workbench.action.terminal.focusNext",
    "when": "terminalFocus"
},
{
    "key": "ctrl+pageup",
    "command": "workbench.action.terminal.focusPrevious",
    "when": "terminalFocus"
}

Note: On Mac change ctrl to cmd