How can I autoselect the Terminal when I run Visual Studio Code?

Viewed 375

I have the C/C++ extension in Visual Studio Code. Whenever I build and run the program ( usually I do that by the keyboard shortcut CTRL+ALT+N, instead of clicking on the Run icon ) I find it annoying to press every single time on the Terminal zone, in order for me to give my program an input. Can I select a setting in order for my application to autoselect the terminal whenever I run the program?

1 Answers

You can't really run and focus on the terminal with the same shortcut unless you install some extensions. But you can focus on the terminal by using ctrl + `. You can also change the binding for that by going into:

file -> preferences -> Keyboard Shortcuts

And there you need to search for workbench.action.terminal.focus and then you can set your shortcut. Here is a link to another question if you still want to run your code and focus on the terminal with the same shortcut: Shortcut with multiple command in VSCode It gives an example on how to use extensions to execute multiple commands with the same key binding.

Related