How the keyboard works

A keyboard is a lot like a miniature computer. It has its own processor and circuitry that carries information to and from that processor.

A large part of this circuitry makes up the key matrix.The key matrix is a grid of circuits underneath the keys. In all keyboards (except for capacitive models, which we’ll discuss in the next section), each circuit is broken at a point below each key. When you press a key, it presses a switch, completing the circuit and allowing a tiny amount of current to flow through.

The mechanical action of the switch causes some vibration, called bounce, which the processor filters out.


If you press and hold a key, the processor recognizes it as the equivalent of pressing a key repeatedly.

When the processor finds a circuit that is closed, it compares the location of that circuit on the key matrix to the character map in its read-only memory (ROM).

A character map is basically a comparison chart or lookup table. It tells the processor the position of each key in the matrix and what each keystroke or combination of keystrokes represents.

For example, the character map lets the processor know that pressing the enter key. it presses a switch, completing the circuit and allowing a tiny amount of current to flow through,called bounce, which the processor filters out and compares the location of that circuit on the key matrix to the character map in its read-only memory (ROM) and key is executed.

Leave a comment