What Is a Computer Keyboard and How Does It Work?
A computer keyboard is input hardware that sends typing and commands to a computer: each key press passes through a switch, a scanning circuit, and a controller before a letter appears on screen. This guide explains what is inside a keyboard, how it detects and sends key presses, the common key-switch structures, how keyboards connect, and how those choices map to our OEM keyboard range.
What Is a Computer Keyboard?
A computer keyboard is a built-in or peripheral input device modeled after the typewriter keyboard; its keys act as mechanical levers or electronic switches[1]. Like a mouse, it sends data and commands into the computer[2]. A standard full-size desktop keyboard has 101 to 105 keys[1].
Is a keyboard hardware? Yes. A keyboard is a physical peripheral—hardware—while the layout and shortcuts it uses are set by software on the computer. For ordinary typing, the keyboard reports which key was pressed or released and the computer applies the selected layout[1]; that is why one keyboard can type different languages by switching the layout setting.
What Is Inside a Keyboard
| Part | What It Does |
|---|---|
| Keycaps | The tops you press, usually ABS or PBT plastic, with printed, laser-etched, or molded legends[3] |
| Switches | One under each key: a rubber dome over a membrane in most keyboards[4], or individual mechanical switches |
| Membrane sheets or circuit board | Carry the X-Y matrix of contacts that links every key to the controller[1] |
| Plate | A plastic or metal layer that holds the switches level |
| Controller | Scans the matrix and turns key presses into codes[1] |
| Case and cable | The housing and the USB cable—or a radio and battery in wireless keyboards[5] |
How are keyboards made? The case, plate, and keycaps are molded or machined; legends are printed or laser-etched onto the keycaps; and the membrane sheets or circuit board are assembled with the switches into the case. When you approve samples, check every key, the legends, and the cable before mass production. For a private-label order, the parts you change most often are keycap legends, colors, and the logo.
How a Keyboard Works, Step by Step
- Press: in a contact-matrix keyboard—membrane, scissor, and most mechanical boards—the key closes a contact; a Hall-effect key instead moves a magnet past a sensor[6].
- Scan: the controller scans the X-Y matrix line by line to find which contact closed[1].
- Debounce: contacts bounce for a moment before settling, so the keyboard's firmware filters the bounce and records one key press[7].
- Encode: the controller turns the press into a code, the scan code, which identifies the physical key only[1].
- Send: the code travels over USB, PS/2, or a wireless link. Over USB, a keyboard is a standard human interface device, so it works without special drivers on most systems[8]; in the simple boot protocol used by BIOS screens, up to six keys plus modifiers are reported at once[9].
- Interpret: the operating system applies the layout and shows the character[1].
When certain three-key combinations are pressed on a matrix without isolation diodes, the controller can see a fourth "phantom" key that was never pressed[1]. This is the cause of ghosting, and how keyboards prevent it is covered in Anti-Ghosting & NKRO Explained.
Common Key-Switch Structures
| Structure | How It Works | In Our Catalog |
|---|---|---|
| Rubber dome over membrane | A rubber dome acts as the return spring and, when fully pressed, joins contacts on the membrane layers[4],[10]; the most common design made today[4] | Most wired and office models, e.g. ST15, ST13, ST12 |
| Scissor switch | A compact, low-profile variant of the rubber dome, common on laptops[11] | Not listed in our quotation sheet; see Scissor Switch & Low-Profile Keyboards |
| Mechanical switch | An individual switch with its own spring under each key | e.g. ST60 (blue), ST65 (red), ST78 |
| Hall-effect (magnetic) | A magnet in the key stem is read by a sensor without contact[6] | ST90 |
Mechanical and membrane boards are compared in Mechanical vs. Membrane Keyboard, and switch colors in Mechanical Key Switches.
How Keyboards Connect
What is a wired keyboard? One that sends its key codes and draws its power through a cable. Wired keyboards once used the AT connector, which was eventually replaced by PS/2 and USB[5]; today USB is the standard, and all wired keyboards in our catalog are USB, some with a detachable cable (for example ST60 and ST90, which uses USB-C).
Wireless keyboards add a transmitter and a battery, and connect through a USB receiver or through Bluetooth built into the computer[5]. How that radio link works is explained in How Do Wireless Keyboards and Mice Work?.
What This Means When You Source Keyboards
- Structure sets the price tier and feel: membrane for office and value lines, mechanical for gaming lines, Hall-effect for premium.
- Agree on layout, legends, and OS layout separately: the physical key layout, the printed legends, and the input layout the customer's operating system uses are three different things; selected models list Russian, Spanish, or Arabic legend options, and
ST12lists multilingual laser-etched legends from 100 sets. - Test the scan: type fast on samples and press several keys together to check rollover against the listed anti-ghosting spec.
Logo, colorway, and packaging are generally customizable from 1,000 units per model (confirm smaller custom runs with us on inquiry), while non-custom ready stock with our existing factory logo has no MOQ when available.
Related Pages
Frequently Asked Questions
What is a keyboard in short?
An input device with keys that you press to send letters, numbers, and commands to a computer.
What is the internal structure of a keyboard?
Keycaps on top, a switch under each key, membrane sheets or a circuit board carrying the key matrix, a controller that scans it, and a case with a cable or a wireless radio and battery.
Is a keyboard input or output?
Input. It only sends information into the computer.
What are the main types of computer keyboards?
By switch structure, the main types are membrane (rubber dome), scissor-switch, mechanical, and Hall-effect magnetic keyboards. Keyboards are also grouped by size, connection, and use.
What do F1 to F12 do?
They are function keys whose actions depend on the operating system and program. Common uses are listed in our guide to keyboard keys.
Standards & Sources
- Computer keyboard — Wikipedia (verified 2026-11-26)
- Input device; Pointing device — Wikipedia (verified 2026-11-26)
- Keycap — Wikipedia (verified 2026-11-25)
- Keyboard technology (section: Rubber dome over membrane) — Wikipedia (verified 2026-11-26)
- Computer keyboard (section: Connection types) — Wikipedia (verified 2026-11-25)
- Hall effect — Wikipedia (verified 2026-11-24)
- Keyboard technology (section: Debouncing) — Wikipedia (verified 2026-11-25)
- USB human interface device class — Wikipedia (verified 2026-11-25)
- Key rollover (section: n-key rollover) — Wikipedia (verified 2026-11-25)
- Membrane keyboard — Wikipedia (verified 2026-11-24)
- Keyboard technology (section: Scissor-switch) — Wikipedia (verified 2026-11-25)