Use mouse without borders.https://www.microsoft.com/en-ca/download/details.aspx?id=35460
This will allow swapping the keyboard and mouse from system to system. It will NOT swap media keys and volume keys(any special) however(or does not for me). I recommend setting it so you have to hold Control to move so avoid ending up on the wrong system by mistake.
A hardware solution would be a sharing hub like this and a usb hub.http://plugable.com/2012/02/02/plugable%E2%80%99s-new-usb-2-0-switch
You may still be able to fine things like this around. http://www.usbgear.com/4port_sharing_hub/
I have never used one from this site, but I have what looks EXACTLY(did wear out the buttons over years of use. Now it is just used as a 4 port hub) the same as well as 2 x 7 port versions(I like to have a spare) that have been discontinued.