Keyboard matrix circuit
Most electronic keyboards used in synthesizers, electronic organs, and digital pianos use a keyboard matrix circuit in which eight rows and eight columns of wires cross. In this way, 16 wires can provide (8x8) 64 crossings — sufficient for a full five octaves of range (61 notes). By scanning these 64 crossings, a keyboard controller can determine which key was pressed[1].
Description
Without a matrix circuit, a 61-key keyboard would require 62 wires to connect (one for each note, and a ground) — an awkwardly thick bundle of wiring. With a matrix circuit, the all 61 keys can be scanned with only 16 wires. These can be drawn schematically as a "key matrix" of 8 column wires and 8 row wires, with a switch at every intersection. The electronic or digital keyboard controller scans all of the columns, to determine if a key has been pressed. If a key in the column has been pressed, then the controller scan the rows, to determine which row has been activated. In a manner analogous to the children's board game "Battleship!", the keyboard controller determines which key has been pressed, and then plays that key's note. This entire process takes place so quickly that the performer is not aware of the delay.[2]

The matrix circuit approach used in musical keyboards is also used in other types of non-musical keyboards, such as in the keypads for calculators and the "QWERTY" alphabetic and numeric keyboards used to enter information into computers.[3] The same matrix circuit approach is also used in many pinball machines.[4]
There are at least two limitations with this system. The first is that it provides only a crude binary on/off signal for each key. Better electronic keyboards employ two sets of switches for each key that are slightly offset. By determining the timing between the activation of the first and second switches, the velocity of a key press can be determined — greatly improving the performance dynamic of a keyboard.
The second is that instruments with a matrix circuit can only play in a monophonic fashion without the addition of a diode for each key crossing[5]. The diode is a one-way valve which prevents unwanted notes ("phantom keys") from being triggered, or intended notes from being masked ("phantom key blocking").[2]
Monophonic instruments and most low-cost computer keyboards reduce costs by leaving out most or all of those diodes. To avoid "phantom keys", the keyboard controller in modern low-cost computer keyboards will ignore further key presses once two keys (other than modifier keys) have been pressed down, which is known as jamming.
References
- ^ Dave Dribin: "Keyboard Matrix Help", (June 24, 2000)
- ^ a b Dave Dribin. "Keyboard Matrix Help". 2000.
- ^ Jeff Tyson and Tracy V. Wilson. "How Computer Keyboards Work"
- ^ "Understanding the Switch Matrix"
- ^ Jim Cairns, "Keyboard Encoders" http://www.jimspage.co.nz/encoders.htm