Input, UI: add mouse and keyboard controls and F1 key bindings editor #52
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/52"
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?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T15:10:21Z.
Summary
Ported from
trustno1-coder/VIctory-NVIDIA(4715a42,2a66ef1,f4608f0; originallyItsMK1/VIctory-MnK-patches) to add configurable Mouse & Keyboard controls alongside an in-game F1 Key Bindings editor:bindings.ini(explicitly allowlisted by name inxtask/src/policy.rs) and launcher setup inapps/victory/src/play.rsto write%LOCALAPPDATA%\victory\bindings.inion first run whenVICTORY_MNK=1.crates/victory-hle/src/modules/mnk.rsand wired it intogameinput.rs(filtered mouse look velocity -> right stick + remappable keys/buttons, suppressed while F1 menu is open, live-reloaded viavictory_gpu::MNK_BINDINGS_CHANGED) andlifecycle.rs(WM_SETCURSORhides cursor during gameplay and restoresIDC_ARROWwhile F1 menu is open).MOUSE AND KEYBOARDtoggle (VICTORY_MNK) and interactiveKEY BINDINGS (MOUSE AND KEYBOARD)submenu to the F1 settings overlay incrates/victory-gpu/src/host/menu.rs.Rig Specs Tested On
Run Settings & Profile
diag@9880a47(after verifying plain--releasehas zero non-system MinGW DLL imports)series-s— 720p (0.6666667)offDLSS qualityoffVICTORY_*Overrides:verify-world.ps1default-off MnK regression run (VICTORY_MNKunset; all defaults)draws >= 500), 75s capture across 16 world windowsMeasurements & Verification
10.18mean /11.6median (min1.9, p106.8, max draws12125; vs baseline8.9fps median)5876.0 MBmedian /5894 MBmax against6890 MBmin budget (0 MBover budget,room=false8.3%; baseline5864 MBmax)0(no_host_texture_errors=0,final_waiting=1587vs7121baseline,mapped_rate=34.96 ms/s,median_dropped_no_pipeline=255.5vs261.0baseline,lit=19/24,luma=103.45,edge_energy=7.05,magenta=0.0%; all 11/11 verifier gates PASS)cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy(299 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy -p victory-hle -p victory-gpu -p victory --features diagnostics --all-targets -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-hle --lib -- --test-threads=1(186 passed; 0 failed; 3 ignored, incl.mnk::tests::continuous_motion_and_releaseandmnk::tests::shipped_profile_maps_triggers_and_vehicle)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib host::menu::tests -- --test-threads=1(5 passed; 0 failed, incl.key_bindings_are_shown_and_written)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory --bin victory(23 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu build -p victory --release+objdump -p(0non-system MinGW DLLs)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T18:50:07Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Clean, well-structured port of Mouse & Keyboard controls and the in-game F1 Key Bindings editor. CI is passing and unit tests cover binding parsing, mouse-look velocity/dead-zone smoothing, and F1 key-bindings menu layout/editing.
Verified Changes
apps/victory/src/play.rs,bindings.ini,xtask/src/policy.rs):bindings.iniand writes it to%LOCALAPPDATA%\victory\bindings.inion first launch whenVICTORY_MNK=1(unlessVICTORY_MNK_BINDINGSis already overridden via--set)."bindings.ini"inxtask/src/policy.rs(ALLOWED_NAMES).crates/victory-hle/src/modules/mnk.rs,gameinput.rs,lifecycle.rs):mnk::sample()interceptsgameinput::fallbackwhenVICTORY_MNK_BINDINGSis configured, suppresses XInput inHost::xinput, resets mouse state and returns zeroedPadStatewhilevictory_gpu::SETTINGS_MENU_OPENis set or focus is lost, and guards against initial camera jumps viam.centered.bindings.iniwhenvictory_gpu::MNK_BINDINGS_CHANGEDincrements, retaining the previous valid config if a reload fails.lifecycle::window_prochandlesWM_SETCURSORinHTCLIENTwhen MnK is enabled and the window is foreground, hiding the cursor during gameplay and restoringIDC_ARROWwhile the F1 menu is open.crates/victory-gpu/src/host/menu.rs,crates/victory-gpu/src/lib.rs):MOUSE AND KEYBOARD(VICTORY_MNK) toITEMSandKEY BINDINGS (MOUSE AND KEYBOARD)(BINDS = 4) toACTIONS.binds::Bindssafely captures key/mouse presses (1..255, excludingEscandF1), maps them to names matchingmnk::key, adjusts mouse sensitivity (0.015..1.5), and writes back tobindings.inibefore bumpingMNK_BINDINGS_CHANGED.Why Local GPU Test Is Needed
The PR touches the D3D12 host F1 overlay (
crates/victory-gpu/src/host/menu.rs) and launcher (apps/victory/src/play.rs), and the reportedverify-world.ps1run only exercised the default-off path (VICTORY_MNKunset). Before merging, run a brief interactive real-GPU smoke test withVICTORY_MNK=1to verify cursor hiding/restoration on F1 toggle, mouse-look camera control, and live key rebinding in-world.Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T01:20:00Z.
Rebased onto latest
main(6e935d7) and resolved the merge conflict incrates/victory-gpu/src/host/menu.rs(including addingbinds: Nonetothe_picture_line_is_the_consoles).Local Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy: passed (303 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask:6/6passedcargo +1.98.1-x86_64-pc-windows-gnu clippy: both passes0warningscargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib host::menu:6/6passedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-hle --lib:189/189passedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory:25/25(census2/2) passed--releasebuild (objdump -pWindows system DLLs only) and--features diagnostics --releasebuild: both succeededLive GPU Run (
pr52-rebased, 75s)10.35 fps,5245 MBmax VRAM,1 mshost copies,10-15 msviews,0crashes,102.16luma,1.49%near-black, visually clean frames (frame-10168.png,frame-10512.png).final_waiting=7781(vs7121baseline) occurred during a host DXGI VRAM budget dip down to5804 MB(room_false=31.2%), unrelated to the mouse/keyboard/menu changes in this PR.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T07:42:47Z.
Completed live 75s Series S GPU verification on
c6ae4aa(pr52-mouse-and-keyboard): 11/11 gates PASS.12.0 fps(83.6 ms, vs8.9 fpsbaseline,+3.10 fps)5927 MB/6958 MBbudget (over=0 MB)1774(vs7121baseline) |mapped()stall rate:7.28 ms/s(max 24.6 ms)untranslated=1| Crashes / host texture errors:0/0--release+objdump -p: standard Windows system DLLs onlyframe-10982.png,frame-11022.png, median luma105.28, edge energy7.11,0.0%magenta): clean daylight rendering with no input/menu regressions or crashes.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T14:04:35Z.
Human RTX 4060 Ti 8 GB playtest update (holding merge pending keybind rebind check):
VICTORY_MNK=1, 0 crashes / 0 DRED).KEY BINDINGS (MOUSE AND KEYBOARD)sits at the very bottom of the scrolled F1 action list (below ~20 setting rows, right aboveCLOSE). Moving it higher or right next toMOUSE AND KEYBOARDwould make it much easier to discover.no room for new ones so_far=87000while Frame Gen 2x lowered VRAM budget to ~6662 MB), unrelated to this PR.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T16:41:49Z.
Now conflicts with updated
mainafter Wave 4 / PR #74 merged. Please rebase onto latestmain.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T17:40:01Z.
Human RTX 4060 Ti 8 GB playtest PASSED (
wave2-interactive.cmd+wave3-interactive.cmd):VICTORY_MNK=1) verified working.KEY BINDINGS (MOUSE AND KEYBOARD)rebinding verified working in-game.Hardware GPU/UI testing is complete. This PR only needs a rebase onto latest
main(apps/victory/src/play.rsafter PR #74 merged) with green CI to be ready for merge.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T17:51:16Z.
Rebased onto
origin/main(9d8b3646) at78fe0bfa, resolving theapps/victory/src/play.rsconflict withsettings_with_vram.Local Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy:307 files okcargo +1.98.1-x86_64-pc-windows-gnu test -p victory --locked -- play:::15 passed; 0 failedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-hle --locked -- mnk:::2 passed; 0 failedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --locked -- menu:::6 passed; 0 failedclippy --all-targets -- -D warnings(default and--features diagnostics): 0 warningsImported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T21:07:15Z.
Rebased cleanly onto
mainwith passing CI after human RTX 4060 Ti sign-off on M&K gameplay and F1 Key Bindings rebinding. Squash-merging now.