mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:25:52 +01:00
[PR #1917] windows-boot: state-relative input presses (BOOT-INPUT-STATE-RELATIVE) #1924
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1924
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1917
Author: @BubsMcgee
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:boot-input-state📝 Commits (1)
34da84awindows-boot: state-relative input presses (BOOT-INPUT-STATE-RELATIVE)📊 Changes
4 files changed (+391 additions, -9 deletions)
View changed files
📝
scripts/windows-boot/README.md(+10 -1)📝
scripts/windows-boot/boot.ps1(+134 -8)➕
tests/test_boot_input_script.py(+91 -0)➕
tools/boot_input_script.py(+156 -0)📄 Description
Claimed in the coordination issue as: BOOT-INPUT-STATE-RELATIVE (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7166666931). No dependencies; this is the harness side and reads keys through the keyboard pad (
GetAsyncKeyState), so #1790's focus mode is orthogonal.Fixes: #1900
What and why
-InputScriptwas absolute-time only (a@45,a@60,...). The title reaches the same states at different times from run to run, so the same script lands presses in different game states; in A/B runs an A at 75/90 s can advance in one build and back out to the menu (session d -> 0) in another, changing presents, PSO counts and the path being compared.This adds
button@game=<hex>+<delay>/button@session=<hex>+<delay>: the harness watches the existingLEONIDA_PEEKvalues (0x7446510game, low dword of0x98f828csession) and injects the key once that state has been seen for the delay. Absolute entries still go to the runtime unchanged.Files
tools/boot_input_script.py: parse and due matcher (stdlib only).scripts/windows-boot/boot.ps1: split the script, watch the log, inject through the keyboard pad (SendInput,LEONIDA_KEYBOARD_PAD=always; no focus needed), and read the log in the digest with a share that tolerates the redirect handle.scripts/windows-boot/README.mdand--help: the new form and an example.tests/test_boot_input_script.py: synthetic parse/due cases.Tested
python -I tests/test_boot_input_script.py: 12/12.python -I scripts/check_no_game_data.pyon the changed files: OK.-DryRunwitha@session=3+5,a@session=d+5:absolute='' state=2.a@session=3+5,a@session=d+5: the harness injectedaat session=3 (55.8 s) and session=d (70.9 s); the keyboard pad loggedpress [email protected]/69.0/69.9;-DigestOnlyreads statessession=3 @55 s,session=d @70 s, and the known world-start device loss (lib_cs_03426...).AI-assisted.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.