How can i control several PCs with one keyboard AT THE SAME TIME?

Started by
13 comments, last by GameDev.net 18 years, 1 month ago
How can i control several PCs with one keyboard AT THE SAME TIME? I dont mean switching between them, I mean sending the exact same input to all 4 pcs. Like, if i press F2, all 4 PCs will respond to it at the same time on all 4 monitors, etc...is this possible?? It would make game testing a lot easier.
Advertisement
DISCLAIMER: If you don't have any experience with electronics, DO NOT TRY TO DO THE BELOW YOURSELF!!! If you damage your computer it's your own fault!

First, see here for the pin outs of a PS2 keyboard. When I mention pins by number, I'm using the numbering in the PS2 keyboard pinout diagrom at this URL.

Go down to your local electronics hobbiest store and find yourself 4 PS2 connectors and 1 generic, plain (not programmable) PS2 keyboard (do not try this with a USB keyboard, it won't work). Cut the end off the PS2 keyboard and connect the wire that was connected to the Data (pin 1) and CLK (pin5) lines to ALL 4 PS2 connectors, you'll probably need some extra wire to do this (copper will be fine, but can be a pain to work with). Connect GND (pin 3) and +5V (pin 4) to a SINGLE PS2 connector. Leave the reserved pins unconnected.

Obviously be very careful to ensure that you don't short any of the pins. Doing so (especially if one of them is +5V and the other is GND) could damage your keyboard, the PS2 ports on your computers, or worse yet (but very unlikely) your motherboard.

No guarenttee this will work either (although it won't do any damage if wired correctly). I don't really know anything about the protocol between the keyboard and PC, having more than 1 computer try to initialize the keyboard might confuse it or might do nothing.


EDIT: Made a couple of corrections

[Edited by - joanusdmentia on March 9, 2006 6:21:30 AM]
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
You can pack user input data then transfer through local network. There're two instances:
  1. You let your game handles outer input. It may bring more complexity to the game if it is originally not intended for network playing.

  2. Write an application that accepts these input data then replay them by SendInput () API function.


In either cases you'll have to know about transfering data between entities in an network. MSDN has some nice articles on "Networking" topic.
--> The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones <--
Quote:Original post by joanusdmentia
-snip-


That's an interesting idea! I've been looking at getting into electronics, I'll have to give something like that a try on an old junker.

Would you happen to have any other basic project idea lying about? I'm really curious about starting something a little more hardware level lately, and I'm looking for things that are simple, but still offer something nifty.

Interesting. :) How about something like Synergy? (http://synergy2.sourceforge.net/) Although it doesn't do exactly what you're after (only sends to 1 client at a time), it's open-source so you could probably h4xx it so it sends your input to all clients at once.
Quote:Original post by tychon
Quote:Original post by joanusdmentia
-snip-


That's an interesting idea! I've been looking at getting into electronics, I'll have to give something like that a try on an old junker.


Just an ammedment to that, connect the CLOCK line to all 4 PS2 connectors. I double checked and it turns out that the keyboard generates the clock signal, not the PC. This could cause havok with the keyboards when more than one PC is trying to send data to it (eg. setting the CAPS light) but if you keep it to a basic keyboard it should still be usable.

TBH I'm not entirely sure if it will work, although I *think* it will. If wired correctly it won't do any damage, but it's possible that when sourcing the power from a single PC the keyboard won't be able do supply enough current to be spread over 4 data lines, so it may simply do nothing or all the key presses may not get through. If it doesn't work and you're sure it's wired correctly, try attaching the +5V and GND from another PC as well. That's a little risky though since there's no guarenttee that one PC's +5V and GND are the same, but small differences shouldn't matter.

Quote:Original post by tychon
Would you happen to have any other basic project idea lying about? I'm really curious about starting something a little more hardware level lately, and I'm looking for things that are simple, but still offer something nifty.


Your best bet is probably to head on back to that hobbiest store and see if they've got any kits to put together. They (should) come with all the parts you need, but getting and soldering iron will be essential and a multimeter will stop you from going crazy when it doesn't work (imagine programming without a debugger [smile]).
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
Quote:Original post by joanusdmentia
DISCLAIMER: If you don't have any experience with electronics, DO NOT TRY TO DO THE BELOW YOURSELF!!! If you damage your computer it's your own fault!

First, see here for the pin outs of a PS2 keyboard. When I mention pins by number, I'm using the numbering in the PS2 keyboard pinout diagrom at this URL.

Go down to your local electronics hobbiest store and find yourself 4 PS2 connectors and 1 generic, plain (not programmable) PS2 keyboard (do not try this with a USB keyboard, it won't work). Cut the end off the PS2 keyboard and connect the wire that was connected to the Data (pin 1) and CLK (pin5) lines to ALL 4 PS2 connectors, you'll probably need some extra wire to do this (copper will be fine, but can be a pain to work with). Connect GND (pin 3) and +5V (pin 4) to a SINGLE PS2 connector. Leave the reserved pins unconnected.

Obviously be very careful to ensure that you don't short any of the pins. Doing so (especially if one of them is +5V and the other is GND) could damage your keyboard, the PS2 ports on your computers, or worse yet (but very unlikely) your motherboard.

No guarenttee this will work either (although it won't do any damage if wired correctly). I don't really know anything about the protocol between the keyboard and PC, having more than 1 computer try to initialize the keyboard might confuse it or might do nothing.


EDIT: Made a couple of corrections
Can't you just go and by something like this?

Maybe this?

F-R-E-D F-R-E-D-B-U-R...G-E-R! - Yes!
Quote:Can't you just go and by something like this?

Maybe this?


That doesn't allow me to control them all together, only one at a time.

Thanks Phil for the idea, I do wonder if it will work.
Quote:Original post by tychon
Would you happen to have any other basic project idea lying about?

Not to hijack the thread, but there are instructions on the 'Net detailing how to hack a console controller (N64, PS2, etc.) to jack into a pc's parallel port. That should be a nifty beginner project.

This was discussed a few months ago on another forum. The hardware hack (one keyboard cable to multiple computers) as I remember didn't work. Your mileage may vary.

An innovative solution that I remember being proposed was to get four identical wireless keyboards, and set the recievers to all access one single wireless transmitting keyboard.

There are KVM systems that allow 'broadcast mode', but the units I've seen have been very expensive.

The nice thing about the wireless keyboard option is that you can test it with two keyboards and find out if it's gonna work for you before spending a bunch of money.

Good luck!

This topic is closed to new replies.

Advertisement