Prev NEXT

How Computer Keyboards Work

Inside the Keyboard

The microprocessor and controller circuitry of a keyboard

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 thekey matrix.

The key matrix is a grid of circuits underneath the keys. In all keyboards (except forcapacitivemodels, 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 aswitch, completing the circuit and allowing a tiny amount of current to flow through. The mechanical action of the switch causes some vibration, calledbounce, which the processor filters out. If you press and hold a key, the processor recognizes it as the equivalent of pressing a key repeatedly.

Advertisement

When the processor finds a circuit that is closed, it compares the location of that circuit on the key matrix to thecharacter mapin 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 theakey by itself corresponds to a small letter "a," but theShiftandakeys pressed together correspond to a capital "A."

The key matrix

电脑还可以使用单独的字符映射,overriding the one found in the keyboard. This can be useful if a person is typing in a language that uses letters that don't have English equivalents on a keyboard with English letters. People can also set their computers to interpret their keystrokes as though they were typing on a Dvorak keyboard even though their actual keys are arranged in a QWERTY layout. In addition, operating systems and applications have keyboardaccessibilitysettings that let people change their keyboard's behavior to adapt to disabilities.