Add M9.8d rebindable engineering controls
SDL-free action/HID-key bindings with conflict validation, a staging editor and a versioned all-or-nothing controls file (ADR-0085). The adapter maps keys through the bindings, releases and drains on rebinding, and captures the chosen key ahead of the toolkit and world. The client adds a Controls panel, key hints, startup loading with a bounded rejection notice, and --controls/--show-controls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3756,3 +3756,44 @@ live WSL dev region showing the wrapped connection notice with its close button.
|
||||
|
||||
Limits unchanged: no physical mouse/keyboard session, DPI or accessibility review;
|
||||
the live screenshot sent no intentions. No Docker/Gitea, packaging or deployment.
|
||||
|
||||
|
||||
## 2026-10-02 — M9.8d rebindable controls (ADR-0085)
|
||||
|
||||
Implemented SDL-free bindings (nine actions, 92 named HID key positions, Escape
|
||||
reserved, modifiers/locks/system keys excluded), a staging editor with conflict
|
||||
refusal, and a versioned all-or-nothing controls file (4096 bytes, printable ASCII,
|
||||
temp-file replace). The adapter maps keys through the bindings, releases and drains
|
||||
on `set_bindings`, and offers binding capture ahead of the toolkit and world. The
|
||||
app adds a Controls panel (launcher and banner), Legend key hints, startup loading
|
||||
with a fixed-text notice on rejection, and `--controls FILE` / `--show-controls`.
|
||||
|
||||
Tests: `client-bindings` (names, defaults, conflicts incl. own secondary, missing
|
||||
primary, reserved/modifier keys, editor refusal leaves draft unchanged, reset,
|
||||
serialize/parse round trip, comments/CRLF/tabs/order, unknown/duplicate/missing
|
||||
actions, bad names, extra tokens, non-ASCII/NUL, size bound, unsupported version,
|
||||
file load/save/replace, unreadable/too large/invalid/missing directory). Lifecycle
|
||||
`rebinding`: rebinding while held releases and drains (new key queued before the
|
||||
change does not act), unbound old key ignored, two keys per action never stick,
|
||||
rebound toggle, capture consumes the key (repeat ignored, toolkit never sees it,
|
||||
rest of batch drained), Escape returned, focus loss and cancel give no key.
|
||||
`client-panels` controls panel: fits viewport, a slot click requests capture for
|
||||
Move left without a world click, chosen key consumed before the toolkit.
|
||||
|
||||
Executed: Windows MSVC client 9/9 and client-network 10/10 (final). Linux: clang-19
|
||||
client-probe with clang-tidy enabled (keep-going; one test finding fixed) CTest
|
||||
13/13; Xvfb/X11 lifecycle and panels; Clang ASan/UBSan CTest 13/13 plus Xvfb
|
||||
lifecycle/panels; GCC 14 client-network CTest 10/10; clang-tidy app main/panels
|
||||
(client-network); repository format check.
|
||||
|
||||
Visual review (dummy driver, software renderer): Controls panel with a custom file
|
||||
(J/L/I/K, F1 + Keypad0) and matching Legend hint; invalid file (missing actions)
|
||||
showing "Saved controls rejected: Move left needs a primary key..." with defaults in
|
||||
use and the file byte-identical afterwards. Review found the startup notice expired
|
||||
immediately (UI clock not yet advanced); fixed. A CRLF parsing defect was found by
|
||||
the new test and fixed. CTest smoke runs create the empty per-user settings
|
||||
directory (SDL creates it on lookup); no controls file is written by tests.
|
||||
|
||||
Not run: interactive rebinding with a physical keyboard, non-US layouts, IME, the
|
||||
Apply/save path end-to-end through the GUI (covered by file and editor tests), DPI,
|
||||
accessibility, Docker/Gitea, packaging or deployment.
|
||||
|
||||
Reference in New Issue
Block a user