VS Code shortcut to focus integrated terminal

Super-simple answer

If the terminal is not already displayed, I hit Ctrl+J.

If the terminal is displayed, I hit Ctrl+J twice.

Note: Ctrl is Command on Mac.


More complicated answer

Open the Command Palette and search for Preferences: Open Keyboard Shortcuts for details of current keyboard shortcuts.

Open Keyboard Shortcuts

Some people (and the official shortcuts reference) report that the following work out-of-the-box:

  • Mac: Command + ` or
  • Win/Linux: Ctrl + `

(that’s a backtick or grave, not an apostrophe, single-quote, or prime)

As far as I can see, by default as of 1.72.2 and 1.73.0-insider, this shortcut is not bound by default (on Windows, at least).

Ctrl+` is not bound by default

This could be because, on Windows, the backtick key on many (most?) PC keyboards is an OEM key (in my case, oem_8).


If you want to manually add the bindings to toggle between terminal and editor, do this:

  1. Open keyboard shortcuts (Command Palette > Preferences: Open Keyboard Shortcuts)

    Open Keyboard Shortcuts

  2. Find Terminal: Focus Terminal, set your preferred keybinding, and set the When value to !terminalFocus (right-click > Change When Expression)

  3. Find View: Focus Active Editor Group, set your preferred keybinding (can be same so it acts as a toggle), and set the When value to terminalFocus.

    keyboard shortcuts

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)