Input: mouse look, mouse buttons and key rebinding for keyboard play #82
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/82"
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 DexNom/VIctory. Originally posted by 3cvil on 2026-11-26T16:28:10Z.
What
GTA VI reads a gamepad and a keyboard and never asks GameInput for a mouse. Keyboard play goes through the keyboard's stand-in pad, which had no mouse and used I/J/K/L for the camera. This makes that pad behave more like PC controls.
VICTORY_MOUSE_LOOK=0turns it off.VICTORY_MOUSE_SENSITIVITYscales it.VICTORY_KEYBINDS=Space=X,LShift=A,Mouse4=LB,Enter=Nonemaps keys and mouse buttons to pad buttons or triggers. Each entry replaces what that key did. An entry that can't be read is left out with a warning.docs/keyboard-and-mouse.mdlists the layout and settings.What it does not do
The prompts the title draws stay gamepad prompts. The title picks its own glyphs and has no keyboard/mouse mode to switch to.
Tests
mouse_buttons_pull_the_triggers_and_movement_turns_the_right_stick,keybinds_replace_what_a_key_did. All 14gameinputtests pass.cargo clippy --all-targets -D warningsis clean with and withoutdiagnostics.cargo xtask policyis OK.🤖 Generated with Claude Code
Imported from DexNom/VIctory. Originally posted by andrewDoing on 2026-11-26T22:59:43Z.
I reproduced a stale camera deflection when returning to mouse input after a long interval without polling at
eb54094. In the actualHost::mousepath, the ≥100 ms gap suppresses new mouse delta but retainsself.look. With focused/window-centered cursor queries fixed in a test fixture, a prior(1, -0.5)look and a simulated 10-second gap produced(0.5, -0.25)despite a centered, motionless cursor. The fallback is not polled while the physical pad is active (gameinput.rs:591), so switching back can preserve the old look.In a scratch control, clearing
self.lookin the ≥100 ms/no-last-poll branch made this regression and all 12 default-featuregameinput-filtered tests pass. No physical controller or cursor was manipulated, and gameplay was not tested.Verification was AI-assisted with GPT-6.2 Astra.
Imported from DexNom/VIctory. Originally posted by Yoshi-233 on 2026-11-27T01:11:55Z.
I checked a second camera case on
eb54094while comparing the mouse-look behavior with CGBJ #7. The existing long-gap report starts with a carried deflection. This one starts with a neutral stick and two polls just 8 ms apart.With the focused window initially centered at
(400, 300), the first poll establishes that center. For the second poll I left the cursor at(400, 300)and changed only the window center to(440, 300). The realHost::mouseandlookbodies returned(-1.0, 0.0)at sensitivity 1. Shifting the center 40 px left, up or down also saturated the corresponding stick axis. With a stationary window, no motion produced(0, 0)and a real 5 px move to the right produced(0.25, 0)as expected.The delta currently uses the new window center as its origin. Keeping the previous successful recenter coordinates as the origin, then recentering on the new window center, gave zero in all four stationary-pointer cases. It also preserved
+0.25when a real 5 px move and a 40 px center shift happened together. A resize or reposition while polling is a useful native Windows regression case.I ran the PR’s Rust control flow in a Linux harness with the Win32 cursor/window queries and clock supplied by the fixture. No physical window or game was driven in this check.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.