My current setup includes a desktop computer running Windows, and a work laptop running MacOS. In order to keep my desktop uncluttered, I have devised a virtual KVM using Synergy (1.8) and AutoHotKey. The aim was to use a single monitor, mouse and keyboard with these two systems.
Sure, I could have sprung for two monitors, though I have a nice Asus 27" 2k and little room (or budget) for much else.
First, let's look at how things are connected:
Virtual KVM setup
The desktop can actually send commands to the monitor over the DVI connection using something called "Display Data Channel". This capability lets tell our monitor to switch to another input. Some googling around on how to script this, lead me to this post in the AutoHotKey forums. From there, I was able to figure out the input "source numbers" through trial and error. Finally, I bind the hotkeys to Ctrl+Alt+[ and Ctrl+Alt+], which are the same hotkeys I used to switch computers in Synergy.
Since I'm running Synergy 1.8, this config may not apply to Synergy 2 users. I haven't seen a reason to switch yet, but will post an update to this if I decide to.
DDC capabilities are not universal. Some monitor manufacturers may not let you do this.
While running the Synergy daemon and AutoHotKey script on the Windows desktop, startup order matters! We need to start AutoHotKey before Synergy or the AutoHotKey keybinding will never fire.
I also need to press Ctrl+Alt+] multiple times to get back to my Windows desktop. I think this is because one press triggers Synergy to switch, the next triggers the monitor switch.
Does it work?
After all of those caveats... Yes. It does. I use it every day, and I'm using it right now. If Synergy included a monitor switch capability in version 2, I would upgrade in a heartbeat.
By Colin Kennedy
===== 댓글 =====
+ My monitors have Display Port and HDMI are there ways to know I am sending the right source number? the current value of getMonitorInputSource is 0 for me. I have iterated up to 22 and it still hasn't change the input. Any Ideas?
+ I will amend my post, but check out https://www.nirsoft.net/utils/control_my_monitor.html .
It will give you the possible input number values under "Input Select".
EDIT: Originally said "Input Source"
+ I do not see an "Input Source" Code name in my list after downloading and running the utility. Do you think this means I am out of luck with my monitors? I am using dell s2716dg monitors.
+ I'm sorry "Input Select". I have to click the monitor name, then the information is loaded:
+ I do not have a input select option for any of my monitors. I have 3 monitors and I do not see that option for any of them. any ideas? I attached a screen shot of my output
+ The command may not be implemented on that model. Unfortunately, not all monitor manufacturers implement all available DDC commands.
+ HI, I'm totally zero on this can you elaborate for me how to find out the monitor input source ie: HDMI=2 DVI=4
Later edit: I manage to find them by changing one at a time till I found them at 17, 18, 19. Thank you for your script
+ That's exactly how I figured out my monitor. Just going through them one at a time. Some open source DDC tools also have libraries of known monitor settings.