Mouse and keyboard: on foot and car controls with prompts (on top of #3055) #3635

Closed
github-bot wants to merge 2 commits from github-bot/gh-3635 into main AGit
Owner

@⁠Jesper-Andersson on GitHub · 2026-11-30 02:23 UTC · original
Jesper-Andersson:t1u-controls-pr → main · +406 −31 · 11 files · 2 commits · closed without merging

Title: [pr-fix][input] Mouse and keyboard: on foot and car controls with prompts (on top of #3055)


Builds on #3055 by Kitrae and depends on it: this branch is #3055's head plus one commit. Please merge #3055 first; this PR then shows only its own commit.

Relates to #3550 (second half: Xbox prompts with mouse and keyboard)
Relates to #3203 (wheel opening and closing in a loop)

What it changes

Two things in native mouse mode (VICTORY_MNK=1 with native aiming). Both switches default on; setting one to 0 gives the old behaviour.

Radial wheel held in the car (VICTORY_WHEEL_HOLD=0 turns it off)

  • In the driver seat, RMB is LB while the radial wheel is closed and nothing while it is open. Holding RMB opened the wheel, LB dropped, the wheel closed and opened again, in a loop (the last point of #3203).
  • Now LB stays pressed while RMB stays held after the wheel opened, and lets go when RMB is released. Outside the driver seat nothing changes.

Prompts show the keys of native mode (VICTORY_PROMPTS_FROM_BINDINGS=0 turns it off)

  • With native aiming the launcher always names a bindings file, so the prompts kept the Xbox pictures (the second half of #3550).
  • Now the prompts draw the keys that work in this mode: the native layout from the README with #3055's Native.<Button> keys over it.
    • A remapped button shows its first assigned key.
    • Other buttons show their first native key that no Native. line took for another action: Space for A, R for B, F for L3, MMB for R3, RMB / LMB for LT / RT as on foot.
    • Keys are matched by virtual key, the same way #3055's overrides are read.
    • The right stick's directions keep the pad picture, because the mouse looks around.
  • New key caps: digits, Space, Shift, Ctrl, Alt, LMB, RMB, MMB.
  • The map is read once at start, so a change in F1 shows after a restart. The prompts do not know the seat, so in a car the throttle and brake prompts still show the mouse buttons.
  • The mode without native aiming is not touched. #3442 covers keyboard prompts there.

README (native mouse section) and docs/findings.md describe both.

How it was tested

  • GPU and profile: RTX 2070 SUPER 8 GB, Windows 11, Series S, DLSS Performance.
  • In game: we ran an earlier local version of both changes on our own build. Holding RMB in a car kept the wheel open, and the prompts showed the bound keys. That build read the keys from our own bindings path, not from #3055's Native. lines. This exact branch (on #3055) has not been run in a game yet.
  • New unit tests: the wheel hold steps (in driver_vs_passenger_seat_remaps_throttle_pitch_and_mouse_buttons), native_prompts_draw_the_native_layout_with_the_native_lines_over_it, native_lines_reach_the_prompts_in_file_order, digits_modifiers_and_mouse_buttons_have_labels. The host-font test now also checks every new cap's characters.
  • Before: wheel opens and closes in a loop with RMB held in a car, and the prompts show Xbox pictures (user observation on an earlier local build).
  • After: not observed on this branch.
  • Wave sizes: not applicable (no shader change)
  • cargo test passed for the crates it touches: yes (victory-hle, victory-game; cargo check -p victory).
  • Not tested: keyboard layouts other than US, AMD cards, Series X, frame generation, ray tracing, boat and aircraft seats (the wheel hold only changes the driver seat).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3055 (this PR's base: Native.<Button> keys, Fixes #3009), #2545 by VAldES191 (the same prompts idea, written for the older mode and now conflicting), #3442 by JohnNajar (keyboard prompts in the mode without native aiming; #3442 touches play.rs, run.rs and prompts/hook.rs; conflicts with this branch in run.rs (git merge-tree); the fix is small: our native-mode check goes before its stock-file check), and issue #3517 by Asugan94 (native mouse and keyboard controls and F1 bindings).
  • #2134 by Rileyxdev (Xbox and keyboard prompts follow the active input mode; README, run.rs, gameinput.rs): conflicts with this branch in README.md and run.rs (git merge-tree); it already conflicts with main in README.md.
  • #2630 by LeonardoRCB (prompts follow CONTROLS: no key caps in GAMEPAD and DUALSENSE modes; run.rs only): conflicts with this branch in run.rs (git merge-tree); it already conflicts with main in run.rs.

This change was made with AI assistance (Claude Code).

**@⁠Jesper-Andersson** on GitHub · 2026-11-30 02:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3635) `Jesper-Andersson:t1u-controls-pr` → `main` · +406 −31 · 11 files · 2 commits · closed without merging Title: [pr-fix][input] Mouse and keyboard: on foot and car controls with prompts (on top of #3055) --- Builds on #3055 by Kitrae and depends on it: this branch is #3055's head plus one commit. Please merge #3055 first; this PR then shows only its own commit. Relates to #3550 (second half: Xbox prompts with mouse and keyboard) Relates to #3203 (wheel opening and closing in a loop) ## What it changes Two things in native mouse mode (`VICTORY_MNK=1` with native aiming). Both switches default on; setting one to 0 gives the old behaviour. **Radial wheel held in the car** (`VICTORY_WHEEL_HOLD=0` turns it off) - In the driver seat, `RMB` is LB while the radial wheel is closed and nothing while it is open. Holding `RMB` opened the wheel, LB dropped, the wheel closed and opened again, in a loop (the last point of #3203). - Now LB stays pressed while `RMB` stays held after the wheel opened, and lets go when `RMB` is released. Outside the driver seat nothing changes. **Prompts show the keys of native mode** (`VICTORY_PROMPTS_FROM_BINDINGS=0` turns it off) - With native aiming the launcher always names a bindings file, so the prompts kept the Xbox pictures (the second half of #3550). - Now the prompts draw the keys that work in this mode: the native layout from the README with #3055's `Native.<Button>` keys over it. - A remapped button shows its first assigned key. - Other buttons show their first native key that no `Native.` line took for another action: `Space` for A, `R` for B, `F` for L3, `MMB` for R3, `RMB` / `LMB` for LT / RT as on foot. - Keys are matched by virtual key, the same way #3055's overrides are read. - The right stick's directions keep the pad picture, because the mouse looks around. - New key caps: digits, `Space`, `Shift`, `Ctrl`, `Alt`, `LMB`, `RMB`, `MMB`. - The map is read once at start, so a change in F1 shows after a restart. The prompts do not know the seat, so in a car the throttle and brake prompts still show the mouse buttons. - The mode without native aiming is not touched. #3442 covers keyboard prompts there. README (native mouse section) and `docs/findings.md` describe both. ## How it was tested - GPU and profile: RTX 2070 SUPER 8 GB, Windows 11, Series S, DLSS Performance. - In game: we ran an earlier local version of both changes on our own build. Holding `RMB` in a car kept the wheel open, and the prompts showed the bound keys. That build read the keys from our own bindings path, not from #3055's `Native.` lines. This exact branch (on #3055) has not been run in a game yet. - New unit tests: the wheel hold steps (in `driver_vs_passenger_seat_remaps_throttle_pitch_and_mouse_buttons`), `native_prompts_draw_the_native_layout_with_the_native_lines_over_it`, `native_lines_reach_the_prompts_in_file_order`, `digits_modifiers_and_mouse_buttons_have_labels`. The host-font test now also checks every new cap's characters. - Before: wheel opens and closes in a loop with RMB held in a car, and the prompts show Xbox pictures (user observation on an earlier local build). - After: not observed on this branch. - Wave sizes: not applicable (no shader change) - `cargo test` passed for the crates it touches: yes (`victory-hle`, `victory-game`; `cargo check -p victory`). - Not tested: keyboard layouts other than US, AMD cards, Series X, frame generation, ray tracing, boat and aircraft seats (the wheel hold only changes the driver seat). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3055 (this PR's base: `Native.<Button>` keys, Fixes #3009), #2545 by VAldES191 (the same prompts idea, written for the older mode and now conflicting), #3442 by JohnNajar (keyboard prompts in the mode without native aiming; #3442 touches play.rs, run.rs and prompts/hook.rs; conflicts with this branch in run.rs (`git merge-tree`); the fix is small: our native-mode check goes before its stock-file check), and issue #3517 by Asugan94 (native mouse and keyboard controls and F1 bindings). - #2134 by Rileyxdev (Xbox and keyboard prompts follow the active input mode; README, run.rs, gameinput.rs): conflicts with this branch in README.md and run.rs (`git merge-tree`); it already conflicts with main in README.md. - #2630 by LeonardoRCB (prompts follow CONTROLS: no key caps in GAMEPAD and DUALSENSE modes; run.rs only): conflicts with this branch in run.rs (`git merge-tree`); it already conflicts with main in run.rs. This change was made with AI assistance (Claude Code).
Builds on #3055 (Native.<Button> keys over the fixed native layout).

Driver seat: holding right mouse after the radial wheel opened keeps the left
shoulder pressed until the button is released, so the wheel no longer opens
and closes in a loop. VICTORY_WHEEL_HOLD=0 turns it off.

Prompts: with native aiming the prompts kept the Xbox pictures. They now draw
the keys that act in this mode: the native layout with the Native.<Button>
keys over it, one key per control, matched by virtual key as #3055 reads
them (gameinput::native_prompt_keys); the right stick's directions keep the
picture. New caps for digits, Space, Shift, Ctrl, Alt and the mouse buttons.
Read once at start. VICTORY_PROMPTS_FROM_BINDINGS=0 turns it off. The mode
without native aiming is unchanged.

This change was made with AI assistance (Claude Code).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 02:26:34 +00:00
Author
Owner

@⁠xmorvay on GitHub · 2026-11-30 13:54 UTC · original

tested this on an rtx 4070 super with native mouse aiming and the default xbox control scheme

i mapped tab to lb and held it on foot after loading a post prologue save
the weapon wheel opened and showed keyboard labels in game
the log also confirmed that the title loaded the icon movie with the replacement key caps

the binding tests passed for both shift keys and for space r and tab
i verified the wheel on foot but did not verify the wheel in the driver seat or the reload animation

**@⁠xmorvay** on GitHub · 2026-11-30 13:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3635#issuecomment-7280544217) tested this on an rtx 4070 super with native mouse aiming and the default xbox control scheme i mapped tab to lb and held it on foot after loading a post prologue save the weapon wheel opened and showed keyboard labels in game the log also confirmed that the title loaded the icon movie with the replacement key caps the binding tests passed for both shift keys and for space r and tab i verified the wheel on foot but did not verify the wheel in the driver seat or the reload animation
github-bot closed this pull request 2026-12-01 04:48:38 +00:00
Author
Owner

@⁠Jesper-Andersson on GitHub · 2026-12-01 04:43 UTC · original

Closing for now: this PR is #3055's head plus one commit, and #3055 conflicts with main, so this one can't be updated on its own (upstream's rule is one change per PR, from the latest main). The branch t1u-controls-pr stays on our fork. Once #3055 is updated or merged, we may reopen this, or open a new PR from the latest main.

Drafted with AI assistance (Claude Code).

**@⁠Jesper-Andersson** on GitHub · 2026-12-01 04:43 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3635#issuecomment-7301033676) Closing for now: this PR is #3055's head plus one commit, and #3055 conflicts with `main`, so this one can't be updated on its own (upstream's rule is one change per PR, from the latest `main`). The branch `t1u-controls-pr` stays on our fork. Once #3055 is updated or merged, we may reopen this, or open a new PR from the latest `main`. Drafted with AI assistance (Claude Code).

Pull request closed

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!3635
No description provided.