Input: say why a stand-in pad key is ignored; VICTORY_KEYS_ANYWHERE=1 reads the keyboard without the focus #839
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!839
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-839"
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?
@MamaLeVrai on GitHub · 2026-11-25 10:02 UTC · original
MamaLeVrai:keys-anywhere→main· +53 −1 · 2 files · 1 commits · openWhat
The keyboard stand-in pad (used when no XInput pad is connected) is read only while the foreground window belongs to our process (
focused()ingameinput.rs). When it does not, nothing says so, so a tester whose keys do nothing cannot tell a focus problem from a broken stand-in.VICTORY_LOG=info, the log now says once that a key of the stand-in pad's table (the README's list, plus W A S D I J K L Z C) is down while the keyboard is not being read, and what to do about it.VICTORY_KEYS_ANYWHERE=1(unset, empty or0is off) reads the keyboard whichever window has the focus. It also tells the two cases apart: if the keys work with it and not without it, the focus test is the cause. The caveat is in the README: typing in another window then reaches the title too.Nothing changes when the switch is not set, apart from the one log line.
Why
A tester on an RX 6950 XT (Windows 11, no gamepad) reported that the keyboard stand-in worked about once in a hundred tries, even for the legal-notice screen that needs scrolling, while the scripted keys of
VICTORY_KEYS(which ignore the focus) worked. I could not find the cause from the code (the window is created withWS_OVERLAPPEDWINDOW | WS_VISIBLE, noNOACTIVATE), so this PR does not claim a fix: it makes the next report say whether focus is the reason.Checks
cargo test -p victory-hle(99 tests, one new:a_switch_is_on_unless_unset_empty_or_zero): pass, on an RX 6950 XT, Windows 11.cargo clippy -p victory-hle --all-targets --no-deps -- -D warnings: clean. (mainitself failscargo clippy --workspace -D warningsinvictory-gpuwith two dead-code errors,placed_filler_twinsanddepth_written, with or without this PR.)AI-assisted (Claude Code); no game data.
🤖 Generated with 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.