[PR #1790] windows-boot: the keyboard pad in focus mode with an input script (BOOT-PAD-FOCUS) #1802

Open
opened 2026-11-26 21:19:00 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1790
Author: @Coderlord
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: boot-pad-focus


📝 Commits (1)

  • 4e38cbe windows-boot: the keyboard pad in focus mode with an input script (BOOT-PAD-FOCUS)

📊 Changes

3 files changed (+6 additions, -4 deletions)

View changed files

📝 runtime/shims/gameinput.cpp (+1 -1)
📝 scripts/windows-boot/README.md (+1 -1)
📝 scripts/windows-boot/boot.ps1 (+4 -2)

📄 Description

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.ps1 set LEONIDA_KEYBOARD_PAD=always whenever it passed an input script, so that the
scripted 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_pad applies them outside the focus gate), so always only added the machine's physical
keyboard 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=1 the 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 -InputScript help, the harness README's table and the comment over the script reader in
gameinput.cpp (which said the script needed always). scripts/run_guest_scene.py keeps always (a console
tool has no window of its own).

Tested

Windows 11, RTX 5080, native, retail package, ubiq main + this harness setting (set from the shell):

  • A 480 s boot with an 84-press input script under LEONIDA_KEYBOARD_PAD=1 logged exactly the 84 scripted presses
    (gameinput: press ...) and walked the first-run pages to the legal pages.
  • An earlier 600 s boot under always logged 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 -DryRun lists LEONIDA_KEYBOARD_PAD=1 with the default script; the script parses under Windows
    PowerShell 5.1.

GPUs tested: NVIDIA GeForce RTX 5080, driver 621.24, Windows 11 Pro 26300

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1790 **Author:** [@Coderlord](https://github.com/Coderlord) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `boot-pad-focus` --- ### 📝 Commits (1) - [`4e38cbe`](https://github.com/ubiquitarianism/leonida/commit/4e38cbe9a21f12bbcaffb6ede994e721405f4a9c) windows-boot: the keyboard pad in focus mode with an input script (BOOT-PAD-FOCUS) ### 📊 Changes **3 files changed** (+6 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/gameinput.cpp` (+1 -1) 📝 `scripts/windows-boot/README.md` (+1 -1) 📝 `scripts/windows-boot/boot.ps1` (+4 -2) </details> ### 📄 Description 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.ps1` set `LEONIDA_KEYBOARD_PAD=always` whenever it passed an input script, so that the scripted 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_pad` applies them outside the focus gate), so `always` only added the machine's physical keyboard 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=1` the 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 `-InputScript` help, the harness README's table and the comment over the script reader in `gameinput.cpp` (which said the script needed `always`). `scripts/run_guest_scene.py` keeps `always` (a console tool has no window of its own). ### Tested Windows 11, RTX 5080, native, retail package, ubiq `main` + this harness setting (set from the shell): - A 480 s boot with an 84-press input script under `LEONIDA_KEYBOARD_PAD=1` logged exactly the 84 scripted presses (`gameinput: press ...`) and walked the first-run pages to the legal pages. - An earlier 600 s boot under `always` logged 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 -DryRun` lists `LEONIDA_KEYBOARD_PAD=1` with the default script; the script parses under Windows PowerShell 5.1. GPUs tested: NVIDIA GeForce RTX 5080, driver 621.24, Windows 11 Pro 26300 AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1802
No description provided.