How Computer Keyboards Work
External parts are the parts that are easily seen on the outside of the keyboard. These parts are the typing keys, the numeric keypad, the function keys and the control keys. The typing keys are just as they sound, they are the alphabet keys that are laid out on the keyboard in the same location, as they would be found on a typewriter. The numeric keypad is found to the right of the typing keys and contains number keys that are laid out the same as a calculator or adding machine. This keypad also contains the direction keys, as well as the math keys, a period key, page up and page down keys and an enter key. The function keys are located at the top of the keyboard and extend across the keyboard. These keys can be assigned specific commands as per the operating system or current application. The control keys are located between the typing keys and the numeric keypad and are the keys for home, end, insert, delete, page up, page down as well as the control, alternate and escape keys. These are the common keys that are found on each keyboard, but some keyboards may have additional keys that perform other tasks.
Inside the keyboard is a processor that has to understand the position of the key in the key matrix, the amount of bounce and how to filter it and the speed at which to transmit the typematics. Underneath the keys is a key matrix that is a grid of circuits. These circuits are broken at the point below a specific key, in all keyboards except capacitive ones. When the key is pressed, the gap in the circuit is bridges and a tiny amount of current is allowed to flow through. Monitoring the key matrix for continuity at any point on the grid is done by the processor. When a closed circuit is found, the processor compares the location of the closed circuit on the key matrix to the character map in its ROM. A character map is a comparison chart for tells the processor what key is at certain coordinates in the key matrix. When pressing two or more keys simultaneously, the processor checks to see if that combination of keys has a designation in the character map.
Switches also relied on by keyboards, initiate a change in the current that flows through the circuits in the keyboard. When one of these key switches is pressed against the circuit, a bounce or a small amount of vibration between the surfaces is created. The keyboard processor recognizes bounces and immediately realizes that the keyboard operator did not cause these. The processor then filters out these bounces treats them as one single keypress. Typematics is a process that occurs when a key is continually held down and the processor determines this to mean to send the character repeatedly to the computer. The range of this process can vary from 30 characters per second to as few as two characters per second.
Keyboards use varieties of switch technologies. Most people like to have audible and tactile response when using a keyboard. These responses are the click that is heard when using the keyboard or the feel of the keys as they are used. Several technologies make these possible. These are rubber dome mechanical, capacitive non-mechanical, metal contact mechanical, membrane mechanical and foam element mechanical. The rubber dome is probably the most popular switching technology use in today’s keyboards. In the keyboards that use this technology, a flexible rubber dome with a hard carbon center is located under each key. When a key is pressed, a plunger, located on the bottom of the key, pushes down against the dome pushing the carbon center down until it is pressed against a hard flat surface beneath the key matrix. Releasing the key allows the rubber dome to spring back to its original shape, forcing the key back up.
Membrane switches are very similar in operation to rubber dome switches in keyboards. However, one big difference in the two is that the membrane keyboard has a single rubber sheet with bulges for each key instead of each key being separate. Other differences include almost no tactile response and can be difficult to manipulate. These differences explain why these switches are not generally found on common computer systems. Capacitive switches, considered non-mechanical, do not complete a circuit like other keyboard technologies. With these switches, current flows constantly through all parts of the key matrix. Each key is spring-loaded and has a tiny plate attached to the bottom of the plunger. Pressing a key brings this plate close to another plate located directly below it. Bringing these two plates close together affects the amount of current flowing through the matrix at this point. The processor will detect the change and interprets it as a keypress for that location. Even though capacitive switch keyboards are expensive, they have positive advantages such as not suffering from corrosion, not having problems with bounce and they do have a longer life than other keyboards. Metal contact switches contain a spring-loaded key with a strip of metal located on the bottom of the plunger. When the key is pressed, this metal strip connects the two parts of the circuit. The foam element switch is almost the same design, only with a small piece of spongy foam located between the bottom of the plunger and the metal strip that provides for a better tactile response. The disadvantage found with these two switch technologies is that they wear out quicker than the other switches.
Information is transmitted from the keyboard to the computer as the operator types. As the typing is occurring, the processor, located in the keyboard, analyzes the key matrix then determines what characters should be sent to the computer. These characters are kept in a buffer of memory, which is then sent in a stream to the computer using a connection. There are several connections available for this task; some of the most popular are the 5-pin DIN connector, the 6-pin IBM PS/2 connector, the 4-pin USB connector or an internal connector. These connectors contain a connecting cable, which is used to power the keyboard and to carry the data from the keyboard to the computer. Once the keyboard controller notifies the operating system that there is data available from the keyboard, the operating system goes to work to determine what is being sent from the keyboard, such as it is a system level command, i.e. Ctrl-Alt-Delete. If the data is not a system level command, the operating system sends the data to the application that is currently running and the application will proceed with the commands that the data has determined.
How computer keyboards work is very interesting, especially how fast all the data is transmitted and deciphered, then acted upon by the operating system and the current application.