Page 1 of 1

[Tutorial] Reversing a keyboard matrix

Posted: 29 Jan 2011, 21:39
by sixty
Reversing a keyboard matrix

This article hopefully should give you a basic idea on how to reverse a keyboard matrix, so you can for example use a different controller such as the Aikon or a custom firmware on a Teensy. This will allow you to convert old, non pc-compatible keyboards to work with more modern hardware. The guide is written in a "newbie-friendly" way and mostly consists of notes I took for myself when doing this kinda stuff for the first time.

What is a keyboard matrix and how does it work?

The article will assume that you have a basic knowledge of what a keyboard matrix is and how it works. You should also know how diodes work in a circuit and have a basic knowledge of very simple circuits. If you are entirely new to this, I suggest to start reading Dave Dribin's articles about the keyboard matrix and how it works. This will give you a very good summary and enough knowledge to reconstruct a matrix.

Tools needed?

Basically all you need to properly reverse a matrix is a multimeter. If you don't already have one, you should make sure to get one that allows "connectivity checking" and alerts you by beeping. This will make the task much, much easier. Do not get one without audible feedback!

Lets get it on!

Image
Figure 1: Locating the keyboard controller

Step 1
First thing you should do is to open up the keyboard you wish to reverse/convert. Disassemble it all the way until you can access the solderside of the PCB. Now start looking for the main IC. The keyboard controller is usually the biggest IC/Chip on the PCB and has the most pins. If size does not help you to locate it, follow the traces and see where most of them meet/end. The WYSE keyboard in the illustration above meets all of those hints on its controller: the chip with the most pins and the biggest physical size is the main controller for the keyboard. This is where all rows and columns meet and are analyzed by the controllers firmware.

Image
Figure 2: Multimeter

Step 2
Once you have located the main controller, its time to get out your multimeter. Set it to the connectivity testing mode. Usually this mode is indicated by a symbol similar to the one above. Refer to your multimeter manual. If you found the correct mode and put together both of the probes (red and black) you should hear a beep. The beep indicates that the circuit you are testing is closed and that electricity can flow between the two points you are testing. This is basically all we need!

Image
Figure 3: Checking for connectivity

Step 3
Put one of the probes to one of the two solder point of a switch, and slide the other across the pins on the controller. Once you hear a beep, we got a connection and its time to open up a spreadsheet (or alternatively take notes manually).

Image
Figure 4: Example matrix while mapping

Step 4
Make a list/spreadsheet of all the pins on the main controller and start writing down which key results in a "beep" with which pin of the controller. Keep in mind that you will have to test both solder points of each switch with every IC pin. One solder point will always be the row, the other the column. Once you are done testing all possible combinations, you should be able to arrange your spreadsheet properly into rows and columns. Congratulations, you just figured out your first keyboard matrix.

(Re)sources
The guide has been heavily based on information found on the following websites:
1 - http://www.dribin.org/dave/keyboard/one_html/
2 - http://www.otd.kr/bbs/board.php?bo_table=FAQ&wr_id=69

Posted: 07 Feb 2011, 22:59
by Minskleip
Thanks for the guide! I'll definitly look at the resources too.

Posted: 26 Dec 2014, 12:31
by scottc
Spam. Mods?

Posted: 26 Dec 2014, 12:40
by Muirium
Got him, thanks. I wonder if it's that same guy from Pakistan again… let's see.

You can click the report post button to highlight the thread in red for us mods, too.



Edit: Yup, Pakistan again:

http://www.wolframalpha.com/input/?i=182.190.196.116

002 noted this one before:

https://who.is/whois-ip/ip-address/119.154.26.57

The IPs aren't going to be easy to block. But I do suspect it's the same guy, trying a few times every week!

Posted: 08 Feb 2016, 07:57
by crc
Thanks for this useful guide! I used it this weekend on a Matias mini quiet pro keyboard.

One thing I would like to point out is that for keyboards with diodes on one of the pins (for n-key rollover) the polarity of the multimeter pins matters (at least it did on my old fluke 70 meter). Instead of a steady beep the switch terminal with the diode would blip (beep for a second). And no beeps/blips would register after switching the polarity of the probes.

Posted: 05 Mar 2016, 18:31
by mastermachetier
crc wrote: Thanks for this useful guide! I used it this weekend on a Matias mini quiet pro keyboard.

One thing I would like to point out is that for keyboards with diodes on one of the pins (for n-key rollover) the polarity of the multimeter pins matters (at least it did on my old fluke 70 meter). Instead of a steady beep the switch terminal with the diode would blip (beep for a second). And no beeps/blips would register after switching the polarity of the probes.
I am looking at my quiet pro for mac right now. Does yours have a removable controller ? Mine slides right of the top I am hopping i can just fit a teensy on top switch the switches to my oranges and bam perfect keyboard.