1

Any suggestions how to toggle between code and integrated terminal in VS Code?

In PowerShell ISE for example it's : Ctr+D terminal and Ctr+I code

Can't find anything similar for VS Code.

Thank you in advance for any suggestions

3
  • Ctrl+` toggles the console, you can set up you're own keybinding as well (File -> Preferences -> Keyboard Shortcuts) Commented Apr 9, 2017 at 0:14
  • great Thank you! Commented Apr 9, 2017 at 13:33
  • Another thread exists: stackoverflow.com/questions/42796887/… My take: Ctrl + M for toggle between VS code frames Commented Jul 22, 2022 at 4:35

2 Answers 2

7

At current, the last post by sqlaide on this thread had a great answer (that works). You open up your keybindings.json* file and add the text below between the square brackets. Once complete, you can use Ctrl+` to move focus back and forth between the code and the terminal.

*File > Preferences > Keyboard Shortcuts and click on keybindings.json.

{ "key": "ctrl+`", "command": "workbench.action.terminal.focus", "when": "!terminalFocus"}, { "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"} 
Sign up to request clarification or add additional context in comments.

1 Comment

Perhaps one of the new unassigned viewport navigation commands would work for you, such as 'workbench.action.navigateDown' .
0

elaborating on the previous answer, I would like to share my working configuration to switch between Code and Terminal with or without full-sized Terminal.

NOTE: I tested this on my Mac, running VSCode on an EC2 instance.

settings.json

{ "multiCommand.commands": [ { "command": "multiCommand.move2Terminal", "sequence": [ "workbench.action.toggleMaximizedPanel", "workbench.action.terminal.focus" ] }, { "command": "multiCommand.move2Code", "sequence": [ "workbench.action.toggleMaximizedPanel", "workbench.action.focusActiveEditorGroup" ] } ] } 

keybindings.json

[ // Switch between Terminal and Code { "key": "shift+cmd+,", "command": "workbench.action.terminal.focus", "when": "!terminalFocus" }, { "key": "shift+cmd+,", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus" } // Switch to Terminal full-screen and back to Code { "key": "shift+cmd+.", "command": "extension.multiCommand.execute", "args": { "command": "multiCommand.move2Terminal" }, "when": "!terminalFocus" }, { "key": "shift+cmd+.", "command": "extension.multiCommand.execute", "args": { "command": "multiCommand.move2Code" }, "when": "terminalFocus" }, ] 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.