windows-boot: the keyboard pad in focus mode with an input script (BOOT-PAD-FOCUS) #1790
Closed
leonida/mandy
Coderlord wants to merge 0 commits from
boot-pad-focus into main
pull from: boot-pad-focus
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!1790
Loading…
Reference in a new issue
No description provided.
Delete branch "boot-pad-focus"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Claimed in the coordination issue as: BOOT-PAD-FOCUS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162053010)
What and why
scripts/windows-boot/boot.ps1setLEONIDA_KEYBOARD_PAD=alwayswhenever it passed an input script, so that thescripted presses would arrive while the game window is not focused. Scripted presses already run with or without
focus in every keyboard-pad mode (docs/gameinput.md: "Scripted presses run with or without focus for unattended
runs";
update_keyboard_padapplies them outside the focus gate), soalwaysonly added the machine's physicalkeyboard and mouse from any window.
On a native boot left running while the PC was in use, that fed the person's own mouse moves (right stick), clicks
(RB) and Backspace (B) into the title: it went back a page in the first-run flow and changed the UI text size. With
LEONIDA_KEYBOARD_PAD=1the script works the same and physical input counts only through the focused game window,which is also how docs/gameinput.md describes playing by hand.
Also updated: the
-InputScripthelp, the harness README's table and the comment over the script reader ingameinput.cpp(which said the script neededalways).scripts/run_guest_scene.pykeepsalways(a consoletool has no window of its own).
Tested
Windows 11, RTX 5080, native, retail package, ubiq
main+ this harness setting (set from the shell):LEONIDA_KEYBOARD_PAD=1logged exactly the 84 scripted presses(
gameinput: press ...) and walked the first-run pages to the legal pages.alwayslogged its 13 scripted presses plus 80+ unscripted ones (rsup,rsdown,rb,b,y) from the person using the PC, after which the title was back on the UI text size page.boot.ps1 -DryRunlistsLEONIDA_KEYBOARD_PAD=1with the default script; the script parses under WindowsPowerShell 5.1.
GPUs tested: NVIDIA GeForce RTX 5080, driver 621.24, Windows 11 Pro 26300
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)Reviewed 4e38cbe: checked statically (the shim builds only on Windows, no repo test covers boot.ps1, no pwsh here). LEONIDA_KEYBOARD_PAD=1 is a valid Focused value; scripted presses are written outside the focus-gated block of update_keyboard_pad on the PR base and on main's c68f49416 refactor, so a script keeps arriving unfocused, while "always" is what let RIDEV_INPUTSINK raw input reach an unfocused boot - the new default closes a real exposure and is a no-op for no-SDL3 builds (they ignore LEONIDA_KEYBOARD_PAD). One blocker for merging as is:
git merge-treereports gameinput.cpp changed in both, because the comment hunk conflicts with main's RT-INPUT-SCRIPT-NO-SDL3 rewrite (boot.ps1 and README.md apply cleanly) - please rebase and keep the corrected comment.AI-assisted review.
Recommendation: Fix first
@PierreEbele thanks for the review. Rebased onto
main63185f4a3 (now f5505665c):gameinput.cpp: main's RT-INPUT-SCRIPT-NO-SDL3 comment kept as it is, with only the corrected parenthetical ("with the keyboard pad on, 1 or always").boot.ps1: main's:holdhelp text and itsLEONIDA_PEEKblock kept; the input-script default isLEONIDA_KEYBOARD_PAD=1, and the help says why.runtime/README.md'sLEONIDA_INPUT_SCRIPTrow, which still said the keyboard pad needsalways.Checked:
git diff maintouches only those four lines of text plus the default, andboot.ps1parses with no errors (PowerShell 5.1 parser). Not booted again since the rebase. AI-assisted (Claude Code).Windows 11 Native Verification Report (
f5505665c7merged ontoorigin/mainadfb3821a2)origin/main(adfb3821a2) and clean 3-wayruntime/shims/gameinput.cppmerge alongside#1528and#1831.10.0.26200, x64), PowerShell5.1, MSVC19.44.35228, prebuilt SDL3.4.20(SDL3-static.lib), Python3.12.10(-DryRun+ synthetic virtual-pad CTest only; zero game binaries launched).Diff Audit (
4files,+10/-7)scripts/windows-boot/boot.ps1: switches$defaults["LEONIDA_KEYBOARD_PAD"]when$InputScriptis active from"always"to"1"(KeyboardPadMode::Focused) and documents why in.PARAMETER InputScript.runtime/shims/gameinput.cpp,runtime/README.md,scripts/windows-boot/README.md: aligns comments and environment-variable tables withupdate_keyboard_pad(), whereLEONIDA_INPUT_SCRIPTpresses already fire unconditionally wheneverg_keyboard.padis attached (1oralways), while physicalGetAsyncKeyStatekeys and cursor capture remain gated onforeground_is_ours()under1.Red -> Green Verification
origin/mainadfb3821a2):powershell -NoProfile -ExecutionPolicy Bypass -File scripts/windows-boot/boot.ps1 -Out <empty_stub_dir> -DryRunemitted[boot] env LEONIDA_KEYBOARD_PAD=alwaysalongside[boot] env LEONIDA_INPUT_SCRIPT=a@45,a@60,a@75,a@90([boot] dry run: nothing launched,rc=0), exposing unattended boots to physical host keyboard/mouse input from unrelated foreground windows.#1790+origin/main):boot.ps1 -Out <empty_stub_dir> -DryRun: emitted[boot] env LEONIDA_KEYBOARD_PAD=1and[boot] env LEONIDA_INPUT_SCRIPT=a@45,a@60,a@75,a@90([boot] dry run: nothing launched,rc=0).boot.ps1 -Out <empty_stub_dir> -NoInput -DryRun: omitted bothLEONIDA_INPUT_SCRIPTandLEONIDA_KEYBOARD_PAD(rc=0).gameinput_test.exe(/O2 /MD /EHsc /W4 /permissive- /utf-8, linked against SDL3.4.20):389 checks, 0 failures(4.06 s,rc=0), confirming scripted presses arrive unfocused withLEONIDA_KEYBOARD_PAD=1while physical keys require focus.#1790 + #1528 + #1831 + origin/main)gameinput_test.exe:393 checks, 0 failures(4.06 s,rc=0).tests/test_docs_env_vars.py,tests/test_docs_links.py,tests/test_docs_repo_paths.py,tests/test_docs_table_rows.py, andtests/test_docs_encoding.pyall passed (OK,rc=0).Verdict: PASS — ready to merge.
AI-assisted.
Tested
f5505665cmerged (no commit) withmain53b77df14. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), Ninja, RelWithDebInfo.check_no_game_data.pyis clean.runtime/shims/gameinput.cppchanges a comment only.boot.ps1change (LEONIDA_KEYBOARD_PAD=1instead ofalwayswith an input script) matchesmain:gameinput.cpp:1916anddocs/gameinput.md:174already say that scripted presses run while the window is unfocused in mode1. So unattended boots keep their script, and the keyboard and mouse of whoever uses the machine reach the title only through its focused window.scripts/windows-boot/boot.ps1, since it starts the title.xbox_presentfails, as on plainmainhere.gta6rt.exelinks withoutws2_32.libwith nothing new overmain.boot.ps1 -InputScript ...setsLEONIDA_KEYBOARD_PADto1, notalways.No blocker from my side. AI-assisted (Claude Code).
Verified by OreoFR — NO RED (no test; the runtime change is a comment)
boot.ps1settingLEONIDA_KEYBOARD_PAD=1instead ofalwayswith an input script; thegameinput.cppchange is a comment.LEONIDA_CARGO=OFF,LEONIDA_XMA2_DECODER_LIBempty), main + this PR alone; imports unchanged vs main (25 DLLs, 655 functions, no WS2_32)docs/gameinput.md,docs/running.mdanddocs/linux_proton.mdstill sayLEONIDA_KEYBOARD_PAD=alwaysfor scripted runs (stale, not a bug).Game A/B (values only: no captures, logs or game paths leave this machine). The same
gta6rt.exein both arms, built from mainc8bf0e7b6without the XMA decoder: this PR'sgameinput.cppchange is a comment. A = main'sboot.ps1, which setsLEONIDA_KEYBOARD_PAD=always. B = this PR'sboot.ps1, which setsLEONIDA_KEYBOARD_PAD=1. Recipe:boot.ps1 -Seconds 210 -GameDir -Runtime -Shaders -OutDir, otherwise the defaults (input scripta@45,a@60,a@75,a@90). The seed was a precompiled compute journal besidegta6rt.exe, the same for every boot. Order: A1, B1, (two #1681 boots), A2, (one #1681 boot), B2. The game window was left unfocused and nobody used the machine.Prediction (written before the first boot): B logs the same 4 scripted presses as A, so none are lost with
1while unfocused. Neither arm has unscripted presses. First frame and frames/s stay within run-to-run noise.Result: scripted input works the same with
1as withalways(4/4 presses in all four boots, unfocused). The frame rate splits about 22-24 vs 14-15 frames/s in both arms, depending on which screen a boot sits on at the end, not on the arm. What the PR changes, keeping the user's own keyboard and mouse out of an unfocused boot, can't be shown without someone using the machine. Nobody did, so neither arm logged an unscripted press.AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR.
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.