Input: add opt-in GTA V PC-style keyboard and mouse mapping (VICTORY_KBM_GTA) #295
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/295"
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 Belobug/VIctory-Belobug-AMD. Originally posted by zhu1025960209-web on 2026-11-26T19:23:10Z.
Summary
Adds an optional GTA V PC-style keyboard and mouse control scheme for the GameInput stand-in gamepad behind
VICTORY_KBM_GTA=1(disabled by default so existing keyboard bindings and tests remain unchanged).Works alongside
VICTORY_ONE_PAD(default on) and can be enabled viascripts\play.ps1 -More @{VICTORY_KBM_GTA='1'}.Controls (
VICTORY_KBM_GTA=1)WASDF2or`/~to lock) /IJKLLMB/RMBRT/LTShift/EnterASpace/XXR/BackspaceBFYTabLBQRBCtrlL3C/MMB/CapsLock/HR3E/Right,Up/M,Down/Z,Left/GVViewEsc/PMenuEnvironment Variables
VICTORY_KBM_GTA=1: Enables the GTA V PC keyboard + mouse layout on the stand-in pad.VICTORY_MOUSE_SENS: Mouse camera sensitivity multiplier (default1.0).VICTORY_MOUSE_INVERT_Y=1: Inverts the vertical mouse axis.Implementation Details
F2or`(~) to toggle capture; pressingEsc,P, or losing window focus automatically unlocks the cursor.MouseLook): Applies time-aware exponential decay (45 ms half-life) with deadzone snapping so quick flicks remain visible across low-framerate 3D frames and settle cleanly to zero when stationary.SetCursorPosas the next delta anchor, avoiding phantom camera drift under fractional Windows DPI scaling.windows-sysfeatures (Win32_Foundation,Win32_UI_Input_KeyboardAndMouse,Win32_UI_WindowsAndMessaging) and documents the new switches inREADME.md.Testing
cargo test -p victory-hle --locked --lib gameinput(9 passed, 0 failed)cargo test -p victory-hle --all-features --locked --lib gameinput(9 passed, 0 failed)cargo test -p xtask --locked(9 passed, 0 failed, includingrepository_passes_policyanddocumented_switches_are_read)Imported from Belobug/VIctory-Belobug-AMD. Originally posted by MamaLeVrai on 2026-11-26T20:45:51Z.
Tested on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release, at
ad0e5d5:cargo test --release -p victory-hle --lib160 passed, 0 failed, 2 ignored (cd8dfc0: 159 passed). Not played in the game.AI-assisted (Claude Code); no game data.