Virtual KVM

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:

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 (3: DVI and 15: Displayport for my monitor). Though, I have found you
can see exactly which input sources are available by using
ControlMyMonitor (Windows):

Finally, I bind the hotkeys to Ctrl+Alt+[ and Ctrl+Alt+], which
are the same hotkeys I used to switch computers in Synergy.