Synchrony is a modified version of Synergy, whose development notes may be found below. Some of the more important changes are:

  1. The keyboard and mouse data is now routed through the KM switch. Since only information about the cursor position is needed to decide switching commands, all routines for processing keyboard input were removed.
  2. Modifications were made to allow communication to the KM switch via an RS232 connection.
  3. Time constraints meant that support for Mac OS X had to be removed.
  4. The routines to transfer clipboard data between computers were completely removed.
  5. The clients were modified so that they can now process their own input and report to the server as appropriate
  6. The protocols were modified to include signals such as informing the server when a jumpzone was reached, or when the two-tap option (if activated) was armed.
  7. The configuration parsing/writing routines were modified to include information on the serial connection and the switch ports corresponding to each screen.

More detailed information about the changes made may be found in the file ChangeLog.

Synergy was reasonably well commented so reading the source code should be enough to understand particular pieces. See the doc/PORTING file in the source code for more high-level information.

How synergy worked

The theory behind synergy is simple: the server captures mouse, keyboard, clipboard, and screen saver events and forwards them to one or more clients. If input is directed to the server itself then the input is delivered normally. In practice, however, many complications arise.

First, different keyboard mappings can produce different characters. Synergy attempts to generate the same character on the client as would've been generated on the server, including appropriate modifier keys (like Control and Alt). Non-character keys like Shift are also synthesized if possible. Sometimes the client simply cannot create the character or doesn't have a corresponding non-character key and synergy must discard the event. Note that synergy won't necessarily synthesize an event for the corresponding key on the client's keyboard. For example, if the client or server can't distinguish between the left and right shift keys then synergy can't be certain to synthesize the shift on the same side of the keyboard as the user pressed.

Second, different systems have different clipboards and clipboard formats. The X window system has a system-wide selection and clipboard (and yet other buffers) while Microsoft Windows has only a system-wide clipboard. Synergy has to choose which of these buffers correspond to one another. Furthermore, different systems use different text encodings and line breaks. Synergy mediates and converts between them.

Finally, there are no standards across operating systems for some operations that synergy requires. Among these are: intercepting and synthesizing events; enabling, disabling, starting and stopping the screen saver; detecting when the screen saver starts; reading and writing the clipboard(s).

All this means that synergy must be customized to each operating system (or windowing system in the case of X windows). Synergy breaks platform differences into two groups. The first includes the mundane platform dependent things: file system stuff, multithreading, network I/O, multi-byte and wide character conversion, time and sleeping, message display and logging, and running a process detached from a terminal. This code lives in lib/arch.

The second includes screen and window management handling, user event handling, event synthesis, the clipboards, and the screen saver. This code lives in lib/platform.

For both groups, there are particular classes or interfaces that must be inherited and implemented for each platform. See the doc/PORTING file in the synergy source code for more information.

Auto-generated Documentation

Synergy can automatically generate documentation from the comments in the code using doxygen. Use make doxygen to build it yourself from the source code into the doc/doxygen/html directory.