# Keypad

A keypad is a block or pad of buttons set with an arrangement of digits, symbols, or alphabetical letters. Pads mostly containing numbers and used with computers are numeric keypads. Keypads are found on devices which require mainly numeric input such as calculators, television remotes, push-button telephones, vending machines, ATMs, point of sale terminals, combination locks, safes, and digital door locks. Many devices follow the E.161 standard for their arrangement.

## Uses and functions

A computer keyboard usually has a small numeric keypad on the side, in addition to the other number keys on the top, but with a calculator-style arrangement of buttons that allow more efficient entry of numerical data. This number pad (commonly abbreviated to numpad) is usually positioned on the right side of the keyboard because most people are right-handed.
Many laptop computers have special function keys that turn part of the alphabetical keyboard into a numerical keypad as there is insufficient space to allow a separate keypad to be built into the laptop's chassis. Separate external plug-in keypads can be purchased.
Keypads for the entry of PINs and for product selection appear on many devices including ATMs, vending machines, point of sale payment devices, time clocks, combination locks and digital door locks.

## Keypad technologies

Apart from mechanical keypads, there are a wide range of technologies that can be used as keypads, each with distinctive advantages and disadvantages. These include Resistive, Capacitive, Inductive, Piezoelectric, and Optical.

## Key layout

The first key-activated mechanical calculators and many cash registers used "parallel" keys with one column of 0 to 9 for each position the machine could use. A smaller, 10-key input first started on the Standard Adding Machine in 1901. The calculator had the digit keys arranged in one row, with zero on the left, and 9 on the right. The modern four-row arrangement debuted with the Sundstrand Adding Machine in 1911.
There is no standard for the layout of the four arithmetic operations, the decimal point, equal sign or other more advanced mathematical functions on the keypad of a calculator.
The invention of the push-button telephone keypad is attributed to John E. Karlin, an industrial psychologist at Bell Labs in Murray Hill, New Jersey. On a telephone keypad, the numbers 1 through 9 are arranged from left to right, top to bottom with 0 in a row below 789 and in the center. Telephone keypads also have the special buttons labelled * (star) and # (octothorpe, number sign, "pound", "hex" or "hash") on either side of the zero key. The keys on a telephone may also bear letters which have had several auxiliary uses, such as remembering area codes or whole telephone numbers.
The layout of calculators and telephone number pads diverged because they developed at around the same time. The phone layout was determined to be fastest by Bell Labs testing for that application, and at the time it controlled all the publicly connected telephones in the United States.

## Origin of the order difference

Although calculator keypads pre-date telephone keypads by nearly thirty years, the top-to-bottom order for telephones was the result of research studies conducted by a Bell Labs Human Factors group led by John Karlin. They tested a variety of layouts including a Facit like the two-row arrangement, buttons in a circle, buttons in an arc, and rows of three buttons. The definitive study was published in 1960: "Human Factor Engineering Studies of the Design and Use of Pushbutton Telephone Sets" by R. L. Deininger. This study concluded that the adopted layout was best, and that the calculator layout was about 3% slower than the adopted telephone keypad.
Despite the conclusions obtained in the study, there are several popular theories and folk histories explaining the inverse order of telephone and calculator keypads.
* One popular theory suggests that the reason is similar to that given for the QWERTY layout, the unfamiliar ordering slowed users to accommodate the slow switches of the late 1950s and early 1960s.
* Another explanation proposed is that at the time of the introduction of the telephone keypad, telephone numbers in the United States were commonly given out using alphabetical characters for the first two digits. Thus 555-1234 would be given out as KL5-1234. These alpha sequences were mapped to words. "27" was given out as "CRestview", "26" as "ATwood", etc. By placing the "1" key in the upper left, the alphabet was arranged in the normal left-to-right descending order for English characters. Additionally, on a rotary telephone, the "1" hole was at the top, albeit at the top right.

## Keypad track design
### Separate connections

A mechanically-switched 16-key keypad can be connected to a host through 16 separate connecting leads, plus a ground lead (Figure 1, left). Pressing a key will short to ground, which is detected by the host. This design allows any number or combination of keys can be pressed simultaneously. Parallel-in serial-out shift registers may be used to save I/O pins.

### X/Y multiplexing

These 16 + 1 leads can be reduced to just 8 by using x/y multiplexing (Figure 1, center). A 16-key keypad uses a 4 × 4 array of 4 I/O lines as outputs and 4 as inputs. A circuit is completed between an output and an input when a key is pressed. Each individual keypress creates a unique signal for the host. If required, and if the processor allows, two keys can be pressed at the same time without ambiguity. Adding diodes in series with each key prevents key ghosting, allowing multiple simultaneous presses.

### Charlieplexing

8 leads can detect many more keys if tri-state multiplexing (Figure 1, right) is used instead, which enables (n-1) × (n/2) keys to be detected with just n I/O lines. 8 I/O can detect 28 individual keys without ambiguity. Issues can occur with some combinations if two keys are pressed simultaneously. If diodes are used, then the number of unique keys detectable is doubled.