• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

VS code not switching focus on terminal after running a code

Joined
Dec 8, 2019
Messages
151 (0.09/day)
Location
Romania
System Name "Good Boy" / Hp z400
Processor Intel i7 8700k / Intel Xeon w3520
Motherboard Asus PRIME Z370-P II / OEM motherboard
Cooling Be Quiet Dark Rock 4 Pro / OEM cooler
Memory 32 gb Corsair VENGEANCE LPX at 3000 mhz / 8 gb ECC OEM memory at 1333mhz
Video Card(s) Asus Rog-Strix GeForce GTX 1080ti / AMD SAPPHIRE Radeon R9 380 NITRO Dual-X
Storage 1TB of sata 3 SSD and 3TB of HDD / 240 gb of SSD and 1TB of HDD
Display(s) Legion Y25f-10 144Hz / LG Flatron W1934S
Case Aerocool P7C1 non-pro / Hp z400 case
Audio Device(s) Beyerdynamics DT 770 Pro 80 ohms and HyperX Cloud 2 / nothing ig
Power Supply Xilence Performance X XN073 XP750MR9 750w / OEM PSU 475w
Mouse HyperX Pulsefire Surge / some random office mouse
Keyboard Razer Blackwidow 3 / some random office kb
Software Win 10 Pro / Win 10 Pro
I recently installed vs code and the only problem that I have with it is the fact that whenever I run a code, the typing focus doesn't move to the terminal, so I have to do it manually, by using the mouse. Is there any way to make it switch automatically after running a program? I'm new to vs so don't expect me to understand complex stuff or workarounds. Thanks in advance!
 

silentbogo

Moderator
Staff member
Joined
Nov 20, 2013
Messages
5,473 (1.44/day)
Location
Kyiv, Ukraine
System Name WS#1337
Processor Ryzen 7 3800X
Motherboard ASUS X570-PLUS TUF Gaming
Cooling Xigmatek Scylla 240mm AIO
Memory 4x8GB Samsung DDR4 ECC UDIMM
Video Card(s) Inno3D RTX 3070 Ti iChill
Storage ADATA Legend 2TB + ADATA SX8200 Pro 1TB
Display(s) Samsung U24E590D (4K/UHD)
Case ghetto CM Cosmos RC-1000
Audio Device(s) ALC1220
Power Supply SeaSonic SSR-550FX (80+ GOLD)
Mouse Logitech G603
Keyboard Modecom Volcano Blade (Kailh choc LP)
VR HMD Google dreamview headset(aka fancy cardboard)
Software Windows 11, Ubuntu 20.04 LTS
Just use a keyboard. Ctrl+` switches to terminal, Ctrl+1 to focus on code window.

Won't post a full solution cause I'm at work right now, but I'll point you in the right direction.
Alternatively, try adding a command to custom tasks.

Ultimately what you need is a build task which will execute
Code:
command: "workbench.action.terminal.focus"
 
Joined
Dec 8, 2019
Messages
151 (0.09/day)
Location
Romania
System Name "Good Boy" / Hp z400
Processor Intel i7 8700k / Intel Xeon w3520
Motherboard Asus PRIME Z370-P II / OEM motherboard
Cooling Be Quiet Dark Rock 4 Pro / OEM cooler
Memory 32 gb Corsair VENGEANCE LPX at 3000 mhz / 8 gb ECC OEM memory at 1333mhz
Video Card(s) Asus Rog-Strix GeForce GTX 1080ti / AMD SAPPHIRE Radeon R9 380 NITRO Dual-X
Storage 1TB of sata 3 SSD and 3TB of HDD / 240 gb of SSD and 1TB of HDD
Display(s) Legion Y25f-10 144Hz / LG Flatron W1934S
Case Aerocool P7C1 non-pro / Hp z400 case
Audio Device(s) Beyerdynamics DT 770 Pro 80 ohms and HyperX Cloud 2 / nothing ig
Power Supply Xilence Performance X XN073 XP750MR9 750w / OEM PSU 475w
Mouse HyperX Pulsefire Surge / some random office mouse
Keyboard Razer Blackwidow 3 / some random office kb
Software Win 10 Pro / Win 10 Pro
Just use a keyboard. Ctrl+` switches to terminal, Ctrl+1 to focus on code window.

Won't post a full solution cause I'm at work right now, but I'll point you in the right direction.
Alternatively, try adding a command to custom tasks.

Ultimately what you need is a build task which will execute
Code:
command: "workbench.action.terminal.focus"
Ok, I'll try to get it working myself but if, I'll be sure to come back to the thread
 
Top