Fact-checked by Grok 2 weeks ago

Scancode

A scancode (or scan code) is a low-level numeric code generated by a computer 's hardware to indicate which specific physical key has been pressed or released, irrespective of the layout, language, or character mapping. These codes are transmitted from the controller to the host computer via protocols like PS/2 or USB, serving as the foundational input signal before higher-level processing into keycodes or characters. The origins of scancode-like encoding trace back to the with early electronic keyboards, such as Invac's light-beam designs using binary codes from photodetectors, evolving through systems in the late that generated unique codes per key via electrical grids. By the , matrix scanning techniques introduced by companies like Cherry and Micro Switch enabled more efficient debounce and rollover handling, with microprocessor-based keyboards (e.g., using 8048 chips) standardizing the process by the decade's end. The modern PC scancode system was formalized in 1981 with the IBM PC/XT, introducing Set 1 scancodes—a compact 7-bit scheme for the 83-key layout—followed by Set 2 in 1984 for the enhanced 101/102-key AT keyboard, which remains the most widely used due to its support for extended keys and better encoding of modifiers like Shift. Set 3, introduced for the PC, offered further enhancements but saw limited adoption. In operation, a typical scancode consists of one to three bytes: a make code for key press, optionally prefixed with 0xE0 or 0xF0 for extended or release signals, allowing distinction between actions on up to 128 keys. This is crucial for operating systems and applications, enabling consistent input handling across diverse keyboards while accommodating features like n-key rollover (NKRO) for simultaneous presses. In contemporary USB keyboards, scancodes are largely supplanted by HID usage codes defined in the USB standard, though legacy PS/2 emulation and drivers continue to rely on traditional sets for compatibility.

Fundamentals

Definition

A scancode is a low-level numeric code generated by to report key presses or releases, representing the physical position of a independent of any operating or software of its or . The 's embedded continuously scans a —a of interconnected rows and columns where each switch resides at an —to detect activations and translates the row-column coordinates into the appropriate scancode. This process ensures that the scancode identifies the 's location on the layout, such as or , without regard to regional language mappings or user configurations. Once generated, the scancode is transmitted from the keyboard to the host computer's controller using standardized protocols. In the PS/2 interface, common for traditional wired keyboards, scancodes are sent serially over a bidirectional clocked data line to the system's keyboard controller, which may perform translation between scancode sets if needed. For modern USB keyboards, the microcontroller converts the matrix-derived scancode into a USB HID (Human Interface Device) report, where keys are encoded as usage identifiers within the HID keyboard page; these reports are then transmitted over the USB bus to the host, maintaining the hardware-level abstraction. This transmission occurs asynchronously upon key events, with separate codes for press (make) and release (break) actions to enable full key state tracking. The basic anatomy of a scancode involves compact 1- to 2-byte sequences, though extended or multi-key combinations can extend to more bytes for clarity in handling modifiers or special functions. For instance, in the PS/2 Set 1 scancode set, pressing the 'A' key produces 0x1E, while releasing it yields 0x9E; extended keys like the right arrow prepend 0xE0, resulting in sequences such as 0xE0 0x4D. In USB HID, the 'A' key is reported using usage ID 0x04 within the usage page (0x07), as defined in the report descriptor and included in the input . Unlike higher-level keycodes, which map to specific characters or actions based on software, scancodes remain tied solely to hardware positions.

Distinction from Keycodes

Scancodes represent the lowest level in the input hierarchy, consisting of hardware-generated, device-dependent codes that identify specific physical presses and releases without regard to the layout or operating system interpretation. In contrast, keycodes serve as an OS-level abstraction, translating these raw scancodes into standardized, device-independent values that denote the 's functional purpose or position. This distinction allows scancodes to remain immutable and tied to the hardware's electrical signaling, while keycodes provide a normalized for software to process input consistently across compatible devices. The standard keyboard input pipeline flows from scancode to keycode and finally to character code, with each layer building on the previous one to produce usable textual or functional output. The controller sends a scancode upon key activation—for instance, 0x1C in PS/2 scan code set 2 for the physical key typically labeled 'A' in layouts—which the OS driver maps to a keycode such as VK_A (0x41) in Windows or KEY_A (30) in . This keycode remains fixed for the physical key regardless of the user's locale or layout settings, ensuring that applications like games can detect positional input (e.g., the 'W' key for forward movement) without layout variations affecting the mapping. Only at the character code stage—derived via layout-specific translation—does the output vary; for example, the same keycode might yield U+0061 ('a') in a layout or U+0071 ('q') in an layout. Keycodes incorporate handling of modifier states, such as Shift or Ctrl, but do not alter the core keycode value for the ; instead, the modifier's own keycode (e.g., VK_SHIFT or KEY_LEFTSHIFT) is tracked separately to influence downstream processing. For instance, pressing Shift followed by the 'A' key generates the Shift keycode alongside the 'A' keycode, but the combined state during character translation produces an uppercase 'A' (U+0041) in rather than lowercase. This separation ensures scancodes focus solely on raw hardware events, keycodes on logical key identification, and character codes on context-aware text generation, preventing layout-dependent ambiguities in low-level input handling.

Historical Development

Origins in Early PCs

The IBM Personal Computer (model 5150), released on August 12, 1981, introduced scancodes as a fundamental element of its input system, enabling the detection and transmission of key presses from the attached 83-key . This utilized capacitive switches and featured an Intel 8048 microcontroller embedded within it to scan an 8x16 matrix, generating 8-bit scancodes that represented row and column intersections for each . The scancodes were transmitted serially over a 5-pin to the system board, where the Intel 8255 Programmable Peripheral Interface chip handled input at port 60h, triggering an interrupt (IRQ1, INT 9) for each code received by the ROM . Unlike ASCII codes, these raw scancodes provided hardware-level identification of keys without character mapping, allowing the to interpret them based on shift states and produce outputs or special commands. The design employed make codes for key presses (e.g., 01h for the '1' key) and break codes for releases (formed by adding 0x80 to the make code, such as 81h for '1' release), a scheme that addressed the limitations of the 8-bit format in distinguishing press from release events on the fixed 83- layout. This make/break variant was essential due to the 's constrained matrix, which supported only a finite number of unique positions for the typewriter section, 10 function keys, and 16- , without room for additional keys or complex modifiers in the initial hardware. The 8048 microcontroller also managed debouncing, buffering up to 20 scancodes internally before transmission, and basic diagnostics like stuck- detection during , mitigating early reliability issues in a system operating at 4.77 MHz with limited buffering (16 entries in the system buffer at 0040h:001Eh-003Dh). The open architecture of the PC 5150 facilitated rapid adoption of its scancode system by compatible clones from manufacturers like and starting in the mid-1980s, establishing it as a for PC interfaces and ensuring software compatibility across the burgeoning market. This widespread emulation of the original scancode set (later termed Set 1 or XT scancodes) propelled the platform's dominance, as third-party systems replicated the serial transmission and interrupt-driven processing to run IBM PC software without modification.

Evolution of Standards

The evolution of scancode standards began with 's proprietary implementations for personal computers, transitioning through iterative refinements to accommodate expanding hardware capabilities. In 1981, the original PC (model 5150) introduced Scancode Set 1, which utilized a simple scheme of make and break codes transmitted over a 5-pin to report key presses and releases. This set formed the foundation for input in early PCs, prioritizing compatibility with the system's interrupt handling. By 1984, with the release of the PC/AT (model 5170), shifted to Scancode Set 2 to support the enhanced 84-key layout, introducing prefix bytes for extended keys and improving efficiency in code transmission over the same connector type. This change addressed limitations in Set 1, such as handling additional function keys, while maintaining through translation mechanisms in the keyboard controller. Scancode Set 3 was introduced earlier in 1983 with the PC for compatibility with terminal systems, using an F0 prefix for break codes and offering a streamlined structure, but it saw limited adoption outside specific professional environments due to lack of broad OS support. Further advancements came in 1986 with the introduction of the enhanced 101-key keyboard layout, which added dedicated cursor and clusters along with additional keys, paired with Scancode Set 2 for improved handling of the expanded array, including greater flexibility for key repeat and break code control via the existing prefix system. This layout became standard with the and marked a significant step toward more robust input handling in professional computing environments. These -specific sets remained proprietary but influenced clone manufacturers, fostering a semi-standardized within the PC industry. The saw a shift toward broader industry adoption and formalization of the PS/2 protocol, introduced by in 1987 but widely embraced as a open standard for interfaces on IBM-compatible systems. This protocol, using a 6-pin , extended the AT-style scancode transmission with bidirectional communication and power delivery, enabling features like LED control and enhanced diagnostics, and became ubiquitous in by the mid- due to its integration into designs. The introduction of USB in 1996 revolutionized keyboard standards by moving away from hardware-specific scancodes toward a universal protocol under the (HID) specification in USB 1.0, where key reports use standardized Usage IDs from predefined tables rather than vendor-proprietary codes. This shift promoted interoperability across devices and operating systems, reducing the need for custom drivers and enabling plug-and-play functionality for keyboards. Subsequent refinements in HID 1.11, released in 2001, addressed emerging needs for wireless connectivity—via the contemporaneous HID profile—and virtual keyboards by expanding Usage Tables to include more international key mappings, such as dead keys and language-specific modifiers, enhancing global compatibility. These updates ensured HID's adaptability to diverse input scenarios without reverting to legacy scancode dependencies.

Variants

Make and Break Codes

Make codes are generated by the keyboard controller when a is pressed, consisting of a single byte that identifies the specific key independent of its position or modifiers. For instance, in scancode set 1, the make code for the 'A' key is 0x1E. These codes enable the host to recognize key activations without ambiguity. Break codes, in contrast, are transmitted upon key release to signal the end of the key event. In set 1, the break code is derived from the make code by setting the highest bit (equivalent to adding 0x80), resulting in 0x9E for the 'A' key release. Set 2 employs a different scheme, where the break code is a two-byte sequence beginning with the prefix 0xF0 followed by the make code; for 'A', this is 0xF0 0x1C, with the make code itself being 0x1C in this set. Set 1 relies on bit manipulation without an explicit prefix, using dedicated scan lines to distinguish press and release states. The primary purpose of distinguishing make and break codes is to provide complete information on key states, allowing software to detect held keys and implement features like auto-repeat, where the make code is retransmitted at regular intervals while the key remains depressed. This mechanism ensures precise control over input timing and duration, foundational for responsive user interfaces in computing systems.

Extended Codes

Extended codes represent a in scancodes to expand beyond the 128-key limit of basic Set 2 and Set 3 encodings, enabling support for additional keys on enhanced layouts without altering the core protocol. These codes employ multi-byte sequences, typically starting with a byte that signals the extension, allowing the controller to transmit for keys like right-side modifiers or specialized functions. This approach maintains with earlier systems by treating the as an ignorable or special byte in environments. In scancode set 2, the standard prefix for most extended codes is 0xE0, followed immediately by the conventional scancode byte for the key in question; for break (release) events, an additional 0xF0 byte precedes the final scancode after the prefix. This two- or three-byte structure distinguishes extended keys from standard ones—for instance, the right generates a make code of 0xE0 0x14, while its break code is 0xE0 0xF0 0x14. Similarly, the right uses 0xE0 0x11 for make. The 0xE0 prefix originated as a way to encode "" duplicate keys on early keyboards but evolved into a general expansion tool for scancode space. A special case is the , which uses a 0xE1 prefix and produces an eight-byte make sequence: 0xE1 0x14 0x77 0xE1 0xF0 0x14 0xF0 0x77, with no distinct break code due to its latching behavior. Introduced with IBM's 101/102-key "enhanced" keyboard layout in 1986, extended codes primarily addressed the addition of dedicated keys (such as separate and Insert/Delete), right-side and modifiers, and expanded keys (F11 and F12) to improve in productivity applications. By the , as keyboards incorporated Windows-specific features and early multimedia controls, the 0xE0 prefix accommodated these expansions; the Microsoft Natural Keyboard of 1994, for example, assigned 0xE0 0x5B to the left , 0xE0 0x5C to the right , and 0xE0 0x5D to the Application (Menu) key, facilitating OS-level shortcuts and application . These extensions proved essential for - and 104-key layouts, supporting the growing complexity of user interfaces without requiring a full scancode overhaul. Despite their utility, extended codes carry limitations in legacy hardware and software environments. Systems with older controllers, such as those predating the i8042 PS/2 interface, may interpret the 0xE0 prefix as a standalone invalid or (often 0xE0 itself, for protocol resets), leading to dropped inputs or conflicts for extended keys. Additionally, certain scancode ranges (e.g., above 0x7F or specific bytes like 0x00 and 0xFF) are avoided to prevent ghosting in multi-key combinations or incompatibility with basic drivers, restricting the total addressable keyset even with prefixes. Proper handling requires and driver support attuned to these sequences, which not all vintage PCs provide.

Scancode Sets

PC-Compatible Sets

The PC-compatible scancode sets refer to the standardized mappings developed by for its keyboards and adopted in compatible systems, evolving from the original PC (Model ) to later AT and PS/2 architectures. These sets define the 8-bit binary codes transmitted over the keyboard to indicate key presses (make codes) and releases (break codes), without reliance on higher-level protocols like USB. Scancode Set 1 was introduced with the original 83-key PC/XT in 1981, using simple 8-bit codes without prefixes for basic keys. Make codes range from 0x00 to 0x7F, while break codes are formed by ORing the make code with 0x80 (e.g., 0xB9 for spacebar release). This set lacks support for extended keys, relying on a fixed matrix scan for the compact layout. For example, the spacebar produces make code 0x39. Scancode Set 2 became the standard for 84-key IBM PC/AT keyboards starting in 1984 and extended to 101/102-key enhanced layouts in PS/2 systems, incorporating prefixes to handle additional keys and break signals. Make codes are single bytes from 0x00 to 0xFF, with break codes prefixed by 0xF0 followed by the make code (e.g., 0xF0 0x5A for Enter release). The 0xE0 prefix denotes extended keys, such as right-side modifiers or arrows, allowing compatibility with expanded layouts. In this set, the main Enter key uses make code 0x5A, differing from Set 1 to accommodate the taller key profile. Scancode Set 3 was introduced in 1983 for the Personal Computer and certain terminal s (e.g., 122-key Model F), featuring make codes similar to Set 2 for core alphanumeric keys but with differences for other keys and enhanced support for break codes via commands. It saw limited adoption in standard consumer PCs due to its specialized use. In typical PC-compatible systems, the controller (e.g., Intel 8042) can instead translate native Set 2 codes to Set 1 equivalents for with legacy software and routines. This translation mode, enabled via controller commands, was commonly used in and later to ensure integration with applications expecting Set 1, without exposing Set 2 codes directly. For instance, a Set 2 Enter (0x5A) translates to Set 1's 0x1C. The following table enumerates selected common key mappings across the sets for alphanumeric, Enter, spacebar, and (make codes in hexadecimal; break codes omitted for brevity, following set-specific rules):
KeySet 1Set 2Translated (Set 2 to Set 1)
A0x1E0x1C0x1E
Spacebar0x390x290x39
Enter0x1C0x5A0x1C
Up ArrowN/A0xE0 0x48N/A
Left ArrowN/A0xE0 0x4BN/A
These mappings prioritize core functionality, with extensions in Set 2 enabling full enhanced keyboard support.

USB HID Sets

In USB (HID) keyboards, traditional scancodes are supplanted by a system of 16-bit Usage IDs defined in the HID Usage Tables, enabling standardized key identification across devices. These Usage IDs combine a 16-bit Usage Page with a 16-bit Usage ID; for keyboards, Usage Page 0x07 is employed, where the lower 8 or 16 bits specify the key function. For instance, the letter 'A' corresponds to Usage ID 0x04, while keys, such as those for non-US layouts (e.g., alternate # and @ symbols), may use IDs like 0x32 for the Non-US # and ~ key. This approach, formalized in the HID Usage Tables starting from version 1.0 in 1996 and updated through version 1.5 in 2004, ensures consistent mapping without reliance on platform-specific scancode sequences. Keyboard report descriptors outline the format for transmitting these Usage IDs to the host, typically via 8-byte input reports in the boot protocol for compatibility. The structure includes a first byte as an 8-bit modifier bitmap (bits for Left/Right Ctrl, Shift, Alt, and GUI keys), a reserved second byte (set to 0x00), and six subsequent bytes each holding a single 8-bit Usage ID for pressed keys, allowing up to six simultaneous non-modifier keys. In the report protocol, custom descriptors can extend this to support more keys by using bitfields or larger arrays. Unlike legacy PC-compatible scancode sets that transmit sequential byte codes, HID reports focus on current key states for efficient, event-driven communication. The HID system offers key advantages, including platform independence, as Usage IDs are universally recognized by compliant operating systems without custom drivers, facilitating plug-and-play operation across Windows, macOS, , and embedded systems. It also enables n-key rollover (NKRO) through flexible report configurations, where devices can report all pressed keys simultaneously via multiple reports or expanded arrays, surpassing the limitations of fixed-rollover legacy protocols. For with PS/2 interfaces, USB-to-PS/2 adapters incorporate translation tables that map HID Usage IDs to PS/2 scancode Set 2 or Set 3 equivalents, ensuring functionality on older hardware.

Implementation

Hardware Generation

In keyboard hardware, scancodes are generated by an embedded that continuously scans the to detect user input. The is a of rows and columns interconnected by mechanical switches under each . The sequentially drives one row (or column) high while monitoring the corresponding columns (or rows) for a low signal, indicating a closed switch and thus a pressed . This row-column intersection uniquely identifies the position, which the maps to a specific scancode value based on the keyboard's predefined layout. The , often integrated into the keyboard's , handles the scanning and code generation. In legacy PS/2 keyboards, an onboard (such as those based on the 8048) monitors the matrix, debounces keys, and produces raw make (press) and break (release) scancodes in one of several sets, which are then transmitted to the host computer's 8042 keyboard controller for further processing. Modern USB keyboards typically employ AVR-series s, such as the AT90USB family from Microchip, which perform matrix scanning via dedicated tasks and generate scancodes compliant with USB HID standards. For instance, in AVR-based implementations, a polling routine like keyboard_task detects key hits and populates an input report buffer with the appropriate scancodes before transmission. Scancodes are transmitted serially from the keyboard to the host. In PS/2 interfaces, the keyboard's uses two dedicated lines—clock and data—for , where each 8-bit scancode is framed by a start bit, the data bits (least significant first), an odd , and a stop bit. The host's 8042 controller receives the codes, verifies the odd ; if mismatched, it issues a resend command (0xFE) to the keyboard, with persistent errors flagging a in the controller . In contrast, USB keyboards transmit scancodes within HID input reports over an interrupt endpoint, polled by the host at a default rate of 125 Hz (8 ms intervals for full-speed devices). Error handling occurs at the USB protocol level, where 16-bit (CRC) fields in data packets ensure integrity, with automatic retries or NAK responses for detected .

Software Mapping

In operating systems, scancodes from are initially processed by -level drivers to produce device-independent keycodes, which are then further interpreted for application use. In , the evdev interface within the input subsystem maps scancodes to keycodes using database entries in directories like /lib//hwdb.d/, with the primary file 60-keyboard.hwdb defining these translations based on device and product information for reliable . This occurs early in the input , allowing the to assign standard key symbols regardless of variations. On Windows, the class driver in the Win32 subsystem translates scancodes to virtual-key (VK) codes via dynamic-link libraries (KBDLLs), such as kbdus.dll for layouts, ensuring consistent input across diverse . Higher-level software layers build on these keycodes by applying locale-specific translations through configuration files or bundles. In X11-based systems, the X Keyboard Extension (XKB) library processes keycodes using symbol files in /usr/share/X11/xkb/symbols/, where the "us" file maps keys to standard characters for English, while the "fr" file reassigns positions for accented letters like é on the 2 key in layouts. macOS handles similar translations via keyboard layout files or bundles in /Library/Keyboard Layouts/ or ~/Library/Keyboard Layouts/, which define keymaps for locales such as English (mapping Z and Y in standard positions) versus (swapping Z and W for ), integrated into the HID framework for output. Cross-platform libraries abstract these OS-specific mappings to simplify development, particularly for games and multimedia applications. The (SDL) uses an enumeration of SDL_Scancode values to represent physical key positions independently of layouts or keycodes, enabling developers to query events like SDL_SCANCODE_A for the 'A' key across Windows, , and macOS without handling raw scancodes directly. In Windows-specific contexts, provides a similar abstraction through DIK_ constants (e.g., DIK_A for scancode 0x1E), which directly correspond to hardware scancodes but allow polling or event-based input in full-screen applications, bypassing standard Win32 message queues. Debugging tools facilitate inspection of scancode processing at various layers. On , xev from the xorg-xev package monitors X11 events, reporting keycodes and keysyms derived from underlying scancodes when keys are pressed, aiding in layout verification. For Windows, tools like Key-ScanCode capture and display raw scancodes alongside VK codes in real-time, useful for troubleshooting driver mappings or custom remappings.

References

  1. [1]
    Keyboard Input Overview - Win32 apps - Microsoft Learn
    Jul 14, 2025 · The scan code is the value that the system generates when the user presses a key. It is a value that identifies the key pressed regardless of ...
  2. [2]
    What Is a Scan Code? - Computer Hope
    Jul 9, 2025 · A scan code is created by a computer keyboard each time a key is pressed and when it is depressed. After the keyboard has created the scan code, it is received ...
  3. [3]
  4. [4]
    Linux: What is Scancode, Keycode, Keysym
    Dec 9, 2022 · Scancode: A number the keyboard send to computer. For USB keyboards, it's defined by the USB standard. · Keycode: A number used by Linux kernel ...
  5. [5]
    A brief history of keyboard encoding
    Dec 8, 2023 · Daniel shares with us some of the fruits of research into computer keyboard history conducted over recent years.
  6. [6]
    Keyboard Scancodes
    These scancodes (no official name known) were believed to have be introduced in 1977 with the IBM 5251 Display Station and 5252 Dual Display Station keyboards ...Missing: history | Show results with:history
  7. [7]
    Keyboard inputs - scancodes, raw input, text input, key names
    Jan 2, 2018 · A small note: there are 3 scancode sets (for PS/2 keyboard): set 1 (IBM PC XT), set 2 (IBM PC AT), set 3 (IBM 3270 PC).
  8. [8]
    Keyboard scancodes
    1. Keyboard scancodes · 1.1 Key release · 1.2 Protocol scancodes · 1.3 Escape scancodes · 1.4 Ordinary scancodes · 1.5 Escaped scancodes · 1.6 Fake shifts · 1.7 Added ...
  9. [9]
    Keyboard scancodes: Special keyboards - MF II keyboards
    The IBM Rapid Access keyboard has 14 extra buttons and two more leds than a normal PC keyboard. By default, these buttons do not generate any scancodes.
  10. [10]
    Understanding AutoHotkey Keyboard Scan Codes and Virtual Key ...
    Apr 14, 2016 · Learn the difference between AutoHotkey keyboard Scan Codes (SCnnn) and Virtual Key Codes (VKnn) and when to use them for hotkeys.<|control11|><|separator|>
  11. [11]
    A summary of scan code & key codes sets used in the PC ...
    Jul 4, 2010 · The USB HID spec defines a standard 16 bit scan code set for all compliant keyboards to use. The USB HID spec gives scan codes names based on ...Ibm Xt Keyboard · Ibm At & Ps/2 Keyboards · Usb Keyboards
  12. [12]
    Keyboard input - ArchWiki
    Sep 22, 2025 · Keyboard input involves a scancode, which the kernel maps to a keycode, and then the keyboard layout maps the keycode to a symbol.
  13. [13]
    Virtual-Key Codes (Winuser.h) - Win32 apps | Microsoft Learn
    Oct 16, 2025 · The following table shows the symbolic constant names, hexadecimal values, and mouse or keyboard equivalents for the virtual-key codes used ...Keyboard Input · Mouse Input · Raw Input · Keyboard and Mouse Input<|control11|><|separator|>
  14. [14]
    IBM PC 5150 Microcomputer Processor
    The IBM PC was a milestone in personal computing introduced on August 12, 1981. The micropocessor was a high-speed, 16 bit Intel 8088 and five expansion slots.
  15. [15]
    [PDF] IBM PC Technical Reference - Bitsavers.org
    The IBM Personal Computer has two major elements; a System Unit and a keyboard. In addition, a variety of options are offered including one or two 5-1/4 ...
  16. [16]
    The IBM PC: From Beige Box to Industry Standard
    Jan 1, 2012 · The PC evolved from a single machine to an industry standard, not just for desktop computers but for notebooks, workstations, and servers.
  17. [17]
    PC Keyboard: The First Five Years | OS/2 Museum
    Sep 3, 2019 · It supports a new Read ID command (0F2h) which can be used by software to identify it. It also supports two additional sets of scan codes. The ...Missing: 5150 | Show results with:5150
  18. [18]
    Develop Windows Device Drivers for Human Interface Devices (HID)
    Oct 22, 2024 · The USB-IF ratified the specification for HID over USB in 1996. ... The USB-IF working group publishes HID usage tables that are part of ...
  19. [19]
    [PDF] HUMAN INTERFACE DEVICE (HID) PROFILE
    Jun 1, 2001 · This specification uses the USB (Universal Serial Bus) definition of Human Interface Device. (HID) [4] in order to leverage the existing class ...<|control11|><|separator|>
  20. [20]
    Keyboard scancodes - CWI
    1. Keyboard scancodes. The data from a keyboard comes mainly in the form of scancodes, produced by key presses or used in the protocol with the computer.Missing: definition | Show results with:definition
  21. [21]
    Scan Codes -- Set 1
    Scan codes include make/break codes for keys, like A (1E/9E), and codes for power (E0,5E/E0,DE), and media controls like Next Track (E0,19/E0,99).
  22. [22]
    PS2 Keyboard Scan Codes - Technoblogy
    The codes generated by the PS/2 keyboard are called scan codes. Make codes When a key is pressed a make code is transmitted. Most make codes are a single byte.
  23. [23]
    None
    Below is a merged summary of the keyboard scancodes for the IBM PC AT (Set 2), based on the provided segments from the IBM PC AT Technical Reference (March 1986). The information is consolidated into a dense, structured format, including tables where appropriate, to retain all details while ensuring clarity and completeness. The response avoids redundancy and organizes the content by key aspects: Set 2 Scancodes, Prefixes, Examples, and Sets/Translation. URLs are listed at the end for reference.
  24. [24]
    INT 16 - Keyboard Scan Codes - Nox-Rhea WiKi
    Feb 19, 2023 · Key, Normal, Shifted, w/Ctrl, w/Alt. A, 1E61, 1E41, 1E01, 1E00. B, 3062, 3042, 3002, 3000. C, 2E63, 2E42, 2E03, 2E00.
  25. [25]
  26. [26]
    Wayback Machine
    ### Summary of PC Scancode Sets (1, 2, 3) from translate.pdf
  27. [27]
    [PDF] HID Usage Tables - USB-IF
    Jan 26, 2024 · Page 1. HID Usage Tables. FOR. Universal Serial Bus (USB). Version 1.5. 1996-2022 USB Implementers' Forum - All rights reserved. Page 2 ...
  28. [28]
    None
    Summary of each segment:
  29. [29]
    [PDF] USB HID to PS/2 Scan Code Translation Table
    *. Under all Microsoft operating systems, all PS/2 keyboards actually transmit Scan Code Set 2 values down the wire from the keyboard to the keyboard port.<|control11|><|separator|>
  30. [30]
    Keypad Scan Introduction
    In order for the microcontroller to scan the keypad, it outputs a nibble to force one (only one) of the columns low and then reads the rows to see if any ...
  31. [31]
    Interfacing 4×4 Keypad matrix with 8051 microcontroller - Technobyte
    Jul 1, 2020 · To detect the key that's pressed, two ports of the microcontroller are connected to the rows and columns of the matrix respectively. The port ...
  32. [32]
    The PS/2 Keyboard Interface
    ### Summary of PS/2 Keyboard Hardware
  33. [33]
    [PDF] AVR271: USB Keyboard Demonstration
    The USB keyboard application requires the following hardware: 1. AVR USB evaluation board (STK525, AT90USBKey, STK526...or your own board). 2. AVR USB ...
  34. [34]
    [PDF] On the Latency of USB-Connected Input Devices
    May 9, 2019 · Therefore, an. USB HID device specifying a desired polling interval of 10 ms is usually polled every 8 ms, i.e. with a polling rate of. 125 Hz.<|separator|>
  35. [35]
    How USB Works: Communication Protocol (Part 2) - CircuitBread
    Apr 23, 2024 · Optional CRC: Cyclic redundancy check is the error-checking mechanism to check the integrity of the packet. The length of the CRC field can ...
  36. [36]
    Map scancodes to keycodes - ArchWiki
    Mar 16, 2024 · There are two ways of mapping scancodes to keycodes. The preferred method is to use udev because it uses hardware information (which is a quite reliable source)Using udev · Examples · Updating the Hardware...
  37. [37]
    X keyboard extension - ArchWiki
    Apr 26, 2025 · The X keyboard extension, or XKB, defines the way keyboards codes are handled in X, and provides access to internal translation tables.
  38. [38]
    SDL2/SDL_Scancode - SDL Wiki
    Located at the lower left of the return key on ISO keyboards and at the right end of the QWERTY row on ANSI keyboards.
  39. [39]
    Key-ScanCode | View scan and virtual key codes
    Key ScanCode is a small gui utility to view the scan and virtual key codes of individual keys on a keyboard.Missing: inspect | Show results with:inspect