[Tutorial] Reversing a keyboard matrix

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 [url=http//www.dribin.org/dave/keyboard/one_html/]Dave Dribin[/url]'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_tabl ... p;wr_id=69
sixty
User avatar
Gasbag Guru

Unread post29 Jan 2011, 20:39

User avatar
X
sixty
Gasbag Guru
 
Posts: 2917
Joined: 28 Jan 2011, 12:47
Main keyboard: DKSaver
Main mouse: Razer Krait
Favorite switch: Cherry MX Black
Club member: 0060
 
 
Permanently buying all types of rare Cherry Corp. keyboards. PM me.
Thanks for the guide! I'll definitly look at the resources too.
Minskleip
User avatar

Unread post07 Feb 2011, 21:59

User avatar
X
Minskleip
 
Posts: 812
Joined: 31 Jan 2011, 17:29
Location: Norway
Main keyboard: HHKB Pro 2
Main mouse: CM Sentinel Storm
Favorite switch: Buckling spring
Club member: -
 
Spam. Mods?
scottc
User avatar

Unread post26 Dec 2014, 11:31

User avatar
X
scottc
 
Posts: 5349
Joined: 06 Oct 2013, 21:09
Location: Remote locations in Europe
Main keyboard: GH60-HASRO 62g Nixies, HHKB Pro1 HS, Novatouch
Main mouse: Steelseries Rival 300
Favorite switch: Nixdorf 'Soft Touch' MX Black
Club member: 0081
 
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!
Muirium
User avatar
µ

Unread post26 Dec 2014, 11:40

User avatar
X
Muirium
µ
 
Posts: 22409
Joined: 03 Feb 2013, 10:11
Location: Edinburgh, Scotland
Main keyboard: IBM 4704 Kishsaver
Main mouse: Apple Magic Trackpad
Favorite switch: Gotta Try 'Em All
Club member: -
 
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.
crc
User avatar

Unread post08 Feb 2016, 06:57

User avatar
X
crc
 
Posts: 9
Joined: 19 Nov 2015, 08:33
Location: CA, USA
Main keyboard: KBP V80 Matias,Frosty Flake,Matias Mini Quiet Pro
Main mouse: Evoluent vertical mouse,Logitech M570,Razer Taipan
Club member: -
 
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.
mastermachetier

Unread post05 Mar 2016, 17:31

X
mastermachetier
 
Posts: 54
Joined: 12 Jan 2016, 01:25
Location: Boston
Main keyboard: ducky shine zero
Main mouse: usb
Favorite switch: alps orange
Club member: -
 

Who is online

Users browsing this forum: hbar, M4dn3ss, matt3o, runninghack and 37 guests