You won't need to do anything extraordinary to achieve it. You only have to install Synergy and it will detect the computers, then, when you pass the limits of a screen, you'll go to the next one. That's it.
Keystrokes will be valid for the computer which the mouse is in.
Synergy takes advantage of TCP/IP protocol to keep computers connected.
Finally, we have to stand out that the program supports many different operating systems, so it doesn't matter if you want to control computers using different Operating systems. That versatility makes it even greater.