Become a fan of Slashdot on Facebook


Forgot your password?

PS/2 Keyboard Hardware Protocol Information? 18

j-r charles asks: "I need to design a 12 key keypad that plugs into a PS2 port INSTEAD of the standard PC keyboard. Does anyone knows the protocol used by IBM, or where to find it?" So why stick with the boring old choices of 88 and 101 keys when you can build your own with as many (or as few) as you like. Has anyone built custom keyboards for their PCs? How difficult was it?
This discussion has been archived. No new comments can be posted.

PS/2 Keyboard Hardware Protocol Information?

Comments Filter:
  • I don't know about finding information, but I have a cheap ($5) converter from the regular (large) keyboard plug to the PS/2 in my hand right now. Therefore, you have 2 possibilities:

    1 - ship a converter (like the above, but get a bulk discount from manufacturer) with your unit, much like mouse manufacturers ship a ps/2 -> serial or usb -> ps/2 converter for their hardware. Added bonus of having your keypad work with BOTH the regular and PS/2 plugs

    2 - dissect the PS/2 converter mentioned above and learn from it. I don't imagine how it could be that different. Maybe it's as simple as mapping the wires. The converter's only an inch long, so I'm guessing it doesn't have much in there. Then again, I'm not a hardware person, so I don't know.
  • There seems to only be 6 pins, so there's only 64 possible combinations (assuming high-low signals) if the interface isn't serial.

    Actually, someone's already seemed to have done this and you can purchase it yourself--just take it apart to find out what's inside.

  • by ScottG ( 30650 ) on Tuesday February 27, 2001 @02:36PM (#397152)

    Check out this page and use the universal encoder with the keypads.
  • by Anonymous Coward on Tuesday February 27, 2001 @04:14PM (#397154) "Too lazy or Stupid to use Google".
  • Well, it *is* serial. Even if it was, 6 wires plus shield would not give you 64 combinations (which is obviously wrong for the additional reason that the keyboard interface has to be able to signal uniquely for each of 100+ keys). Power and ground take two wires, so you'd be left with 4, which would allow just 16 combinations.
  • The poster wanted to know how to interface with the PS/2 keyboard protocol, not how to convert from 5-pin connector to a 6-pin connector.
  • I've wanted to make my own keyboard for quite a while now. One of my friends told me about a nifty split-apart keyboard - two separate pieces, not just a Microsoft Natural ergnomic-type keyboard - and I think that would be really fun to work with. He says it can attach to the armrests of a chair. I haven't been able to find it anywhere, though, so I wonder if I can make one of those.

    It seems.. intimidatingly complicated. Has anyone tried making a custom keyboard before? I took apart a couple of keyboards a while back, but the circuitry looked a bit complicated. I'd really appreciate stories, advice, whatever. =)

  • Sorry - my bad. I did indeed misunderstand the posting when I first read it. Thanks!
  • Are you wanting to use this as some sort of gamepad or did you create an operating system that only recognizes 12 characters?

    I just got through googling stuff like "keyboard emulator", "keyboard port wiring", "dummy keyboard" and stuff along those lines looking for info on what circuitry to add to a passive KVM switch so that I can boot one computer, switch the switch, and boot the second with the first still thinking that it has a mouse, keyboard, and monitor attached.

    Didn't find much of what I was looking for but found a bunch of links about game controls and using the integrated circuit in keyboards that send the scan codes to the computer as part of custom game controls. []

  • by Bake ( 2609 )
    If it's for a laptop you could "reverse-engineer" a ps/2 splitter (the kind that takes A ps/2 port and divides into ps/2 keyboard and ps/2 mouse). After that you could use a converter (AT port -> ps/2)
  • I'm looking into desgining a In car MP3 player.
    What I am doing is taking a p120, butting BEOS on it so it boots in about 10secs, then mounting it in the trunk, with an AC inverter (or does anyone know of a DC to DC inverter that I can use in a AT computer).
    For the keyboard, I am going to radio shack, getting a Key-pad like they use on security systems, and basically chopping up an old keyboard. I've read that if you follow the lines on the plastic from the keys back to the controller, you can take it apart an solder in your own lines (make sure you use cat-5 or other high quality line).
    then, all I need is a Winamp like mp3 player for BEOS, I mount the pad on my dash along with a on/off switch, and I'm set.
    But, does anyone know what size of AC inverter to buy? and can I get buy with a cheap one, or do I need one of the Perfect Sine wave ones? Also, when I wire the on/off switch on my dash, how thik of wire would I need for it? although alternatively, I could just wire that into the line for the inverter between my battery.
  • I'm sick of people jackassing around here, blah blah blahing about how easy it was to find on google... Ask Slashdot isnt just a forum for the poster to find their answer, it's like every other part of /. A place to have a discussion. Cliff posts stories, I assume, that he thinks will spark a good discussion, not based on the ease of finding the answer on This is "ASK SLASHDOT" NOT "ASK GOOGLE.COM".
  • True, but it sounded like the poster could find specs for AT style keyboards, but not PS/2. Considereing the price on AT to PS/2 keyboards adaptors I can't help but belive that it is just a few wires and no electronics. I would however make sure from one of the adaptors first. (Or just ship with the adaptors)

  • One of my friends told me about a nifty split-apart keyboard - two separate pieces,

    Sounds like an ErgoMagic [], though I think those actually have 3 pieces, with the numberpad separated also.

  • Look at the work MAME [] users have done with their systems, most of the stuff in The Build your own arcade controls [] page are keyboard hacks of some kind, from taking apart an old keyboard and changing things around, to buying a programmable keyboard encoder, such as the I-PAC [] and the Hagstrom electronics [] products. It's really easy and most of the work has already been done for you, you just need to reprogram(with their utility software, and hook up switches.
  • The interface is serial. The four important wires are the data, clk, pwr and gnd. The clock and the data bidirectional, because the keyboard and the computer both send and receive data. The clock is really more of an ACK signal, it gets toggled by the receiver when it has successfully read that current status of the data line. Its a little difficult (but not impossible) to reverse engineer, since looking at the keyboard disconnected from the computer won't give you any output (since no one is toggling the clk.) and when connected it gets confusing who is toggling what.

    The AT and the PS/2 interface is the same, electrically, there are just different connectors.
  • Granted this is a bit off-topic, but:

    My linux mp3 player is up and playing mp3s in roughly 15 seconds on a cyrix MX2-300 underclocked to 233 (crappy damned hot cyrix chips), so you don't really need BeOS to do that... When I get some more time I'll finish up the distribution so others can use it. It relies on teh Matrix Orbital 20x4 Vacuum Fluorescent display with teh built-in keypad interface. You might look into that, since you just establish regular old serial communication with the display and either write letters or read keypresses (handles up to 5x5 matrix-format keypads, mine's hooked up to an old AM radio with roller switches on what used to be the big old preset buttons).

    Regarding the inverter - I use a 300W Whistler inverter (about $60 or so) so I can run a small monitor off of it too. I'd use a DC-DC converter next time, the inversion/conversion is *really* wasteful.

    Drop me an email at cdproject @@ if you wanna know more, or whatever. I'd love to talk with someone about it. :)

Many people are unenthusiastic about your work.