With Windows and AutoHotkey and https://www.nirsoft.net/utils/control_my_monitor.html
You can add this .ahk script to run at startup:
^F4::
Run C:\Users\YourNameHere\Documents\AutoHotkey\ControlMyMonitor /SwitchValue Primary 60 17 3
Return
Where the file path is where you've put ControlMyMonitor.exe, "Primary" means the main Windows display, the "60" means input select, and the "17" and "3" are the values you observe in ControlMyMonitor when each display you want to switch between is enabled.You can now press Ctrl+F4 to toggle inputs.