How to switch between terminals in Visual Studio Code?

I'm looking to switch between terminals open in visual studio code.

With this "Switch focus between editor and integrated terminal in Visual Studio Code" question I correctly setup the focus, but I would like to switch between terminals, not only from code to terminal.

Is there a way to do it?


Solution 1:

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

Solution 2:

Looking deeply I found it:

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

:)