Scancode
A scancode (or scan code) is the data that most computer keyboards send to a computer to report which keys have been pressed. A number, or sequence of numbers, is assigned to each key on the keyboard.
Variants
Mapping key positions by row and column requires less complex computer hardware; therefore, in the past, using software or firmware to translate the scancodes to text characters was less expensive than wiring the keyboard by text character. This cost difference is not as profound as it used to be. However, many types of computers still use their traditional scancodes to maintain backward compatibility.
Some keyboard standards include a scancode for each key being pressed and a different one for each key being released. In addition, many keyboard standards (for example, IBM PC compatible standards) allow the keyboard itself to generate "typematic" repeating keys by having the keyboard itself generate the pressed-key scancode repeatedly while the key is held down, with the release scancode sent once when the key is released.