To switch the physical port , you need to speak directly to the monitor. Since 2007, almost every monitor has supported a ghost in the machine called DDC/CI (Display Data Channel/Command Interface). It allows software to tell your monitor, "Hey, switch to HDMI 2."
Download ControlMyMonitor (Free). Set Ctrl+Alt+1 for PC, Ctrl+Alt+2 for Console. Done in 3 minutes. how to switch monitors with keyboard
Spend 10 minutes learning ddcutil (Linux/macOS) or BetterDisplay (Mac). You’ll feel like a wizard. To switch the physical port , you need