I am new with python and VS Code and I wanted to ask if there is a shortcut with which you can jump directly to the terminal when you are asked for an input. I find it annoying that I have to go to the terminal with my mouse every time when asked for an input. It would be perfect if I could just type as soon as I run the program.
I started with coding in the python playground at programiz.pro and there would pop up a input window where you could directly type in your input without moving your cursor.
I’m new to VS Code so I searched for a solution on the internet but haven’t found one yet.
2
Answers
I don’t know if there is a shortcut for that either but you may open a terminal in a new window so that you can just switch between the windows with alt + tab. Hope that helps.
A similar problem has an answer already on Super User. This seems to be something that you can configure in your settings. It may be possible (either natively or through an extension) to configure one hotkey to have two effects, i.e. to first run the program, and then move the cursor to the terminal window.
The relevant portion of the Super User answer is copied below, using the shortcut CTRL+k to move the cursor to the terminal, and CTRL+j to move the cursor (back) to the editor when you’re done:
focus terminal
workbench.action.terminal.focus
and then CTRL+k or press your custom key and then press enter.focus active editor group
workbench.action.focusActiveEditorGroup
and then press CTRL+j or press your custom key and then press enter.