hle/gameinput: rebindable keyboard+mouse and the player's keys in prompts (VICTORY_MNK=1) #119
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!119
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-118"
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?
@SovietBearz0r on GitHub · 2026-12-05 13:17 UTC · original
SovietBearz0r:sixmoon-mnk→main· +8220 −572 · 62 files · 50 commits · openRebindable keyboard and mouse, and the player's own keys in the title's button prompts:
VICTORY_MNK=1(opt-in; unset/0 keeps the built-in stand-in keys).What
bindings.iniat%LOCALAPPDATA%\revictory\bindings.ini(overrideVICTORY_MNK_BINDINGS=<path>, shipped defaults generated on first start, never overwritten):action = key, key, ...lines for every pad control, mouse buttons (Mouse1..5), wheel as pseudo keys (WheelUp/Down), key aliases/named keys/0xNN, modifier families (either-side Shift/Ctrl/Alt, or a specific side),Sensitivity(0.135 reproduces the old feel). File read once per run; invalid lines/duplicates handled with warnings.F2/`toggles,Esc/Preleases the cursor with the pause menu; with a pad in use it stays off until asked for.use_bound_keyshook (all 24 controls supplied, unbound actions fall back to the built-in keys; wheel getsW↑/W↓caps). Prompt style is unchanged unless the launcher already says Keyboard.VICTORY_KBM_GTA=1keeps the old fixed layout exactly (deprecated) so existing users do not silently change behaviour.Verification
cargo test -p victory-hle --lib: 283 passed, 1 ignored (10 new bindings tests + a stand-in-pad integration test; existing gameinput tests green).cargo test -p victory prompts: 60 passed (updated bound-key caps).cargo check -p victory,cargo xtask policy, clippy (no new warnings): clean.VICTORY_MNK=0/VICTORY_KBM_GTA=1/custom path/missing-file paths. Known gaps: stick emulation (not native PC aim), no auto vehicle throttle on W/S, file applied on next start (no F1 Controls editor yet), mouse clicks on window chrome are not edge-captured.Deliberately not ported: sixmoon's native
mousehook.rscamera hook (same category as the xmem native-input candidate, which the report shows is distinct, not a dedupe: title-side RAGE input hooking, native vehicle throttle, frontend mouse cursor; deferred as its own later item).Source: srmooon/sixmoon tip
79d7529(mnk.rs,bindings.ini,mousehookexcluded), prompts commit7d2ea2092.@ReTerryDavis on GitHub · 2026-12-05 17:39 UTC · original
Super clean rebindable M+K + prompt integration! Marking as draft for two small input edge-case fixes before merge:
F2(crates/victory-hle/src/modules/gameinput.rs,Host::bindings_look_toggle): PressingF2/`setsself.user_lock = Some(true). PressingEscorPthen setsself.pause_unlocked = trueandself.mouse_locked = falsewithout clearingself.user_lock, so a few lines later in the same polllet want = self.user_lock.unwrap_or(...)evaluates totrueand immediately re-locks the cursor (same loop ifrecenter_cursorfails inmouse_look_step). Clearingself.user_lock = NoneonEsc/P(and onrecenter_cursorfailure) fixes both.Host::mouse_keys): PollingGetAsyncKeyState(0x01..=0x06)wheneverfocused()withoutin_clientorself.mouse_buttons.update(...)edge-gating (unlikegta_mouse_pad) allows clicks on the title bar/borders or closing F1 to fireRT/LTinto the game.Mark ready once those two are fixed and we'll merge!
@SovietBearz0r on GitHub · 2026-12-05 18:52 UTC · original
Both input edge cases fixed:
Esc/P(and arecenter_cursorfailure) now clearuser_lockso the same-pollwantcannot re-lock the cursor;mouse_keysrequires foreground + in-client press start (edge-gated, 5 buttons, shared with the fixed-GTA path), so title-bar/border/F1 clicks no longer fire RT/LT. Pure tests for both. Marking ready.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.