Keyboard controller (computing)
Interfaces keyboard to computer, handling key events and legacy functions.
Melissa Ursula Dawn Goldsmith · CC BY-SA 4.0
A keyboard controller is the component that connects a keyboard to a computer. Its primary job is to notify the system when a key is pressed or released. When it receives data from the keyboard, it triggers a keyboard interrupt so the CPU can process the input. In setups where the keyboard is a separate peripheral (common in modern desktop computers), the controller isn't directly wired to the keys. Instead, it receives scancodes from a microcontroller inside the keyboard over a serial connection. In this scenario, the controller also manages the keyboard's LEDs by sending signals back through the same wire.
The original IBM PC AT used an Intel 8042 chip for this purpose. That chip had two extra duties: it controlled access to the Intel 80286 CPU's A20 line to work around a chip bug, and it could initiate a software CPU reset. This reset was necessary because the 286 couldn't switch from protected mode back to real mode without a reset—a problem since BIOS and real-mode operating systems like MS-DOS required real mode to function. These behaviors became so widely expected by software that later keyboard controllers kept controlling the A20 line and performing software resets, even after the Intel 80386 made the reset trick unnecessary by allowing direct mode switching. The keyboard controller also handles input from a PS/2 mouse port if one is present.
Today, the keyboard controller is either integrated into a Super I/O device or absent entirely. In the latter case, keyboard and mouse functions are managed by a USB controller, while the A20 line control has moved into the chipset's northbridge and later into the CPU's built-in integrated memory controller.
- Notable chip
- Intel 8042
- Associated system
- IBM PC AT
- Additional functions
- controlled access to the A20 line; initiated software CPU reset
- Modern location
- unit inside a Super I/O device, or integrated into chipset northbridge or CPU's integrated memory controller
Lore & Background
The IBM PC AT used an Intel 8042 chip to interface to the keyboard. This chip had two additional functions: it controlled access to the Intel 80286 CPU's A20 line to implement a workaround for a chip bug, and it was used to initiate a software CPU reset to allow the CPU to transition from protected mode to real mode, because the 286 did not allow that transition unless the CPU was reset. The latter was a problem because BIOS and services provided by real mode operating systems such as MS-DOS could only be called by programs in real mode. These behaviors have been used by plenty of software that expects this behavior, and therefore keyboard controllers have continued controlling the A20 line and performing software CPU resets even when the need for a reset via the keyboard controller was obviated by the Intel 80386's ability to switch to real mode from protected mode without a CPU reset. The keyboard controller also handles PS/2 mouse input if a PS/2 mouse port is present.
Reader's Guide
The keyboard controller's significance extends beyond simple keyboard input. Its role in controlling the A20 line and performing software CPU resets became entrenched in software expectations, causing these functions to persist even after the original hardware bugs and limitations were resolved. The Intel 8042 chip used in the IBM PC AT set a precedent that influenced later designs, as software continued to rely on these behaviors. Over time, the keyboard controller's functions have been absorbed into other components: today it is either a unit inside a Super I/O device or is missing, with its keyboard and mouse functions handled by a USB controller and its role in controlling the A20 line integrated into the chipset's northbridge and later into the CPU's built-in integrated memory controller. This evolution reflects how legacy hardware interfaces can shape computing standards long after their original necessity fades.
Did You Know?
- The Intel 8042 keyboard controller also controlled access to the A20 line to work around a chip bug in the Intel 80286.
- The keyboard controller could initiate a software CPU reset to allow the 286 to transition from protected mode to real mode.
- Modern systems may integrate the keyboard controller's A20 line function into the CPU's built-in integrated memory controller.
From Telegraph Lines to Terminal Screens
The computer keyboard did not appear out of thin air. Its deepest roots lie in the typewriter, the definitive ancestor of every key-based text entry device. Yet the specific lineage of the modern computer keyboard traces back to two utility machines: the teleprinter and the keypunch. In the 1870s, teleprinter-like devices already let operators press keys to type and simultaneously transmit stock market text over telegraph lines to ticker machines. The more recognizable teleprinter was developed between 1907 and 1910 by Charles Krum and his son Howard, with early contributions from electrical engineer Frank Pearne, though earlier models had been built independently by Royal Earl House and Frederick G. Creed. On the data-entry side, Herman Hollerith created the first keypunch devices, which by the 1930s had evolved to include keys for text and number entry resembling ordinary typewriters. These two threads—point-to-point communication and data storage—converged in the earliest computers. ENIAC used a keypunch as both input and paper-based output, while BINAC employed an electromechanically controlled typewriter to record data onto magnetic tape and display results. Together, these predecessors passed down the keyboard's layout, purpose, and central role in human-computer interaction.
The Language of Presses: How a Key Becomes a Command
At its physical core, a keyboard key is a button that functions as either a mechanical lever or an electronic switch. Most keys carry an engraved or printed character, and a single press typically maps to one written symbol. Yet producing certain glyphs demands holding several keys at once or striking them in a specific sequence. Beyond plain characters, special keys such as the escape key are designed to trigger system-level commands rather than insert text. Crucially, in a modern computer the hardware itself does not decide what a keypress means. The information transmitted to the system is a scan code that reports only which physical key or keys were pressed or released. The actual interpretation—whether that press becomes a letter, a shortcut, or a command—falls entirely to the software layer. This division of labor means the same physical keyboard can serve a word processor, a web browser, or a social media application, with each program assigning its own meaning to the identical stream of scan codes.
Three Standards, Many Sizes: The Geometry of a Keyboard
Full-size keyboards today conform to one of three principal mechanical layouts, identified by the standards bodies that govern them: ISO (ISO/IEC 9995-2) for worldwide use, ANSI (ANSI-INCITS 154-1988) for the United States, and JIS (JIS X 6002-1980) for Japan. Under the ANSI convention, keys sit on three-quarter-inch centers, and each key must travel at least 0.15 inches before registering a press. Key counts vary by region and design: US-convention keyboards typically carry 104 keys, while the 105-key layout is the norm elsewhere. Manufacturers frequently trim keys or entire sections for compactness, the most common omission being the numeric keypad, yielding what is called a tenkeyless or TKL design. Laptops and wireless peripherals go further, dropping duplicate and rarely used keys, though function and arrow keys are almost universally retained. Desktop full-size boards add alphabetic characters, numerals, a numeric keypad, typographical symbols, currency marks, diacritics, and a range of function keys, with the specific glyph set shaped by national language conventions.
Enduring Amid Newer Interfaces
Since the 1970s, the keyboard has served as the principal input method for computers, supplanting the punched cards and paper tape that preceded it. That primacy has faced successive challenges. The computer mouse entered consumer use in 1984, coinciding with a shift from text-only, sparsely graphical interfaces toward screens filled with icons. Touchscreens arrived in the 2000s, and mobile devices such as smartphones and tablets now rely on virtual keyboards rendered on glass. Laptop keyboards, meanwhile, have been compressed to shorter travel distances and reduced key sets, often swapping rubber-dome switches for scissor mechanisms to save vertical space. Despite each of these innovations, the physical keyboard has never been displaced. It remains the most integrated and central peripheral in human-computer interaction, whether on a desktop, a notebook, or even as the virtual grid that appears when a user taps a touchscreen to type a message.
Gallery



Frequently Asked Questions
What is a keyboard controller in computing?
It's the hardware bridge between your keyboard and the rest of the system, responsible for alerting the CPU that a key event has occurred. It fires a hardware interrupt so the processor knows to read and handle the input.
Which chip originally served as the keyboard controller?
The Intel 8042 was the classic implementation, first deployed in the IBM PC AT architecture. Beyond key events, it also gated access to the A20 address line and could initiate a software CPU reset.
Where does the keyboard controller live in a modern PC?
These days it's typically folded into a Super I/O chip on the motherboard, integrated into the chipset northbridge, or baked directly into the CPU's integrated memory controller. It's no longer a standalone component you'd find as its own discrete IC.
How does the keyboard controller communicate with a modern external keyboard?
In a typical desktop setup, a tiny microcontroller inside the keyboard reads the key matrix and transmits scancodes over a serial link to the controller. The controller then relays that data to the CPU and can push signals back to toggle the keyboard's indicator LEDs.
Why does the keyboard controller still matter if the CPU could just read the keyboard directly?
It offloads interrupt handling and legacy bus duties—like A20 gating and reset initiation—away from the main processor. It also gives the OS a stable, low-level interface that the keyboard driver can rely on regardless of which peripheral model is attached.
More in Computer Keyboards 1-24
Spotted an error? Know more?
Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced
