runtime: the first-run UI keyboard pad reads keys only with focus (RT-FIRST-RUN-PAD-FOCUS) #1612
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1612
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1612/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Tyrannys on GitHub · 2026-11-25 05:54 UTC · original
Tyrannys:first-run-pad-focus→main· +6 −3 · 4 files · 2 commits · merged 2026-11-25 19:30 UTCClaimed in the coordination issue as: RT-FIRST-RUN-PAD-FOCUS (#1608)
What and why
gta6rt --first-run-uisetLEONIDA_KEYBOARD_PAD=alwaysas part of its profile (configure_first_run_uiinruntime/src/main.cpp). In that mode the keyboard pad reads the physical keyboard whatever has focus, so keys typed into another program reach the title. On a first-run consent page an Enter could tick a box in the user's name. This is hazard 1 of #1552.The profile now uses the focused mode
1. Keys count only while the title window has focus. Scripted presses (LEONIDA_INPUT_SCRIPT) still run while the window is unfocused (runtime/shims/gameinput.cpp, theactivegate in the pad poll). If the caller setsLEONIDA_KEYBOARD_PADexplicitly, that setting still wins.runtime/src/main.cpp: change the default fromalwaysto1.runtime/test/fixtures/tiny_game.cpp: the first-run branch checks thatLEONIDA_KEYBOARD_PADis1.runtime/CMakeLists.txt:run_tiny_first_run_uiclearsLEONIDA_KEYBOARD_PAD, so the caller's shell can't mask the default.docs/first_run_ui.md: says the pad is in its focused mode.Out of scope: the
boot.ps1side (#1609, RT-KEYBOARD-PAD-SCRIPT) and the shim's own default (#1528). This PR doesn't touch either.Tested
Windows 11, RTX 4070 SUPER (NVIDIA 621.01), MSVC. No game files.
ctest -R "run_tiny_first_run_ui|run_tiny_game$": 2/2 pass.LEONIDA_KEYBOARD_PAD=alwaysset by the caller, tiny_game printsFAIL first-run UI keyboard pad reads keys only with focus. So the check catches the old default.scripts/check_no_game_data.pyon the changed files: clean.AI-assisted (Claude Code).
GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11
AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
@JoeY54 on GitHub · 2026-11-25 06:27 UTC · original
Independent Windows validation at
7f08453da77d282924c09b6dc2ac51d69a369547.CTest passed 4/4 across
run_tiny_first_run_ui,run_tiny_game,gameinput, andgameinput_script. The input tests reported 364 and 10 checks respectively, all passing.tiny_gameconfirmed that the first-run profile defaults to focused keyboard input and preserves the tested caller override.LEONIDA_KEYBOARD_PAD=always. The fixture reported the expected keyboard focus check failure and exited 1.Windows 11 Pro 26H2 (26300.9974), MSVC 19.52.37029.0, and repository-pinned SDL 3.4.20. Used the synthetic
tiny_gamefixture and SDL virtual input. AI-assisted with Codex. Test coordination.@Tyrannys on GitHub · 2026-11-25 14:00 UTC · original
Brought up to date with
mainat384abe5b0by a merge (03096929f); no force-push. Conflicts were inruntime/src/main.cppanddocs/first_run_ui.md: main's first-run profile no longer setsLEONIDA_GPU_LABELS, and that is kept; this PR's focused keyboard pad (LEONIDA_KEYBOARD_PAD=1) replaces main'salways.Tested on Windows 11 (RelWithDebInfo), runtime tests only, no game boot:
run_tiny_first_run_ui: passesctest: 428 passed, 11 skipped and 2 disabled (game package or tools not installed here), 1 failed. The failure isxs_proxy_mockat its tear check (g_tear.reads > 0): that check is main's and untouched here; its reader thread got no reads while the machine was fully loaded by a long pipeline-cache build. Unrelated to this change.AI-assisted (Claude Code).
@aslan2142 on GitHub · 2026-11-25 19:30 UTC · original
Merged, thanks! Tested
03096929fmerged ontomainwith the full Windows suite under Wine (llvmpipe and a RADV iGPU). The suite matchesmain, apart from the known timing flake inxmem(the "reader of the views' last pages" check), which this PR doesn't touch.maincee965560+03096929f: it merges cleanly; the semantic suite passes (491 files, 6,312 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 4 changed files.AI-assisted (Claude Code, Claude Opus 5.5).