Reverse engineering an Acer KU-0355 keyboard

November 2, 2014

For the last few weeks, I’ve been working on building a MAME arcade machine from an old computer. The software part is done (I’ll cover that in another post), and I have started to prepare the hardware. To save some money, I decided not to buy the I-PAC. Instead, hacking a keyboard seemed cheaper, and I just happened to have a lot of old, unused keyboards at hand. I thought that I’d just connect some wires from the keyboard to a button; when the button is pressed, it would emulate a keystroke. The only problem was that it would take up too much space, and it wouldn’t be practical. The connections wouldn’t be optimal, the keyboard might fall… All in all, a better approach was possible, and much needed.

If you open up a keyboard, you’ll often find a small PCB connected to a USB cable (sometimes to some LEDs too), a rubber sheet with dots on it, and to three plastic sheets:

The rubber sheet is filled with small rubber buttons; when you press a key, it pushes one of these little rubber buttons down.

The top sheet is a printed circuit with dots, each dot corresponding to one key.

The middle sheet is just plain, transparent plastic with holes where the dots on the sheet below are.

The bottom sheet is another printed circuit with dots, each dot corresponding to one key.

When you are pressing a key, you are in fact creating a connection between the top and the bottom sheet. The connection you just created connects two pins on the PCB. Depending on the connected pins, the PCB will output a different signal, which will be interpreted as a different keystroke.
As you can see on the pictures below, some buttons are on the same line. If two buttons are on the same line on the bottom sheet, they won’t be connected like that on the top sheet, thus creating a new combination of pins for each key. This may seem complicated, and if you don’t understand it, try to open up a keyboard; there’s a lot to learn from it.

I threw the middle sheet out; I didn’t need it.

I started out by scanning my two sheets. They were a bit longer than a piece of A4 paper, and my Canon MP640 couldn’t scan a complete sheet. I ended up scanning each plastic sheet twice. This is what the scans of the bottom sheet looked like:

To stitch them together, I used Microsoft ICE: it’s a great piece of software from the Microsoft Research team. It stitches multiple photos into one big panorama, and does so perfectly: forget the skewed, distorted panoramas that you may have taken with your phone, this software almost never makes mistakes.

So I had my two huge scans (they were about 12MB each). I may have asked for a too good quality, as a tenth of the resolution I had would have been sufficient. If your scanner lets you choose the resolution of your scan, 200-300 dpi should be more than enough – I had asked for 600.

I edited the stitched scans with GIMP. The first thought was to use the magic wand and some “clever” contrast and coloring. That wasn’t a huge success, so I just ended up linking the the dots to the pins with the good old pen and my shift key (it adds the option to draw a line with the pen).

This are the results I got:

Interestingly enough, some dots weren’t used at all: they didn’t correspond to any rubber button, or to any key on the keyboard! I guess that the manufacturer did this so that they would be able to use the same plastic sheets for different keyboard layouts.
I named all the pins, from A (to the left) to Z (to the right).

To find the pins corresponding to a key, you’ll have to search in the bottom sheet for the wanted key, and then again in the top sheet for the same key. You’ll then have to make the connection from your 2 pins to something else (a button, a pedal, whatever). To find the pins corresponding to a key, you can use this table: