/computer-peripherals-design-and-standards:periph-buses-pcie-hid-keyboards-mice-and-displaysfrom computer-peripherals-design-and-standards
Reference covering embedded buses (I2C, SPI, UART), PCIe peripherals, HID descriptors, keyboards (matrix scanning, debounce, rollover), mice (sensors, polling rates), and display interfaces.
Ships in computer-peripherals-design-and-standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Part 2 of 6 of the Computer Peripherals: Design, Building, Standards and Programming reference (plugin
computer-peripherals-design-and-standards), covering §6–§11. Sibling skills:periph-stack-usb-thunderbolt-and-wireless(§0–§5),periph-audio-printers-storage-controllers-and-haptics(§12–§15),periph-designing-firmware-pcb-and-debugging(§16–§21),periph-compliance-accessibility-and-security(§22–§24),periph-reference(§25–§30). Section numbers are shared across the set; a reference written as §N →skillpoints into that sibling skill.Currency: The protocols are stable and long-lived. Two areas are moving. See §25 →
periph-referencefor USB bandwidth and labelling, and display interface bandwidth tiers.
⚠️ The layer where a computer meets the physical world — and the one where standards politics, signal integrity, human factors and firmware all collide at once.
Complements a computer-hardware reference (the host side), an electromagnetism reference (signal integrity, differential pairs, EMC), and a semiconductor reference (the microcontrollers involved).
⚠️ GOTCHA boxes mark where the marketing name and the actual capability diverge — and this domain has the worst naming in computing.
The three ideas that organize this document:
- ⚠️ THE CONNECTOR IS NOT THE PROTOCOL (§2 →
periph-stack-usb-thunderbolt-and-wireless, §3 →periph-stack-usb-thunderbolt-and-wireless, §25.1 →periph-reference). A USB-C port can be anything from 480 Mbps and 5 W to 80 Gbps and 240 W with video and PCIe tunnelling. Identical-looking ports and cables behave completely differently, and this single confusion causes more peripheral problems than any technical failure.- ⚠️ DESCRIPTORS ARE THE INTERFACE (§8, §19 →
periph-designing-firmware-pcb-and-debugging). A USB device declares what it is by handing over a data structure at enumeration. Almost all "device not recognized" problems are descriptor problems, and once you can read descriptors you can debug nearly anything.- ⚠️ LATENCY IS A CHAIN, AND PEOPLE OPTIMIZE THE WRONG LINK (§9, §21 →
periph-designing-firmware-pcb-and-debugging). Polling rate, debounce, USB scheduling, OS input stack, render queue and display scanout all add up. Buying an 8 kHz mouse while running a 60 Hz display optimizes a link that wasn't the problem.
⚠️ For building peripherals rather than connecting them.
⚠️ I²C ⚠️ two wires, addressed, multi-drop, open-drain with
pull-ups. ⚠️ Slow (100k/400k/1M), and ⚠️ ADDRESS COLLISIONS
between chips are a classic design trap
⚠️ SPI ⚠️ four wires, fast, full duplex, ⚠️ no addressing — one
chip-select line PER DEVICE. Displays, sensors, flash
⚠️ UART / serial ⚠️ no clock, both ends must agree on baud rate.
⚠️ Still the universal debug interface
⚠️ 1-Wire, CAN (automotive/industrial), RS-485 (long runs,
differential, multi-drop)
⚠️ ⚠️ PS/2 IS INTERRUPT-DRIVEN, not polled — ⚠️ which is why it had
genuinely lower latency than early USB and why it persists in
niche uses
⚠️ GPIO, ADC, PWM, and interrupt handling are the primitives
everything else is built from
⚠️ Where bandwidth or latency demands exceed USB: ⚠️ GPUs, capture cards, NICs,
NVMe, professional audio interfaces.
⚠️ The architecture: ⚠️ BARs (base address registers) map device memory into the
host address space, MSI/MSI-X for interrupts, DMA for bulk movement, and configuration
space for enumeration.
⚠️ Option ROMs and UEFI drivers allow a device to participate in boot.
⚠️ The advantage over USB is DMA — ⚠️ the device writes directly to host memory
rather than being polled — which is also exactly why PCIe devices are a security concern
and why the IOMMU exists (§24 → periph-compliance-accessibility-and-security).
⚠️ The protocol that makes input devices interoperable, and the one worth understanding in detail because it is where custom peripherals live.
⚠️ THE MODEL ⚠️ a device describes its own data format using a
REPORT DESCRIPTOR — a binary structure of usage pages, usages,
logical minimums and maximums, report sizes and counts
⚠️ THE HOST PARSES IT AND ADAPTS. ⚠️ This is why a device with
an unusual control set works without a driver
⚠️ USAGE TABLES standardized numbers for "X axis", "left button",
"volume up". ⚠️ Getting the usage right is what makes the OS
treat your device as the correct KIND of device
⚠️ REPORTS ⚠️ INPUT (device→host) · OUTPUT (host→device, e.g.
LEDs) · FEATURE (bidirectional configuration)
⚠️ Report IDs multiplex several report types on one endpoint
⚠️ BOOT PROTOCOL ⚠️ a fixed simplified format for keyboards and
mice so the BIOS can use them before any HID parser exists.
⚠️ THIS IS WHY 6KRO EXISTS — the boot keyboard report has six
key slots (§9)
⚠️ ⚠️ THE POWER OF THE MODEL: you can invent a device the OS has
never seen, and if your descriptor is correct it works
everywhere with no driver. ⚠️ You can also write a
syntactically valid descriptor that describes something
nonsensical, and the failure is silent (§19)
⚠️ HID OVER I²C and HID OVER GATT extend the same model to
internal and Bluetooth devices
⚠️ SWITCH TYPES ⚠️ mechanical (linear / tactile / clicky) ·
membrane / rubber dome · scissor · ⚠️ optical and Hall-effect
(⚠️ contactless, enabling ADJUSTABLE ACTUATION POINT and
rapid trigger)
⚠️ THE MATRIX ⚠️ rows and columns scanned to reduce pin count
⚠️ ⚠️ GHOSTING AND BLOCKING ⚠️ without isolation diodes, three
keys in a rectangle make a phantom fourth appear.
⚠️ A DIODE PER SWITCH gives full NKRO. ⚠️ "Anti-ghosting" in
marketing usually means BLOCKING (refusing the ambiguous
input) rather than true NKRO
⚠️ ⚠️ 6KRO vs NKRO ⚠️ 6KRO is not a hardware limit — it's the HID
BOOT PROTOCOL report format (§8). ⚠️ NKRO requires a custom
descriptor, which is why some NKRO keyboards fail in BIOS
and offer a toggle
⚠️ DEBOUNCE ⚠️ mechanical contacts bounce for milliseconds.
⚠️ Debounce algorithm and window are a REAL latency
contributor and a real design trade — too short gives double
presses, too long adds delay
⚠️ SCAN RATE and USB POLLING are separate: ⚠️ a fast matrix scan
gains nothing if the endpoint is polled at 125 Hz (§21)
⚠️ LAYOUT and PROFILE ⚠️ ANSI/ISO/JIS · Cherry, OEM, SA, DSA
keycap profiles · ⚠️ MX vs Topre vs low-profile stems
⚠️ PCB, PLATE, MOUNTING ⚠️ gasket, top, tray, integrated —
these determine acoustics and flex, which is most of what
enthusiasts actually care about
⚠️ Sensors: ⚠️ optical (LED or laser) taking thousands of surface images per second and correlating them; ⚠️ the specs that matter are max tracking speed, max acceleration, and lift-off distance.
⚠️ GOTCHA — DPI IS A MARKETING NUMBER PAST A POINT. ⚠️ Very high DPI settings are frequently interpolated rather than native, and no one uses 30,000 DPI. ⚠️ What matters is sensor accuracy — absence of smoothing, acceleration and angle snapping — which cheap sensors add to hide their deficiencies.
⚠️ Polling rate: ⚠️ 125/500/1000 Hz and now 4/8 kHz; ⚠️ the returns diminish sharply
and high rates cost CPU and battery (§21 → periph-designing-firmware-pcb-and-debugging).
⚠️ Switches are the wear item — ⚠️ DOUBLE-CLICKING from switch degradation is the
characteristic failure mode of otherwise-good mice, and is repairable.
⚠️ Other pointing devices: ⚠️ trackballs, trackpads (⚠️ capacitive multitouch with
substantial gesture processing in firmware or driver), graphics tablets (⚠️ EMR — the
pen is passive and powered by the tablet's field), and touchscreens.
⚠️ PANEL TECHNOLOGIES ⚠️ TN (fast, poor angles) · IPS (colour,
angles) · VA (contrast, slower transitions) · ⚠️ OLED /
QD-OLED (per-pixel emission, true blacks, ⚠️ burn-in risk) ·
miniLED backlights with local dimming
⚠️ THE SPECS THAT ARE ROUTINELY MISREPRESENTED
⚠️ RESPONSE TIME ⚠️ quoted as best-case GtG with overdrive
that causes INVERSE GHOSTING. Independent measurement is
the only reliable source
⚠️ CONTRAST ⚠️ "dynamic" figures are meaningless; native
contrast is the real number
⚠️ HDR ⚠️ the lower certification tiers are near-meaningless
on a display without local dimming
⚠️ REFRESH RATE ⚠️ a panel's rate and the INTERFACE bandwidth
needed to feed it are different problems (§25.2)
⚠️ VARIABLE REFRESH ⚠️ adaptive sync — the display refreshes when
the frame is ready rather than on a fixed clock. ⚠️ The
REFRESH RANGE and whether LFC (low framerate compensation)
exists matter more than the badge
⚠️ ⚠️ DSC (Display Stream Compression) ⚠️ visually lossless,
hardware, ~3:1, microsecond latency — ⚠️ NOT streaming-style
compression. ⚠️ It is how high modes fit in limited pipes,
and it is genuinely fine, with the caveats in §25.2
⚠️ COLOUR gamut (sRGB/DCI-P3/Rec.2020) · bit depth and ⚠️ FRC
dithering ("10-bit" often means 8-bit+FRC) · calibration
and ICC profiles · EDID/DisplayID as the display's descriptor
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
embedded-buses, hid, keyboards, mice, display-interfaces, pcie
6 skills in this plugin
/periph-audio-printers-storage-controllers-and-hapticsUse for the remaining device classes: audio interfaces including latency, buffer sizes and the class-compliant path, printers and scanners with their page description languages, storage, capture and the miscellaneous device classes, and game controllers and haptics including force feedback and rumble./periph-compliance-accessibility-and-securityUse before shipping a peripheral or assessing one: compliance and certification including USB-IF, CE, FCC and the logo programmes, accessibility and the design decisions that include or exclude users, and peripheral security — malicious devices, BadUSB-class attacks, DMA exposure and firmware update integrity./periph-designing-firmware-pcb-and-debuggingUse when building your own peripheral: designing a custom peripheral from requirements to bill of materials, firmware including the USB stack choices, PCB and mechanical design, enumeration and debugging when a device will not appear or misbehaves, drivers and OS integration across Windows, macOS and Linux, and measuring latency properly rather than trusting a spec sheet./periph-referenceUse when correcting a peripheral misconception, looking up a bandwidth, power, polling-rate or latency figure, finding the sources, or needing a quick-reference picker — plus the current state of USB bandwidth and labelling and display interface bandwidth tiers. Companion to the other peripherals skills./periph-stack-usb-thunderbolt-and-wirelessUse when working out how a peripheral actually connects: the peripheral stack from physical layer to application, USB architecture with descriptors, endpoints and transfer types, USB-C and Power Delivery including the cable and role negotiation mess, Thunderbolt and alternate modes, and wireless peripherals and their latency and pairing trade-offs. Includes the router for the whole peripherals reference.npx claudepluginhub the-vibey-project/vibey --plugin computer-peripherals-design-and-standards