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

Open
github-bot wants to merge 1 commit from github-bot/gh-4586 into main AGit
Owner

@⁠Thiagojm on GitHub · 2026-11-30 23:17 UTC · original
Thiagojm:mnk-shooter-layout → main · +100 −77 · 6 files · 1 commits · open

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

**@⁠Thiagojm** on GitHub · 2026-11-30 23:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4586) `Thiagojm:mnk-shooter-layout` → `main` · +100 −77 · 6 files · 1 commits · open ## 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)
The stand-in pad's main keys (and with them the keyboard prompts) 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. They follow the title's
on-foot, aiming and vehicle control screens now: LMB/RMB shoot/aim, Space
jump/handbrake, LCtrl rest/crouch, Mouse4 melee, F interact/exit vehicle,
LShift run, MMB look behind, Q/E loadout/cover kept, 1-4 the D-pad.

Every earlier key still works as an extra (Enter, Backspace, X, Y, H, the
arrows, Z as the left trigger); C and R press B (crouch, reload), and G is L3
for the horn/nitrous at the wheel, where both Shifts and Ctrls pitch. Mouse4
presses X in gameplay. At the wheel bindings.ini's Shift/Ctrl keys pitch too,
as the table's do. The shipped bindings.ini follows the same layout, with
0xA0/0xA2 for Shift/Ctrl: the native mouse path reads the left and right
modifier keys apart, so plain "Shift"/"Ctrl" never matched there. README
lists the new keys.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 23:19:37 +00:00
Author
Owner

@⁠tyr0nsur on GitHub · 2026-11-30 23:24 UTC · original

Related change in #4589. 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 #4589 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.

**@⁠tyr0nsur** on GitHub · 2026-11-30 23:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4586#issuecomment-7295079264) Related change in #4589. 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 #4589 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.
github-bot force-pushed github-bot/gh-4586 from 13f3627b15 to d7c5ad7ee3 2026-12-01 01:30:25 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4586'
git switch 'github-bot/gh-4586'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4586'
git switch 'github-bot/gh-4586'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4586'
git switch 'main'
git merge --squash 'github-bot/gh-4586'
git switch 'main'
git merge --ff-only 'github-bot/gh-4586'
git switch 'main'
git merge 'github-bot/gh-4586'
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!4587
No description provided.