Skip to main content

Keyboard driver

mechanical keyboard at three-quarter angle shown with a few keycaps removed to show switches

The Windows keyboard stack translates HID reports and scan codes into input events through components including kbdhid.sys and i8042prt.sys.

At a Glance

Hardware Familyinput devices
Categorykeyboard
OSwin11, win10
VendorsLogitech, Razer, Corsair

Hardware identification

tight crop on 6 keys with one switch exposed

tight crop on 6 keys with one switch exposed

Reference overview

The device role, software boundary, and compatibility concepts covered on this page.

Device class

A keyboard driver belongs to the Keyboard hardware category. Examples are associated with Logitech, Razer, Corsair hardware.

What it controls

The Windows keyboard stack translates HID reports and scan codes into input events through components including kbdhid.sys and i8042prt.sys.

Topics in this reference

  • • Hardware and operating-system boundary
  • • Protocols and component architecture
  • • Observable device states
  • • Platform compatibility terminology

What this driver does

A keyboard driver sits between the physical keys and every application that expects text or shortcuts. When you press a key, the keyboard's onboard microcontroller detects which switch closed on the key matrix, applies debounce timing so a single press is not read as several, and sends a HID (Human Interface Device) report over USB. The driver receives that report, maps the raw usage code to a Windows scan code, and passes it up through the Win32k input subsystem to the focused window. On contemporary Windows PCs the keyboard work is shared by a small stack of system components. Hidusb.sys and hidclass.sys handle the raw USB HID transport, kbdhid.sys translates HID keyboard usages into scan codes, and kbdclass.sys presents a single unified keyboard to the rest of Windows. A layout DLL such as kbdus.dll or kbduk.dll then decides which character each scan code produces, which is why the same physical key can type a hash or a pound sign depending on the selected layout. Legacy and laptop internal keyboards often still speak PS/2 through the 8042-style controller, driven by i8042prt.sys. That path matters because it works before Windows fully loads, letting you enter the BIOS or UEFI firmware, choose a boot device, or reach Safe Mode when the USB stack has not yet initialised. Understanding which path your keyboard uses tells you where to look when only some keys, or only certain boot screens, misbehave. Features like N-key rollover (NKRO), which lets the board report many simultaneous keys without ghosting, media keys, and per-key backlighting are exposed through additional HID collections or a vendor filter driver. The core typing function keeps working on the generic Microsoft driver, but macros, on-the-fly DPI-style profile switching and RGB effects usually need the manufacturer's own software running alongside the class driver.

Close-up view of keyboard driver hardware and its main physical components
Keyboard driver connected wirelessly and physically to typical peripherals in its ecosystem

Observable states associated with this device class

These states describe how hardware, firmware, operating-system services, and a driver can interact. They do not identify a cause on their own.

  • A single key press registers twice or repeats without being held, pointing at a debounce or HID report fault
  • Certain keys such as the media row, Fn combinations or backlight controls do nothing while ordinary letters work
  • The keyboard works in the UEFI firmware setup but stops responding once the Windows desktop loads
  • Device Manager shows the keyboard with a yellow triangle and an error code such as 10, 43 or 28
  • The internal laptop keyboard is unresponsive after waking from sleep until the machine is fully rebooted
  • N-key rollover fails so pressing several gaming keys at once causes ghosting or dropped inputs

How it works in a real system

Drivers operate in the background as translators. This setup shows the software, connection, and physical hardware that the Keyboard driver supports.

A real-world keyboard driver setup with its supporting software and hardware

Compatibility model

Driver compatibility is defined by the device hardware identifier, the operating-system driver model, processor architecture, and the interfaces implemented by the hardware or firmware. A shared device class does not imply that packages from different manufacturers are interchangeable.

Vendor Comparison
Operating-system contextArchitecture notes
Windows 11The Windows 11 driver model is primarily 64-bit. Actual compatibility depends on the device hardware ID, processor architecture, firmware interface, and package signature.
Windows 10Windows 10 exists in multiple releases and architectures. Actual compatibility depends on the device hardware ID, Windows release, processor architecture, and package signature.