HLE: VICTORY_KEYS repeats and holds, and VICTORY_KEYS_FILE #1315

Open
EgoraWyn wants to merge 1 commit from upstream-pr/1318 into main
EgoraWyn commented 2026-11-26 14:15:39 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by EgoraWyn on 2026-11-26T14:15:39Z.


Extends the diagnostic scripted-key list (VICTORY_KEYS, diagnostics feature) in crates/victory-hle/src/modules/gameinput.rs.

What

  • <from>-<to>:<key> holds the key for the whole span.
  • <from>-<to>/<every>:<key> presses it for 0.2 s every <every> seconds in the span.
  • <from>-<to>/<every>+<hold>:<key> holds each press <hold> seconds. <hold> must be > 0 and < <every>, otherwise the entry is rejected.
  • VICTORY_KEYS_FILE=<path>: a key name appended as a new line is pressed once that line appears, so a script that watches the log can press exactly when a screen is ready (Add-Content <path> Enter).

Existing <seconds>:<key> lists parse as before. Nothing changes unless the variables are set.

Why

In unattended smoke runs, fixed timestamps either press too early or wait up to a whole period. Hold-to-skip cutscenes need a long press. For example, 2-200/3+2.5:Enter steps through menus and also holds long enough to skip the cutscene.

Testing

  • New unit test scripts_repeat_and_hold: covers periods, spans and holds, and rejects a zero hold or a hold >= the period.
  • cargo check -p victory-hle with and without --features diagnostics: no new warnings.
  • The original version of this change was used for smoke runs on an RTX 3060 Laptop 6 GB (Windows 11).

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:6628548251 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1318). Originally posted by [EgoraWyn](https://github.com/EgoraWyn) on 2026-11-26T14:15:39Z. --- Extends the diagnostic scripted-key list (`VICTORY_KEYS`, `diagnostics` feature) in `crates/victory-hle/src/modules/gameinput.rs`. ## What - `<from>-<to>:<key>` holds the key for the whole span. - `<from>-<to>/<every>:<key>` presses it for 0.2 s every `<every>` seconds in the span. - `<from>-<to>/<every>+<hold>:<key>` holds each press `<hold>` seconds. `<hold>` must be > 0 and < `<every>`, otherwise the entry is rejected. - `VICTORY_KEYS_FILE=<path>`: a key name appended as a new line is pressed once that line appears, so a script that watches the log can press exactly when a screen is ready (`Add-Content <path> Enter`). Existing `<seconds>:<key>` lists parse as before. Nothing changes unless the variables are set. ## Why In unattended smoke runs, fixed timestamps either press too early or wait up to a whole period. Hold-to-skip cutscenes need a long press. For example, `2-200/3+2.5:Enter` steps through menus and also holds long enough to skip the cutscene. ## Testing - New unit test `scripts_repeat_and_hold`: covers periods, spans and holds, and rejects a zero hold or a hold >= the period. - `cargo check -p victory-hle` with and without `--features diagnostics`: no new warnings. - The original version of this change was used for smoke runs on an RTX 3060 Laptop 6 GB (Windows 11). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1318:upstream-pr/1318'
git switch 'upstream-pr/1318'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1318'
git switch 'upstream-pr/1318'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1318'
git switch 'upstream-pr/1318'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1318'
git switch 'main'
git merge --squash 'upstream-pr/1318'
git switch 'main'
git merge --ff-only 'upstream-pr/1318'
git switch 'main'
git merge 'upstream-pr/1318'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
fxceless/victory-fork!1315
No description provided.