Mouse and keyboard: GTA V-style layout with on-foot and vehicle layers and an F5 editor #1739
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1739
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1739"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@wissser on GitHub · 2026-11-28 23:49 UTC · original
wissser:pc-mouse-keyboard→main· +2202 −691 · 11 files · 1 commits · openSummary
This replaces the current mouse and keyboard support (
mnk.rs+bindings.ini, F1 KEY BINDINGS) with a fuller one, laid out like GTA V on PC:It still goes through the stand-in pad: every key and mouse button stands for a pad control, and mouse motion becomes the right stick. The game sees a normal controller, so menus, driving, aiming and vehicle controls behave as on a pad. Real pads keep working alongside it.
Screenshots: the F5 overlay
Press F5 in game. The overlay shows each key's action on the current layer, the selected key's full meaning on both layers, and a list of every action with all its keys.
On-foot layer
Vehicle layer
The images are rendered from the overlay's own drawing code at 2× scale, using the test
painted_in_every_swap_chain_formatwithVICTORY_KEYS_PREVIEW=<file>. The asset policy doesn't allow images in this repo, so they're hosted on my fork.Default controls (GTA V–style)
Both layers
On foot
In a vehicle
Switching layers: the get-in/out key (F by default, changed with K in F5) switches to the other layer as the game gets in or out. Presses less than 1.5 s apart don't switch again, so a double tap can't put the layer out of step. Caps Lock switches the layer by hand if it ever does get out of step.
Keyboard layouts: letter keys are read by their position (scan code), the same way the stand-in pad already reads its letters (
e68f48a), but for all 26 letters. So WASD stays in the same place on AZERTY, QWERTZ and other layouts.F5 editor keys
While the overlay is open, keys go to the editor and not to the game, the mouse's buttons and motion are held back, and the pointer is free (the same as F1, #32 and
f4608f0). A small notice in the corner shows when the layer switches during play.Saving: each change is saved at once as
keyboard <name>.txt, withkeyboard active.txtnaming the layout in use. Files go in the sharedSavesfolder beside the game (VICTORY_SAVE_SHARE, set by the launcher), otherwise in%LOCALAPPDATA%\victory\keyboard. They're plain text and can be edited by hand. Lines that can't be read are skipped.Mouse
Settings
VICTORY_KBM0= off)VICTORY_KBM_SENS1(0 – 20)VICTORY_KBM_INVERT_Y1= on)VICTORY_KBM_DEADZONE0.2(0 – 0.9)VICTORY_MOUSE_CAPTURE0/1force it)VICTORY_MOUSE_WARP0/1force it)With
VICTORY_KBM=0, the stand-in pad goes back to its fixed key table and mouse capture is opt-in again, as before.What's removed and why
The two systems both drive the stand-in pad, so keeping both would give two competing F1 options. This one covers everything the old one does: rebinding any key or mouse button, and sensitivity. It adds per-layer bindings, an in-game editor and GTA V defaults.
crates/victory-hle/src/modules/mnk.rsgameinput.rskbm()/stand_in()bindings.ini(repo root), its launcher setup inplay.rsand its asset-policy exception inxtask/src/policy.rsSaves, written by the gameVICTORY_MNK) + KEY BINDINGS list (menu.rsbinds)MNK_BINDINGS_CHANGEDmnk::enabled()turning XInput pads offFor current
VICTORY_MNK=1users: theirbindings.iniis no longer read. Mouse and keyboard comes on by default with the GTA V layout, and F5 rebinds it.Thanks to ItsMK1 (VIctory-MnK-patches) for the original mouse and keyboard work this builds on.
Changes by file
crates/victory-gpu/src/keymap.rs(new)crates/victory-gpu/src/host/keys.rs(new)crates/victory-gpu/src/host.rscrates/victory-gpu/src/host/menu.rscrates/victory-gpu/src/lib.rskeymap. DropsMNK_BINDINGS_CHANGED.crates/victory-hle/src/modules/gameinput.rsmnk.crates/victory-hle/src/modules/lifecycle.rsapps/victory/src/play.rs,xtask/src/policy.rs,bindings.ini,mnk.rsTesting
cargo clippy --workspace --all-targets: no warnings in the files this PR touches. The warnings that remain were already onmain, for example invictory-shaderlower.rs,send.rs,streamline.rsandresource.rs.cargo test --workspace --release: all pass, 666 tests. The exception isdescriptor::host::tests::views_off_their_elements_get_a_copy_of_their_bytes, which is flaky onmainwithout this change (it passed 2 of 3 reruns here; it's GPU-dependent and in code this PR doesn't touch).a_layout_reads_back_as_written,the_default_is_gta_v_on_gta_vi,every_name_is_short_and_known,unknown_lines_are_passed_overevery_line_fits_and_every_character_has_a_picture,the_list_has_each_action_once_with_all_its_keys,every_key_lies_in_the_box_and_none_overlap,painted_in_every_swap_chain_format,the_switch_notice_fits_its_corner,keys_move_the_pick_and_change_the_layoutthe_pc_layout_puts_keys_and_mouse_buttons_on_the_pad,the_pc_layout_takes_gta_v_keys_over_the_stand_in_pad,mouse_motion_turns_the_right_stick_past_the_dead_zone_and_settles,caps_lock_toggles_driving_on_the_stand_in_padmainpasses the tests above but hasn't been played onmainyet.🤖 Generated with Claude Code
github-bot referenced this pull request2026-11-29 13:06:17 +00:00
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.Merge
Merge the changes and update on Forgejo.