machineghost
machineghost

Reputation: 35790

VS Code: How to Switch Between Code and Terminal *Without* Focusing the Dropdown

There are already several questions about "how do I switch back and forth between code and the terminal in VS Code", and the (correct) answer to all of them is:

ctrl + `

But there's a problem with that answer. I very often switch to the terminal and hit up + ENTER to run the previous command. However, when I do so too quickly, VS Code focuses me not on the terminal, but on the terminal-switching-dropdown in the upper right corner.

As a result, I wind up changing terminals (because the up + ENTER goes into the dropdown and not the terminal itself) ... when I just want to focus the existing terminal and type there.

Is there any way to make VS code not focus on that dropdown? Or even just to remove it entirely?

Upvotes: 3

Views: 862

Answers (2)

gonzalesraul
gonzalesraul

Reputation: 847

  • CRTL + 1 = focus on editor while your focus on terminal
  • CRTL + ` = focus on terminal while your focus on editor

Upvotes: 1

machineghost
machineghost

Reputation: 35790

It turned out the problem wasn't the up key, it was the SHIFT key. In VS Code CTRL + tilde sends you to the terminal, but CTRL + SHIFT + ` instead opens a new terminal session.

(As a side note, I could use the "code" tag to express that second tilde, but Stack Overflow botches both tildes and the "code" tag when I try to format just "CTRL + tilde".)

The shift key on my keyboard sticks sometimes, and it was making this happen without me realizing it (and I mistakenly attributed it to the up key since I press both together).

Thanks to everyone who helped me narrow the problem down in the comments!

Upvotes: 1

Related Questions