Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switch focus between editor and integrated terminal in Visual Studio Code

Does anyone know the keyboard shortcut (Mac and Linux) to switch the focus between editor and integrated terminal in Visual Studio Code?

like image 917
Abhijeet Avatar asked Mar 14 '17 21:03

Abhijeet


1 Answers

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". However you can compose the two steps by overloading the key and using the when clause.

Open the keybindings.json from the editor: CMD-SHIFT-P -> Preferences: Open Keyboard Shortcuts File and add these entries:

// Toggle between terminal and editor focus { "key": "ctrl+`", "command": "workbench.action.terminal.focus"}, { "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"} 

With these shortcuts I will focus between the editor and the Integrated Terminal using the same keystroke.

like image 182
wgj Avatar answered Sep 23 '22 08:09

wgj