sharing an output device is one thing... USB printer sharing, etc. But i've never heard of network sharing of an input device. Even scalable computing labs, who have pretty high-tech setups, use complex switchbox setups to control keyboard and monitor control.
I think a switchbox is your only option. The good news is there might be an automatic one-- that knows which computer is trying to use it, and adjusts itself, without you turning a knob.