feat(web): support held keyboard keys and modifiers

Merged
RU
1mo ago
+98-6
  • Add browser.keyboard.down(key) and up(key) so deterministic test code can hold modifiers across another key or pointer sequence, and exercise repeat behavior. This addresses the keyboard gap in#1020.
  • Use the existing browser operation guard, input-error classification, and runner fixture recording; update public types and migration/test-writing guides.

Verified

Ran it locally: yes.

Ran native Chromium DOM event tests through the actual browser fixture. Verified Shift stays held across KeyB, up releases it, repeated down reports repeat, and a released/reheld key starts a fresh sequence. Public type assertions, all builds/typechecks and full pnpm check pass.

mainthis branch
Regression failsRegression and adjacent tests pass
RUN  v5.0.1 packages/web


 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  10:04:06
   Duration  2.24s (transform 45%, tests 35%, import 20%)

The full repository pnpm check, changed package build, typecheck, and changed TypeScript lint pass. The full repository pnpm check passes on the pinned unchanged base with the complete frozen-lockfile install. Browser and mobile benchmark suites were not run; no live model calls were made.

Also rebuilt the exact frozen commit and passed a real runner/worker/browser product fixture with no model calls. The candidate capability executed through the built SDK and real worker.

Independent review follow-up: The consumer guide explicitly distinguishes down/up held-key lifetime from press, which releases within its call.