a control for when the input state goes wrong

`POST /reset-input` and a "clicks acting wrong?" button in the panel's status
line. It releases every modifier and mouse button the display thinks is held.

Named for the SYMPTOM rather than the mechanism, because nobody experiencing
this knows a modifier is stuck — they know their clicks stopped doing the right
thing.

── both sides, and that ordering matters ──

Releasing on the server alone leaves the panel's own button mask stale and the
next mouse move re-asserts it, so the fix would appear not to work. Local state
is cleared first, a pointer event with an empty mask says so, and only then does
the server let go.

── a fixed list, not a query ──

`xinput --query-state` would report exactly what is held, which is better. It is
also a seventh host binary to declare and to require, for a repair. Releasing a
key that was not pressed is a no-op, so the fixed list costs nothing. Modifiers
and buttons only: a stuck letter types, which is obvious and harmless; a stuck
modifier silently changes what every click means.

── not guarded like the others ──

Every other command refuses while a dialog is open, because its clicks would
fall through onto the board. This one clicks nothing, and refusing a repair in
the state that most needs it would be the wrong way round.

Verified by stranding `Shift_L` on the display with `xdotool keydown`, hitting
the route, and watching `xinput --query-state` go from one key down to none.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Officer-Session: de3ed4e6-f88a-429c-94e6-a760336ba83b
This commit is contained in:
2026-08-24 17:10:14 +00:00
co-authored by Claude Opus 5
parent 02a816c8dc
commit a51c75cc6c
4 changed files with 114 additions and 1 deletions
+16
View File
@@ -69,6 +69,22 @@ Diagnosed by watching `user.reg` grow by 848 bytes at the moment the game exited
time into the key by hand and seeing the game display it, then by switching difficulty and watching a clean
stop write `Width`/`Height`/`Mines` through to disk.
## When the clicks go wrong: "clicks acting wrong?" in the panel
`POST /reset-input`, and a button in the panel's status line. It releases every modifier and mouse button
the display believes is held, and clears the panel's own button mask first — releasing on the server alone
leaves the client stale and the next mouse move re-asserts it.
It exists because synthesised input is STATE, and this side owns it: a press without a matching release
stays pressed on the X server forever, and nothing looks wrong. The panel is connected, the picture
updates, the game responds — it just responds to shift-click instead of click, so the board flags instead
of opening. The panel no longer sends modifiers and releases what it holds on blur, so this should never
be needed; "should never be needed" is why it wants a button rather than a note, because when it IS needed
the symptom names nothing and the only other cure is restarting the session and losing the game.
Unlike the other commands it is NOT refused while a dialog is open — refusing a repair in the state that
most needs it would be the wrong way round.
## Two gaps, both from having no window manager
Worth knowing before you conclude something is broken. Neither is hard to fix; neither is fixed.