# Model F

## IBM Model F Keyboard USB interface

In late 2016 I found a "feral keyboard" on the streets of Manhattan and wanted to turn it into a USB device. It sat in the junk pile at NYC Resistor for several months before I finally got around to taking it apart.

It was quite filthy inside, but a little bit of elbow grease on the keycaps showed that it should clean up fairly well. The AT interface is very dated and most adapters don't have a good way to interface with odd scancodes, so I decided to write my own.

Luckily the AT interface is well documented, so it was just a matter of writing a teensy sketch that could read the open-collector clocked data and turn it into USB HID messages. The commands to the keyboard to set the LEDs work, but seem slightly flaky.

Only four wires are necessary and the keymap can be changed if you want to relocate escape or force the keypad to always appear as arrow keys. Source code is github.com/osresearch/modelf and hopefully useful to other people who want to reuse classic mechanical keyboards. This one won't replace my Model M Space Saver due to the weird escape placement, the lack of an arrow key T and a few other frustrations, but it has a great sound and I really like key-feel of this design.

Last update: November 8, 2020