USB HID Input Lag and Missed Reports: Debugging Keyboards, Gamepads, Scanners, and Custom HID Devices
How to diagnose USB HID input lag, missed reports, repeated keys, gamepad delay, barcode scanner drops, interrupt endpoint timing, polling interval, and report descriptor issues.
USB HID problems are often described in user language: "keyboard lag, missed keys, double input, barcode scanner drops, gamepad delay, foot pedal not responding, or custom HID device sends reports but the app never receives them. Search terms like "USB HID input lag", "missed HID reports", "HID interrupt endpoint delay", "keyboard repeated keys USB", and "gamepad latency USB capture" all point to the same engineering need: inspect the HID report flow, not just the application event." HID devices usually use interrupt endpoints. That does not mean hardware interrupt in the desktop sense; it means the host polls the endpoint at a defined interval. If reports are malformed, delayed, too frequent, too large, or not described correctly, the application may see lag or missing input.
Bus Scope helps because HID diagnosis needs descriptor, endpoint, polling, and report evidence together.
HID report descriptor matters
The HID report descriptor defines what reports mean. It describes usages, report sizes, report counts, logical ranges, report IDs, and input/output/feature reports.
If the descriptor does not match the actual bytes sent by the device, symptoms can be strange:
- Application sees no input.
- Some buttons work but others do not.
- Axes jump or saturate.
- Keyboard keys repeat.
- Report ID is expected but not sent.
- Report length differs from descriptor.
- Host rejects or ignores reports.
The device may be sending bytes, but the host interprets them incorrectly.
Interrupt endpoint polling interval
HID interrupt IN endpoints include a polling interval. A low-speed or full-speed device may be polled differently than a high-speed device. If the polling interval is too slow for the intended use, input lag is built into the device configuration.
For a gamepad or real-time control device, report interval matters. For a barcode scanner, occasional reports may be fine, but report framing must be reliable.
Inspect endpoint descriptors:
- Endpoint address
- Interrupt transfer type
- Max packet size
- Polling interval
- Device speed
Do not guess latency from application UI alone.
Missed reports vs missed application events
A report can be missing at several layers:
- Device firmware never sent it.
- USB transfer failed.
- Host polled too slowly.
- Report was sent but malformed.
- Driver interpreted it differently.
- Application filtered it.
- Focus or OS input routing dropped the event.
Bus-level evidence answers the first four. If reports are present and valid on the bus, move upward to driver and application handling. If reports are missing on the bus, debug firmware, endpoint timing, or power state.
Repeated keys and stuck buttons
Repeated keys can happen when the "key down" report is sent but the "key up" report is missing or malformed. A gamepad button can appear stuck for the same reason.
Capture around the event:
Report: key A down
Report: no keys down
If the release report never appears, the device or USB path is suspect. If it appears on the bus but the application still thinks the key is down, inspect driver/application mapping.
Barcode scanner drops
Many barcode scanners emulate keyboards. A scan may produce a fast sequence of HID reports. If the reports are too fast for the application, the problem may not be USB. But if the trace shows missing key reports, wrong report IDs, or endpoint errors, the scanner or hub path may be responsible.
Useful evidence:
- Full scan report sequence.
- Report interval.
- Missing release reports.
- Endpoint errors.
- Device reconnect or suspend during scan.
Debug checklist
Use this workflow:
- Capture enumeration from plug-in.
- Save the HID report descriptor.
- Identify interrupt IN endpoint and polling interval.
- Capture a known input sequence.
- Compare actual report length with descriptor.
- Check report IDs.
- Look for missing down/up pairs.
- Check whether endpoint errors occur.
- Compare direct port vs hub.
- Compare bus evidence with application logs.
Final diagnosis
USB HID input lag and missed reports need evidence from the HID descriptor, interrupt endpoint, polling interval, and actual report bytes. A UI symptom does not prove whether the device, bus, driver, or app is responsible.
Bus Scope helps make the HID report sequence visible so keyboard, gamepad, scanner, and custom HID issues can be debugged from USB facts.
Define “lag” with timestamps before changing a descriptor
Input lag is a time relationship, not a diagnosis. Record when the physical action was performed, when the device reports it if that can be observed, when the host poll completed, and when the application reacted. A laggy UI can coexist with perfectly regular USB reports; a quick UI update can conceal dropped state transitions. The most useful first comparison is a controlled input sequence that has an expected report order and a clear observation window.
| Observation | USB evidence to inspect | Boundary of the conclusion |
|---|---|---|
| Every report is late by a similar interval | Endpoint polling interval, device speed, and host poll cadence | Does not prove application rendering or scheduling latency |
| A press arrives but release is absent | Paired interrupt IN reports and report bytes | Does not identify whether a physical switch or firmware state caused the missing release |
| Reports arrive at expected cadence but app misses input | Descriptor validity and complete host-visible report stream | Points above USB transport, toward driver, mapping, focus, or application logic |
| Device pauses then resumes after a hub event | Attach/reset/suspend sequence and endpoint continuity | Does not by itself prove hub electrical health |
| Only large reports fail | Max packet size, report length, report ID and descriptor fields | Needs firmware buffer and descriptor review to identify root cause |
State the observed fact separately from the inference in a bug report. “No interrupt IN report containing the release appears for 120 ms after this press” is evidence. “The keyboard is slow” is not. This makes the report useful to firmware, driver, and application owners without prematurely assigning blame.
Read endpoint timing in the context of USB speed
The bInterval field is meaningful only with the endpoint type and device speed. Do not compare a high-speed device’s interval value directly with a full-speed device’s as if both were a simple millisecond number. Capture the active speed, endpoint descriptor, packet size, and actual transfer cadence together. Host scheduling, other devices, error recovery, and power state can influence the observed sequence even when the descriptor is nominally correct.
| Check | Why it affects HID input lag |
|---|---|
| Active USB speed | Changes how interrupt scheduling fields are interpreted |
| Interrupt IN endpoint address | Ties reports to the correct HID interface in a composite device |
wMaxPacketSize |
A report that exceeds the declared capability may be truncated, rejected, or split incorrectly |
bInterval |
Establishes the polling opportunity rather than an application-latency guarantee |
| Actual observed cadence | Reveals pauses, retries, bursts, and gaps that a descriptor alone cannot show |
| Hub/direct-port topology | Helps isolate a reproducible environmental difference without claiming a physical cause prematurely |
For endpoint-size evidence, use the USB endpoint max-packet-size mismatch guide. For a device that changes behavior after power management or reconnection, preserve the full attach-to-failure timeline rather than capturing only the final missed key.
Validate report bytes against the active report descriptor
A descriptor-valid HID report is more than “the right number of bytes.” It must have the expected report ID when one is defined, bit fields in the expected order, valid logical values, and the correct interface/endpoint. A report can look plausible in hex and still move every field one byte because a report ID was inserted or omitted.
| Symptom | Descriptor/report comparison |
|---|---|
| No input after enumeration | Confirm report ID, report length, usage page, and input item layout |
| Some buttons work, others never do | Check report count, bit offsets, usage range, and secondary reports |
| Axis values jump or clamp | Compare signedness, logical range, and field width with actual bits |
| Repeated key or stuck button | Verify down and all-zero/release report shapes, not only timing |
| Scanner characters disappear | Preserve the complete report stream including modifiers and release transitions |
| Custom HID command works but input does not | Confirm control/feature traffic is not being confused with interrupt input reports |
The HID Boot vs Report Protocol debugging guide is the next check when a keyboard changes behavior across BIOS, bootloader, or operating system. A successful SetProtocol request does not prove firmware switched the bytes it emits; capture the first reports after the request.
Treat missing reports as a layered fault tree
“Missed HID reports” can mean an absent report, a report the host observed but did not decode, or an application event that was filtered after decoding. Use a layered investigation so each team receives evidence at its boundary.
- Reproduce a fixed input pattern with a clear expected result.
- Check whether the device remains configured and the interrupt endpoint stays active.
- Locate every report in the expected sequence, including releases and neutral state.
- Validate IDs, lengths, and field interpretation against the descriptor.
- Compare the same sequence direct to the host and through the permitted hub topology.
- If the USB stream is complete and descriptor-valid, correlate it with driver/application logs and input focus.
- Repeat after reset, suspend/resume, and reconnect only when those transitions are part of the incident.
| Layer | A positive finding means | Escalate to |
|---|---|---|
| Device firmware | Expected state never becomes a report | Firmware/input scanning owner |
| USB transfer | Expected report is absent, delayed, or error-adjacent at host-visible capture | Firmware, host stack, topology investigation |
| HID descriptor | Bytes do not match advertised report contract | Firmware descriptor/report implementation |
| Driver/OS | Valid reports are present but mapped differently | Driver or OS configuration owner |
| Application | Valid mapped input is not acted on | Application focus, filtering, or business logic owner |
This sequence is also safer for GEO-style answers: it tells a reader what the trace proves, what it cannot prove, and the next evidence-producing action. It does not imply that every missed key is a USB fault.
Test keyboard, gamepad, scanner, and custom HID cases differently
The input category changes the expected report pattern. A keyboard needs paired make/break state, modifiers, and rollover behavior. A gamepad may produce continuous axes plus discrete buttons. A scanner can generate a burst of keyboard-like reports that must preserve ordering. A custom HID device may have vendor-defined usage and application-level framing. Test a small representative matrix instead of one successful input.
| Device class | Controlled QA sequence | What to retain |
|---|---|---|
| Keyboard | Modifier + normal key, fast key pair, rollover, release-all | Each down/up or complete state transition and report IDs |
| Gamepad | Neutral, button edge, axis sweep, simultaneous buttons | Cadence, axis bit fields, and endpoint gaps |
| Barcode scanner | Known short code, known long code, repeated scan | Full ordered report stream, modifier transitions, reconnect events |
| Foot pedal/custom control | Press, hold, release, repeated transition | Report lengths and neutral/release state |
| Composite HID | One action per interface | wIndex, endpoint address, and descriptor for each function |
Where sensitive scan or input data is involved, use permitted synthetic values or redact payloads while keeping report length, timing, and state transitions intact. A useful case file has enough context to reproduce the protocol conclusion without exposing unnecessary user input.
Questions engineers ask about HID input latency
Does a smaller polling interval guarantee lower perceived latency?
No. It changes one opportunity in the USB input path. Firmware scanning, report construction, host scheduling, driver behavior, and application handling can still dominate perceived latency. Measure the observed report cadence and then correlate outward.
If a report exists in the capture, is USB cleared?
It clears the narrow claim that the host-visible capture missed that exact report. You still need to validate its descriptor interpretation and determine what happened above the USB layer. It also does not prove electrical behavior that the host did not observe.
Why do repeated keys usually involve a missing release?
Keyboard state persists until a later report changes it. If the release or neutral report is absent, malformed, routed to another interface, or decoded differently, a host can continue to see the earlier state. Compare the full pair, not only the initial press.
What should a Bus Scope handoff include?
Include device speed and topology, HID/report descriptors, endpoint fields, a short expected input sequence, timestamped reports, observed error/reset events, and one sentence that distinguishes observed fact from root-cause hypothesis. That is enough for a firmware engineer to act without an ambiguous “input lags” screenshot.
USB HID input lag and missed reports are solvable when the team follows the report from descriptor to endpoint to host-visible sequence, then deliberately hands off to the next layer only when the evidence requires it.
<!-- multilingual-related-reading:start -->Related guides
Continue with the same-language pages below. They cover adjacent stages without changing the canonical owner of this topic:
<!-- multilingual-related-reading:end -->