Input: VICTORY_KEYS_LIVE presses the lines appended to a file while the title runs #1027
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1027
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1027"
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?
@Zayfway on GitHub · 2026-11-25 16:39 UTC · original
Zayfway:input/keys-live→main· +275 −17 · 2 files · 2 commits · openWhat
VICTORY_KEYS_LIVE=<file>(diagnostics builds): lines appended to the file while the title runs are pressed in order. The syntax per line:VICTORY_KEYS;+, held together (W+J:1500walks and turns);:(200 by default);wait:<ms>, which holds nothing.150 ms of nothing follows each line, so the same key twice is two presses. Lines already in the file at start are not pressed, and a line counts only once its newline is written. An unknown key name is logged and skipped, not pressed as nothing.
It goes through the same path as
VICTORY_KEYS(scripted()), so it works without focus and drives the stand-in pad.key_codeis shared by both;SpaceandShiftare added. One row is added to the README's debugging table.Why
VICTORY_KEYSneeds every press timed before the run starts. Several screens come at different times from run to run (warm or cold shader cache, a loaded machine):An unattended run (an agent, a script) that has to get through them, or into the world and move there, needs to decide the next press after it has seen the last screen. This PR adds that.
From outside,
SendInput/SetForegroundWindoware often refused (no focus from a background process, a system dialog on top).VICTORY_KEYS_ANYWHERE(#839) reads the real keyboard, which still needs something to press it.Tested
RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, 16 GB RAM, Windows 11 26300, Series X profile.
cargo test -p victory-hle --features diagnostics --lib: 100 passed, 0 failed, including the 2 new tests (line parsing; one line after another, with the gap).cargo clippy -p victory-hle --features diagnostics --all-targets: nothing in the changed code.rustfmt --checkis clean on the changed blocks; the 4 differences left ingameinput.rsare onmainalready.c4eeebb, on465b94f):BogusthenEnterwritten to the file on the profile screen gaveline not understood ... line="Bogus"thenpressed line="Enter". The title went from the profile screen (frame 900) to its loading screens (frames 1200, 1500).0b0074e) drove whole runs from a fresh data folder: first boot, legal pages, the policy checkboxes, profile, into the world and the opening cutscene. 7 runs, no missed or doubled press.Not tested
Holding stick keys in gameplay (
W+J:…) on this exact commit; only the menu path above was run on it.🤖 Generated with Claude Code
@Zayfway on GitHub · 2026-11-25 21:21 UTC · original
Updated (
input/keys-livehead, on top ofc4eeebb), same contract.follow()now reads only the bytes appended since its last look: it keeps the offset, seeks to it, and buffers an incomplete last line until its newline comes (complete_lines). Before, it read the whole file every 100 ms.Tests.
cargo test -p victory-hle --features diagnostics --lib: 102 passed. That includes two new tests:polls_far_apart_lose_no_press: three presses, polls 10 s apart, all three seen in order;lines_are_taken_only_once_complete.In the game, same machine as in the description: on the profile screen,
Bogus\n, thenEnt, then one second laterer\ngaveline not understood … "Bogus"followed by onepressed line="Enter". The title left its profile screen.AI-assisted (Claude Code).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.