Scancode
Broadly speaking, a scancode (or scan code) is either a number or bit array that is used by a keyboard protocol to uniquely identify a keyboard key. Keyboards normally send scancodes to the computer to update the computer's internal keyboard state (which tracks what keys are being held down). The exact mechanism how, when and what scancodes are sent depends on the protocol. A keyboard protocol may use other means to update the computer's internal keyboard state, such as sending a bitmap that encodes the state of keys (pressed/released). This is partially the case for a keyboard using the HID protocol when the Boot Protocol is selected. It will send the states of modifier keys encoded in a bitmap (where each bit represents a key state) alongside a scancode array of pressed keys (excluding modifier keys).
Broadly speaking, a scancode (or scan code) is either a number or bit array that is used by a keyboard protocol to uniquely identify a keyboard key. Keyboards normally send scancodes to the computer to update the computer's internal keyboard state (which tracks what keys are being held down). The exact mechanism how, when and what scancodes are sent depends on the protocol. A keyboard protocol may use other means to update the computer's internal keyboard state, such as sending a bitmap that encodes the state of keys (pressed/released). This is partially the case for a keyboard using the HID protocol when the Boot Protocol is selected. It will send the states of modifier keys encoded in a bitmap (where each bit represents a key state) alongside a scancode array of pressed keys (excluding modifier keys).
References
No reference rows published for this article.
Cite this article
MLA
"Scancode." encyclopegia.org, 2026, https://encyclopegia.org/wiki/scancode. Accessed 24 November 2026.
Chicago
"Scancode." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/scancode.
APA
encyclopegia.org. (2026). Scancode. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/scancode
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON