Why this is a big deal
As of Chrome 158 (stable scheduled November 17, 2026), the WebHID API is now available on Android—so long as the device runs Android 17 (API level 37) or newer. That means the same high-fidelity hardware integrations web apps already enjoyed on desktop can now run on phones and tablets, too. Web apps can request access to Human Interface Devices over USB and Bluetooth, exchange input/output/feature reports, and inspect report descriptors—all with a user-mediated chooser dialog. WebView isn’t supported. [1]
Chrome’s enterprise release notes also flag that mobile WebHID is rolling out gradually in Chrome 158, so expect a staged rollout and be ready to check for support at runtime. [2]
A reality check: keyboards and the WebHID blocklist
For safety, Chrome blocks access to top-level HID collections with protected usages—like standard keyboards and mice—to prevent keylogging. In practice, that means you can’t read raw HID key events from a typical keyboard’s primary interface, even on Android. But there’s good news: many modern peripherals expose vendor-defined or auxiliary HID collections (for configuration, lighting, macros, diagnostics) that WebHID can open. Those “side channels” are exactly what vendor web tools (e.g., browser-based peripheral managers) use today. [3][7]
Bottom line for typing sites: use WebHID where the device exposes a non-protected collection you can legally talk to; otherwise, for true per-key hardware timing, consider a small helper device (see “Mobile Rig,” below). Some community testers also remind users that browsers can’t measure scan rate or polling rate from OS-level key events alone—that’s precisely where WebHID (or hardware) helps. [9]
What you can measure on mobile now
- Per-report timing and actual report rate: If the keyboard (or an inline dongle) exposes a vendor-defined HID interface that streams state or timing data, you can timestamp each incoming report to compute the effective polling/report rate and jitter. USB HID devices typically use interrupt transfers with 1 ms polling intervals at full speed (1,000 Hz); you’ll see the real timing your device achieves in practice. [6]
- Bluetooth vs USB-OTG: With Android 17+ and Chrome 158, you can compare connection types on the same phone. BLE HID (HOGP) enforces a negotiated connection interval; the spec allows minima like 7.5 ms, but many devices operate at 7.5–15 ms when active, and may lengthen intervals to save power when idle. That translates into higher and more variable latency than wired. [4] Large independent test labs also note Bluetooth’s higher latency versus wired or 2.4 GHz receivers, with Bluetooth often restricted to lower effective polling rates. [5]
- Feature/LED round-trip times: Even when keyboards’ main input collections are blocked, you can often send feature or output reports (e.g., LED or backlight toggles) on unprotected interfaces and time the acknowledgment. This is a handy proxy for host-to-device latency on mobile. [3]
The ‘Mobile Rig’: a pocketable, hardware-in-the-loop setup
To unlock true per-key latency, rollover validation, and scan-rate jitter on any connection type, pair your web app with a tiny helper MCU that timestamps electrical events and streams results to your site over WebHID. One popular approach uses a low-cost RP2040 board wired to the switch under test; the firmware exposes a WebHID interface that your page reads directly—no native app. Projects like YG-RP2040-Latency-Tester demonstrate this pattern and already work in Chrome on desktop; they now work in Chrome on Android, too. [8]
Recommended parts and tips:
- USB-C OTG hub with power delivery. Many RGB boards draw >500 mA; power your hub so your phone doesn’t brown out. A powered hub also keeps BLE receivers stable if you A/B 2.4 GHz vs Bluetooth.
- RP2040 latency probe. Wire a GPIO to the key’s switch leg and a second line to drive an LED (for display response tests) if you’re expanding later; expose timestamps via a simple vendor-defined HID interface. [8]
- Short, known-good USB cables. Keep the wiring consistent when you swap between Bluetooth and USB so only the transport changes.
Methodology that travels:
- Same phone/tablet, same keyboard, same switch, same key cap—change only the connection (USB-OTG vs Bluetooth).
- Warm the Bluetooth link (tap a key every second for ~10 seconds) to avoid idle interval expansion before measurement. [4]
- Capture 200–500 presses per condition. Plot histograms of press-to-report deltas and compute P50/P95 and long-tail outliers.
Sample code: feature-report ping and report-rate probe
```js
// Minimal runtime feature detection (works on Android Chrome 158+ with Android 17+)
if (!('hid' in navigator)) {
console.log('WebHID not supported yet. Update Chrome/Android.');
}
// Ask for a vendor-defined HID interface (adjust filters to your device)
const [device] = await navigator.hid.requestDevice({
filters: [{ vendorId: 0x1209 / example /, usagePage: 0xFF00 }]
});
await device.open();
// 1) Measure round-trip time for a feature report
const t0 = performance.now();
await device.sendFeatureReport(1, new Uint8Array([0x01]));
await device.receiveFeatureReport(1); // device echoes or acks
const rttMs = performance.now() - t0;
// 2) Measure incoming report cadence (effective polling/report rate)
let last = performance.now();
const deltas = [];
device.addEventListener('inputreport', e => {
const now = performance.now();
deltas.push(now - last);
last = now;
});
```
Note: You’ll only see `inputreport` events if the device actually emits them on an unprotected collection your page has opened. Standard keyboard top-level collections remain blocked. [3]
Practical dashboards that work on desktop and Android
Design your pages as if you’re on mobile:
- One chooser, many transports. Present a single “Connect device” button; show both USB and Bluetooth endpoints when available. The API surface is the same across desktop and Android. [1]
- Report-level plots. Favor on-device histograms (P50/P95/Max, inter-report jitter) and A/B diff charts over gigantic time series; they’re easier to read on phones.
- Connection-aware UI. Label tests explicitly: “USB-OTG (1000 Hz target)” vs “Bluetooth (7.5–15 ms interval target).” Users immediately understand why Bluetooth looks bursty and slower. [4][5]
- Enterprise-friendly. If you support labs/classrooms, Chrome policies can pre-grant WebHID to trusted origins—now including Android since Chrome 155—so techs don’t have to approve devices one by one. Look at DefaultWebHidGuardSetting and the WebHidAllow* policies. [10]
Caveats and limitations
- OS requirements. WebHID on Android requires Android 17+ and Chrome 158+. WebView is not supported; test in full Chrome. [1]
- Gradual rollout. Some users may not see `navigator.hid` on day one of Chrome 158; stage your feature detection and provide fallbacks. [2]
- Keyboard privacy guardrails. You cannot read standard keyboard keystrokes via WebHID; stick to vendor-defined interfaces or use a hardware probe for key-level latency and rollover. [3][9]
- BLE variability. Bluetooth adds scheduling latency via its connection interval and may increase intervals when idle; wired USB remains the gold standard for low, consistent latency. [4][5]
Where this heads next
Mobile WebHID unlocks serious, repeatable testing on devices people already carry. Expect more browser-based configurators from big brands (already shipping on desktop) and richer, hardware-aware typing diagnostics that work anywhere—desktop rigs, Chromebooks, and now phones and tablets. For typing sites, it’s time to ship: bundle a “Mobile Rig” guide, expose cross-platform dashboards, and make it trivially easy to compare Bluetooth vs USB-OTG in the real world.
—
References: [1] Chrome 158 Release Notes (ChromeStatus); [2] Chrome Enterprise Release Notes; [3] WebHID docs (developer.chrome.com) on protected usages; [4] Bluetooth HOGP v1.2 guidance on connection intervals; [5] RTINGS keyboard latency/connection notes; [6] CHI 2019 paper on USB HID and polling; [7] PC Gamer coverage of browser-based device managers using WebHID; [8] RP2040 WebHID latency tester; [9] Device-level HID lab notes about Chrome blocking standard keyboards.