Files
reims-vgpu/crates
Anees IqbalandClaude Opus 5 1612107829 Tell the operator how to release the keyboard grab
The release chord existed only as source comments and a `pub const` nothing
read. An operator whose desktop shortcuts had just stopped working had no way
to learn the way out short of reading this crate — and reading it is something
you need a working desktop to do. A grab with an undiscoverable escape hatch is
a grab you cannot get out of.

Component: crates/reims-vgpu/src/host_window, README.
No guest-visible behavior changes: the recogniser, the state machine and the
capture mechanisms are untouched. This is what the operator is told, and where.

Three places, one source of truth:

- stderr, once, at the moment capture first engages — the instant the operator's
  own shortcuts stop working.
- the always-on census line, which now reads
  `window_capture_engaged mechanism=<m> release=Ctrl+Alt+Esc`.
- README, under the x86 boot instructions, with the per-host coverage table and
  the note that the guest's own Cmd+Option+Esc is forwarded rather than caught.

Both runtime messages read `keyboard::UNGRAB_CHORD`, the constant the recogniser
is written against, rather than spelling the chord again.

`the_advertised_chord_is_the_one_that_releases` splits `UNGRAB_CHORD` on `+`,
maps each named part to an evdev code, drives the recogniser with exactly those
keys, and asserts the grab releases. It fails if the advertised string and the
recogniser ever disagree — the failure mode being an operator holding a captured
keyboard while following printed instructions that do not release it. A test
rather than a `const` assertion because the relation runs through a `match` on a
windowing type that cannot be evaluated in a `const`.

Verification: `host_window::keyboard` 15 tests (14 + the new one). Full
reims-vgpu suite serially on backend-vulkan,host-window: 2247 lib + 93
integration, 0 failed. `cargo fmt --all -- --check` clean. Clippy `-D warnings`
clean on all three required arms plus aarch64-apple-darwin/backend-vulkan,
host-window.

Not verified: no VM boot was run for this commit. The stderr line and the census
field are emitted from the same first-engage branch that boot 1 exercised, but
neither string has been read off a live boot, and capture does not arm in an
unattended boot because nothing focuses the window.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USFNnwBSxQBohnC19FZjLT
2026-08-29 16:54:11 +03:00
..