F1 menu: a held Up or Down moves on by itself #2351

Open
github-bot wants to merge 11 commits from github-bot/gh-2351 into main AGit
Owner

@⁠tongelberkay on GitHub · 2026-11-29 12:17 UTC · original
tongelberkay:fix/f1-menu-key-repeat → main · +833 −825 · 32 files · 11 commits · open

What it changes

The F1 menu's key thread (watch_keys in crates/victory-gpu/src/host/menu.rs) counted a key only when it went down, so holding Up or Down moved one row and stopped: going through the list took one press per row.

Up and Down now repeat while held, as a keyboard's own repeat does: after 400 ms, one more row every 80 ms. The timing is a small function of its own (presses), with a unit test.

  • Left and Right do not repeat: each change is saved to the settings file at once, so a held key would cycle values and write the file many times.
  • At most two steps are queued in one 10 ms tick, so a stalled thread does not jump far down the list.
  • F1, Enter, Esc and the mouse buttons are unchanged (one press each). What main does at the start and for clicks is kept: a key already held when the thread starts, and a click while the menu is closed, send nothing until let go.

How it was tested

  • GPU and profile: RTX 4060 Ti 8 GB, Ryzen 5 5600; Series S, 1280x720 to 1920x1080 with DLSS Quality, DLSS frame generation 2x, ray tracing off.
  • Before: holding Down in F1 moved one row.
  • After: holding Up or Down scrolls through the list; Left and Right still change a value once per press.
  • cargo test -p victory-gpu --lib host::menu: 29 passed, including the new held_up_and_down_repeat.
  • cargo clippy -p victory-gpu -- -D warnings stops at shadow.rs (ranged is never used) on main (84bd61e2) as well; nothing in menu.rs.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Rebased on main after #2225's mouse buttons landed in watch_keys; both are kept.

🤖 Generated with Claude Code

**@⁠tongelberkay** on GitHub · 2026-11-29 12:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2351) `tongelberkay:fix/f1-menu-key-repeat` → `main` · +833 −825 · 32 files · 11 commits · open ## What it changes The F1 menu's key thread (`watch_keys` in `crates/victory-gpu/src/host/menu.rs`) counted a key only when it went down, so holding Up or Down moved one row and stopped: going through the list took one press per row. Up and Down now repeat while held, as a keyboard's own repeat does: after 400 ms, one more row every 80 ms. The timing is a small function of its own (`presses`), with a unit test. - Left and Right do not repeat: each change is saved to the settings file at once, so a held key would cycle values and write the file many times. - At most two steps are queued in one 10 ms tick, so a stalled thread does not jump far down the list. - F1, Enter, Esc and the mouse buttons are unchanged (one press each). What `main` does at the start and for clicks is kept: a key already held when the thread starts, and a click while the menu is closed, send nothing until let go. ## How it was tested - GPU and profile: RTX 4060 Ti 8 GB, Ryzen 5 5600; Series S, 1280x720 to 1920x1080 with DLSS Quality, DLSS frame generation 2x, ray tracing off. - Before: holding Down in F1 moved one row. - After: holding Up or Down scrolls through the list; Left and Right still change a value once per press. - `cargo test -p victory-gpu --lib host::menu`: 29 passed, including the new `held_up_and_down_repeat`. - `cargo clippy -p victory-gpu -- -D warnings` stops at `shadow.rs` (`ranged` is never used) on `main` (`84bd61e2`) as well; nothing in `menu.rs`. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Rebased on `main` after #2225's mouse buttons landed in `watch_keys`; both are kept. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The menu's key thread counted a key only when it went down, so moving
through the list took one press per row. Up and Down now repeat while
held, as a keyboard's own repeat does: after 400 ms, one more row every
80 ms. Left and Right do not repeat, since each change is saved to the
settings file at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 12:21:46 +00:00
github-bot force-pushed github-bot/gh-2351 from e99f595d84 to 04b4ccef1e 2026-11-30 18:17:29 +00:00 Compare
This pull request has changes conflicting with the target branch.
  • apps/victory/src/play.rs
  • crates/victory-gpu/src/host/menu.rs
  • crates/victory-gpu/src/shadow.rs
  • crates/victory-hle/src/modules/xmem.rs
  • scripts/play-nvidia.ps1
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2351/head:github-bot/gh-2351'
git switch 'github-bot/gh-2351'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2351'
git switch 'github-bot/gh-2351'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2351'
git switch 'github-bot/gh-2351'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2351'
git switch 'main'
git merge --squash 'github-bot/gh-2351'
git switch 'main'
git merge --ff-only 'github-bot/gh-2351'
git switch 'main'
git merge 'github-bot/gh-2351'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/trustno1-coder--VIctory-NVIDIA!2351
No description provided.