I just bought an IBM Model F "clicky" keyboard for my IBM 5160 XT. However, I would love to use this keyboard eventually with a modern computer. The communication protocol is not difficult. In fact, it's far simpler than PS/2.
There is a clock line and a data line. The clock line is held HIGH when data is not sent, and the data line is held LOW. When a key is pressed, it sends one start bit followed by 8 data bits, starting with the LSB. There is no stop bit to my knowledge. Thus the clock line goes low 9 times during a transmit cycle. When interfaced with the IBM PC/XT, it actually holds the data line low until the keyboard data can be processed.
Also, a note about the scan codes: codes 0-127 are sent when a key is pressed, and codes 128-255 are sent when a key is released. The only difference between a key's scan/release code is the MSB is a 0 vs. a 1.
Though this all sounds simple, I can't for the life of me make a code that works. The only bit of code I found regarding this asynchronous serial communication was not at all helpful. (http://www.arduino.cc/en/Tutorial/ShiftIn) The Arduino here makes it's own clock, and the MSB is first. I know there has to be an easier way than what I'm trying.
Code snippets and ideas would be greatly appreciated. Thanks!