Mouse and keyboard: a shooter's layout after the title's own control screens #4586

Open
Thiagojm wants to merge 1 commit from upstream-pr/4586 into main
Thiagojm commented 2026-11-30 23:17:07 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Thiagojm on 2026-11-30T23:17:07Z.


Why

With mouse and keyboard, the stand-in pad's keys were a gamepad spelled out on the keyboard: Enter to jump, Backspace to rest/crouch, C to shoot, Z to aim, F to run, H to look behind. The keyboard prompts showed those keys, and playing with them was awkward. This PR maps every control to where a PC shooter player expects it, following the title's own control screens (on foot, aiming, land and water vehicles). After playing with it, the controls feel much more natural than before.

The new layout

Pad On foot Aiming Vehicle Main key (shown in prompts) Extras
RT Shoot Shoot Accelerate LMB (W at the wheel)
LT Aim / interact Aim Brake / reverse RMB Z (S at the wheel)
A Jump / climb — Handbrake Space Enter
B Rest Crouch Headlights LCtrl C, R (reload), Backspace
X Melee Melee Melee Mouse4 X
Y Interact Quick swap Exit vehicle F Y
LB Loadout Loadout Holster Q —
RB Cover Quick throw Shoot E (LMB at the wheel)
L3 Run Run Horn / nitrous LShift G (at the wheel, where the Shifts/Ctrls pitch)
R3 Look behind Zoom / throw path Look behind MMB H
D-pad ↑ ← ↓ → 1 2 3 4 arrow keys
View / Menu Map / Pause Tab / Esc —

Every key of the earlier table still works as an extra, so nobody loses a key.

What changed

  • victory-core/src/pad.rs fallback_key: the main keys, and with them the keyboard prompts (Space, Ctrl, Shift, LMB/RMB/MMB, M4, 1-4).
  • victory-hle gameinput.rs: the extras in FALLBACK_BUTTONS, G added to LETTER_POSITIONS, Z kept as a keyboard left trigger, and Mouse4 presses X in gameplay. At the wheel, bindings.ini's Shift/Ctrl keys now pitch like the table's instead of also pressing their button.
  • bindings.ini (shipped defaults) follows the same layout, using 0xA0/0xA2 for Shift/Ctrl. The native mouse path reads the left and right modifier keys apart, so a plain Shift/Ctrl in the file never matched there (the old default's A = Shift and LS = Ctrl did nothing). Players' existing %LOCALAPPDATA%\victory\bindings.ini files are not touched.
  • README: the on-foot and driving key lists.
  • Tests that pinned the old keys are updated.

Testing

  • cargo test -p victory-core -p victory-game -p victory-hle: all pass except xmem::a_read_by_range_waits_only_for_a_remapping_that_meets_it, which fails the same way on main when run with the rest of the suite (it passes on its own).
  • cargo xtask policy --staged: ok.
  • Played on foot, aiming and driving with a release build of this layout.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5575544598 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4586). Originally posted by [Thiagojm](https://github.com/Thiagojm) on 2026-11-30T23:17:07Z. --- ## Why With mouse and keyboard, the stand-in pad's keys were a gamepad spelled out on the keyboard: **Enter** to jump, **Backspace** to rest/crouch, **C** to shoot, **Z** to aim, **F** to run, **H** to look behind. The keyboard prompts showed those keys, and playing with them was awkward. This PR maps every control to where a PC shooter player expects it, following the title's own control screens (on foot, aiming, land and water vehicles). After playing with it, the controls feel much more natural than before. ## The new layout | Pad | On foot | Aiming | Vehicle | Main key (shown in prompts) | Extras | |---|---|---|---|---|---| | RT | Shoot | Shoot | Accelerate | **LMB** | (W at the wheel) | | LT | Aim / interact | Aim | Brake / reverse | **RMB** | Z (S at the wheel) | | A | Jump / climb | — | Handbrake | **Space** | Enter | | B | Rest | Crouch | Headlights | **LCtrl** | C, R (reload), Backspace | | X | Melee | Melee | Melee | **Mouse4** | X | | Y | Interact | Quick swap | Exit vehicle | **F** | Y | | LB | Loadout | Loadout | Holster | **Q** | — | | RB | Cover | Quick throw | Shoot | **E** | (LMB at the wheel) | | L3 | Run | Run | Horn / nitrous | **LShift** | G (at the wheel, where the Shifts/Ctrls pitch) | | R3 | Look behind | Zoom / throw path | Look behind | **MMB** | H | | D-pad ↑ ← ↓ → | | | | **1 2 3 4** | arrow keys | | View / Menu | Map / Pause | | | **Tab / Esc** | — | Every key of the earlier table still works as an extra, so nobody loses a key. ## What changed - `victory-core/src/pad.rs` `fallback_key`: the main keys, and with them the keyboard prompts (Space, Ctrl, Shift, LMB/RMB/MMB, M4, 1-4). - `victory-hle` `gameinput.rs`: the extras in `FALLBACK_BUTTONS`, G added to `LETTER_POSITIONS`, Z kept as a keyboard left trigger, and Mouse4 presses X in gameplay. At the wheel, `bindings.ini`'s Shift/Ctrl keys now pitch like the table's instead of also pressing their button. - `bindings.ini` (shipped defaults) follows the same layout, using `0xA0`/`0xA2` for Shift/Ctrl. The native mouse path reads the left and right modifier keys apart, so a plain `Shift`/`Ctrl` in the file never matched there (the old default's `A = Shift` and `LS = Ctrl` did nothing). Players' existing `%LOCALAPPDATA%\victory\bindings.ini` files are not touched. - README: the on-foot and driving key lists. - Tests that pinned the old keys are updated. ## Testing - `cargo test -p victory-core -p victory-game -p victory-hle`: all pass except `xmem::a_read_by_range_waits_only_for_a_remapping_that_meets_it`, which fails the same way on `main` when run with the rest of the suite (it passes on its own). - `cargo xtask policy --staged`: ok. - Played on foot, aiming and driving with a release build of this layout. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tyr0nsur commented 2026-11-30 23:24:24 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-11-30T23:24:24Z.


Related change in #4588. Current main's input path reads profile buttons, but its icon hook still reads the hard-coded table. That matters for this PR because existing profiles keep their current assignments. With #4588 they can continue to show their own working keys while a fresh profile gets the new layout.

I combined 13f3627b with 16d47518 locally. The only merge conflicts were three test hunks in prompts.rs (right-stick click label, Enter/Backspace defaults, and the count of distinct glyphs). After keeping your layout expectations and moving the Enter/Backspace check to explicit bindings, all 38 prompt tests passed. The two sets of changes can land independently.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7295079264 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4586#issuecomment-7295079264). Originally posted by [tyr0nsur](https://github.com/tyr0nsur) on 2026-11-30T23:24:24Z. --- Related change in #4588. Current main's input path reads profile buttons, but its icon hook still reads the hard-coded table. That matters for this PR because existing profiles keep their current assignments. With #4588 they can continue to show their own working keys while a fresh profile gets the new layout. I combined `13f3627b` with `16d47518` locally. The only merge conflicts were three test hunks in `prompts.rs` (right-stick click label, Enter/Backspace defaults, and the count of distinct glyphs). After keeping your layout expectations and moving the Enter/Backspace check to explicit bindings, all 38 prompt tests passed. The two sets of changes can land independently.
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/4586:upstream-pr/4586'
git switch 'upstream-pr/4586'

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/4586'
git switch 'upstream-pr/4586'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4586'
git switch 'upstream-pr/4586'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4586'
git switch 'main'
git merge --squash 'upstream-pr/4586'
git switch 'main'
git merge --ff-only 'upstream-pr/4586'
git switch 'main'
git merge 'upstream-pr/4586'
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
trustno1-coder/VIctory-NVIDIA!4586
No description provided.