Input: keyboard and mouse played like a PC game (mouse look, rebindable [controls]) #577

Closed
github-bot wants to merge 3 commits from gh-pr/577/head into gh-pr/577/base
Owner

@⁠claude-GTA6 on GitHub · 2026-11-25 02:28 UTC · original
claude-GTA6:pr-fx-kbm → main · +2002 −60 · 10 files · 3 commits · closed without merging

From a tester working with Claude (AI-assisted); measured on my own machine.

What

Keyboard and mouse played like a PC game: mouse look, the usual PC key layout, and a [controls] section to rebind it. Today the keyboard only works as the fixed stand-in pad, only while no controller is connected, and there is no mouse at all.

The title registers device callbacks for gamepads and keyboards only, never for a mouse, so it has no mouse path of its own. The keyboard and mouse therefore act as a pad: on the first connected host pad, or on the stand-in pad when none is connected.

  • Mouse look. Raw input (WM_INPUT on a message-only window of its own thread: no pointer acceleration, no Windows setting involved) becomes the right stick. The title reads its stick as a turn rate, so the counts since its last pad read are divided by the time since that read, at that read. The same hand movement then asks for the same turn at any frame rate, as long as the title applies its stick over its real frame time (not verified at today's 0.5-2 s world frames; see Tested). A flick past full stick is turned in full a little later (at most 100 ms of carry). stick_deadzone / stick_curve can undo the title's own stick shaping (defaults 0 / 1, not calibrated yet).
  • Cursor. Hidden and held in the client area while the title window has focus. Alt-Tab or Esc frees it, a click or Esc captures it again; the click that captures is not passed on as a shot.
  • Layout. W A S D, Left Alt walk, Shift, Space, F, R, Q, E, Ctrl, C, V, Tab, mouse buttons on the triggers, the wheel, arrows, Enter/Backspace, Esc/P, each on the pad button that does the same on a console. F also switches to a vehicle layout (W/S on the triggers, A/D steer) and G switches it alone. The console meaning of each button follows the previous game's layout and is unverified for this title.
  • Keys by position. Letters, digits and punctuation are the keys at their places on a US keyboard (scan codes), so the left stick is Z Q S D on an AZERTY keyboard with no setup. keys_by_position = false matches by letter.
  • Pad and keyboard/mouse together. Buttons are ORed, triggers take the max, and each stick comes from whichever device moved it last. A pad stick counts only past 0.2 (detection only; its raw value is passed on), so a resting pad's drift never takes the camera from the mouse.
  • Taps shorter than a frame. Presses and wheel steps stay down until the title has read them once, so a quick tap still counts at 1-2 fps.
  • [controls] in victory.toml. Sensitivity, vertical scale, invert Y, capture, carry, dead zone, curve, walk speed, and [controls.on_foot] / [controls.vehicle] rebinding (one output, a list, or "" to unbind). Unknown keys, outputs and fields are errors at start. enabled = false keeps the old stand-in pad exactly as it is. See victory.example.toml and the README's input section.
  • Diagnostics. VICTORY_KBM=<s>:<key>[*<hold>],<s>:MouseX=<counts>[*<hold>] plays input into this layer without touching OS input; VICTORY_LOG=victory_hle::modules::gameinput=debug logs each pad state the title reads when it changes. The scripted VICTORY_KEYS keep their meaning, including this tree's press on pad 0.

New file crates/victory-hle/src/modules/controls.rs (plain data, no Windows calls; the unit tests live there). gameinput.rs feeds it from the poll thread and drains it when the title reads a pad; lifecycle.rs's window hook handles the cursor; victory-core's config passes the [controls] table through. One commit on main a803c87c.

This is the same change as Marvisak/VIctory#1529 (approved there), rebased onto this tree, plus the position-based keys.

How it relates to the open keyboard PRs here

  • #74 (keyboard controls keep working with a controller connected): this covers the same need, since the keyboard and mouse always reach the first connected pad, and adds the "last device to move a stick owns it" rule. The two overlap in gameinput.rs's poll and conflict textually; with both, #74 would still be what makes the old stand-in table (enabled = false) reach a connected pad.
  • #105 (keys by physical position): same idea, and this PR does it for the [controls] layout too. #105's code merges with this one; only the README table conflicts. #105 is still what fixes the stand-in pad's own table.
  • #359 (VICTORY_KEYBOARD_PAD for phantom XInput devices): with this PR the keyboard and mouse ride on whatever pad slot is connected, so a phantom controller no longer silences the keyboard. I have not tested a phantom device. Conflicts in gameinput.rs (the stand-in condition).
  • #369 (neutral state for non-gamepad readings): unrelated in behaviour; it touches gamepad_state, where this PR adds a log line, so a small textual conflict.

I'm glad to rebase onto whichever of these lands first.

Tested

  • Windows 11, RTX 5090. cargo test -p victory-hle -p victory-core: 114 + 11 pass. cargo clippy -p victory-hle -p victory-core --all-targets -- -D warnings: clean. cargo xtask policy: ok. Other crates are untouched.
  • 14 unit tests in controls.rs (WASD + walk, buttons and triggers, vehicle layout, sub-frame taps, wheel pulses, counts to rate, slow frames, close reads, dead zone/curve/invert, flick carry, pad drift against the mouse, keys by position, config rebinding and refusals) and 4 in gameinput.rs (the stand-in pad without a host pad, riding on a connected host pad, a pad read carrying the mouse motion, an AZERTY key at the W place).
  • In game, on this tree (one 15-minute run of this branch, cold cache, a real pad connected, scripted input through VICTORY_KBM, no device loss): the pad state the title read (717 logged reads, pad slot 0) showed the right stick at +0.30 +/- 0.02 on x for each window of 600 mouse counts/s to the right (2,000 counts/s is a full stick), +0.30 on y for 600 counts/s upward, and the left stick at +1.0 for each press of W. The scripted start-screen presses still reached the world with keyboard and mouse on.
  • The camera follows it. In nine captured frames of the opening scene (the cell window, one frame every ~50 s, at ~2 fps), the watchtower outside moves left by 2.7 to 9.9 px per interval, and that shift follows the seconds of scripted mouse look in the interval (correlation 0.90) and not the clock (-0.10); the window frame's edge gives 0.89 against 0.01. So the view turns right while the mouse moves right and rests while it rests.
  • It turns very little, though: about 57 px (under 2 degrees) for 200 s at a 0.3 stick. Three explanations fit and this run cannot tell them apart: the title's own stick dead zone and curve (what stick_deadzone / stick_curve are for), a limited look-around in that scene, or the title capping its time step at 2 fps (then the same-angle-at-any-frame-rate property only holds at playable frame rates). I have not calibrated the two settings yet.
  • On the upstream base (#1529), with a real pad connected, a scripted run showed every input in the pad state the title read: W -> left stick +1, 2,000 counts/s -> right stick +1.0, Space -> X, right mouse -> LT 1.0, one wheel step -> one D-pad press and release, Tab -> LB, a fast flick -> -1.0, -0.4 (carry), 0.

Not covered

  • Camera feel with a real hand on a real mouse. The title's dead zone and response curve aren't measured, so the two inverse settings are at their neutral defaults, and the run above suggests small mouse movements turn far too little until they are set.
  • The console meaning of each button in this title; the defaults follow the previous game's layout.
  • On-foot against in-vehicle is switched by the F and G keys, not read from the title.
  • Button prompts stay controller glyphs (they are the title's UI assets).
  • Non-Windows hosts get no mouse (the raw-input thread is Windows only); the mapping layer itself is portable, but I did not build or run this natively on Linux.

🤖 Generated with Claude Code

**@⁠claude-GTA6** on GitHub · 2026-11-25 02:28 UTC · [original](https://github.com/fxceless/victory-fork/pull/577) `claude-GTA6:pr-fx-kbm` → `main` · +2002 −60 · 10 files · 3 commits · closed without merging *From a tester working with Claude (AI-assisted); measured on my own machine.* ## What Keyboard and mouse played like a PC game: mouse look, the usual PC key layout, and a `[controls]` section to rebind it. Today the keyboard only works as the fixed stand-in pad, only while no controller is connected, and there is no mouse at all. The title registers device callbacks for gamepads and keyboards only, never for a mouse, so it has no mouse path of its own. The keyboard and mouse therefore act as a pad: on the first connected host pad, or on the stand-in pad when none is connected. - **Mouse look.** Raw input (`WM_INPUT` on a message-only window of its own thread: no pointer acceleration, no Windows setting involved) becomes the right stick. The title reads its stick as a turn rate, so the counts since its last pad read are divided by the time since that read, **at that read**. The same hand movement then asks for the same turn at any frame rate, as long as the title applies its stick over its real frame time (not verified at today's 0.5-2 s world frames; see Tested). A flick past full stick is turned in full a little later (at most 100 ms of carry). `stick_deadzone` / `stick_curve` can undo the title's own stick shaping (defaults 0 / 1, not calibrated yet). - **Cursor.** Hidden and held in the client area while the title window has focus. Alt-Tab or Esc frees it, a click or Esc captures it again; the click that captures is not passed on as a shot. - **Layout.** W A S D, Left Alt walk, Shift, Space, F, R, Q, E, Ctrl, C, V, Tab, mouse buttons on the triggers, the wheel, arrows, Enter/Backspace, Esc/P, each on the pad button that does the same on a console. F also switches to a vehicle layout (W/S on the triggers, A/D steer) and G switches it alone. The console meaning of each button follows the previous game's layout and is unverified for this title. - **Keys by position.** Letters, digits and punctuation are the keys at their places on a US keyboard (scan codes), so the left stick is Z Q S D on an AZERTY keyboard with no setup. `keys_by_position = false` matches by letter. - **Pad and keyboard/mouse together.** Buttons are ORed, triggers take the max, and each stick comes from whichever device moved it last. A pad stick counts only past 0.2 (detection only; its raw value is passed on), so a resting pad's drift never takes the camera from the mouse. - **Taps shorter than a frame.** Presses and wheel steps stay down until the title has read them once, so a quick tap still counts at 1-2 fps. - **`[controls]` in `victory.toml`.** Sensitivity, vertical scale, invert Y, capture, carry, dead zone, curve, walk speed, and `[controls.on_foot]` / `[controls.vehicle]` rebinding (one output, a list, or `""` to unbind). Unknown keys, outputs and fields are errors at start. `enabled = false` keeps the old stand-in pad exactly as it is. See `victory.example.toml` and the README's input section. - **Diagnostics.** `VICTORY_KBM=<s>:<key>[*<hold>],<s>:MouseX=<counts>[*<hold>]` plays input into this layer without touching OS input; `VICTORY_LOG=victory_hle::modules::gameinput=debug` logs each pad state the title reads when it changes. The scripted `VICTORY_KEYS` keep their meaning, including this tree's press on pad 0. New file `crates/victory-hle/src/modules/controls.rs` (plain data, no Windows calls; the unit tests live there). `gameinput.rs` feeds it from the poll thread and drains it when the title reads a pad; `lifecycle.rs`'s window hook handles the cursor; `victory-core`'s config passes the `[controls]` table through. One commit on `main` a803c87c. This is the same change as Marvisak/VIctory#1529 (approved there), rebased onto this tree, plus the position-based keys. ## How it relates to the open keyboard PRs here - **#74** (keyboard controls keep working with a controller connected): this covers the same need, since the keyboard and mouse always reach the first connected pad, and adds the "last device to move a stick owns it" rule. The two overlap in `gameinput.rs`'s poll and conflict textually; with both, #74 would still be what makes the old stand-in table (`enabled = false`) reach a connected pad. - **#105** (keys by physical position): same idea, and this PR does it for the `[controls]` layout too. #105's code merges with this one; only the README table conflicts. #105 is still what fixes the stand-in pad's own table. - **#359** (`VICTORY_KEYBOARD_PAD` for phantom XInput devices): with this PR the keyboard and mouse ride on whatever pad slot is connected, so a phantom controller no longer silences the keyboard. I have not tested a phantom device. Conflicts in `gameinput.rs` (the stand-in condition). - **#369** (neutral state for non-gamepad readings): unrelated in behaviour; it touches `gamepad_state`, where this PR adds a log line, so a small textual conflict. I'm glad to rebase onto whichever of these lands first. ## Tested - Windows 11, RTX 5090. `cargo test -p victory-hle -p victory-core`: 114 + 11 pass. `cargo clippy -p victory-hle -p victory-core --all-targets -- -D warnings`: clean. `cargo xtask policy`: ok. Other crates are untouched. - 14 unit tests in `controls.rs` (WASD + walk, buttons and triggers, vehicle layout, sub-frame taps, wheel pulses, counts to rate, slow frames, close reads, dead zone/curve/invert, flick carry, pad drift against the mouse, keys by position, config rebinding and refusals) and 4 in `gameinput.rs` (the stand-in pad without a host pad, riding on a connected host pad, a pad read carrying the mouse motion, an AZERTY key at the W place). - In game, on this tree (one 15-minute run of this branch, cold cache, a real pad connected, scripted input through `VICTORY_KBM`, no device loss): the pad state the title read (717 logged reads, pad slot 0) showed the right stick at +0.30 +/- 0.02 on x for each window of 600 mouse counts/s to the right (2,000 counts/s is a full stick), +0.30 on y for 600 counts/s upward, and the left stick at +1.0 for each press of W. The scripted start-screen presses still reached the world with keyboard and mouse on. - The camera follows it. In nine captured frames of the opening scene (the cell window, one frame every ~50 s, at ~2 fps), the watchtower outside moves left by 2.7 to 9.9 px per interval, and that shift follows the seconds of scripted mouse look in the interval (correlation 0.90) and not the clock (-0.10); the window frame's edge gives 0.89 against 0.01. So the view turns right while the mouse moves right and rests while it rests. - It turns very little, though: about 57 px (under 2 degrees) for 200 s at a 0.3 stick. Three explanations fit and this run cannot tell them apart: the title's own stick dead zone and curve (what `stick_deadzone` / `stick_curve` are for), a limited look-around in that scene, or the title capping its time step at 2 fps (then the same-angle-at-any-frame-rate property only holds at playable frame rates). I have not calibrated the two settings yet. - On the upstream base (#1529), with a real pad connected, a scripted run showed every input in the pad state the title read: W -> left stick +1, 2,000 counts/s -> right stick +1.0, Space -> X, right mouse -> LT 1.0, one wheel step -> one D-pad press and release, Tab -> LB, a fast flick -> -1.0, -0.4 (carry), 0. ## Not covered - Camera feel with a real hand on a real mouse. The title's dead zone and response curve aren't measured, so the two inverse settings are at their neutral defaults, and the run above suggests small mouse movements turn far too little until they are set. - The console meaning of each button in this title; the defaults follow the previous game's layout. - On-foot against in-vehicle is switched by the F and G keys, not read from the title. - Button prompts stay controller glyphs (they are the title's UI assets). - Non-Windows hosts get no mouse (the raw-input thread is Windows only); the mapping layer itself is portable, but I did not build or run this natively on Linux. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The title reads gamepads and keyboards only (it registers no mouse), so
the keyboard and mouse act as a pad: on the first connected host pad, or
on the stand-in pad when none is. The series' usual PC keys sit on the
console buttons that do the same; F switches to a vehicle layout (W/S on
the triggers), G switches it alone.

Mouse look: raw input (no pointer acceleration) becomes the right stick.
The title reads its stick as a turn rate, so the counts since its last
pad read are divided by the time since then, at that read: the same hand
movement turns the same angle at any frame rate (spans up to 1 s, for
today's slow world frames). The title's stick dead zone and curve can be
undone (stick_deadzone, stick_curve), a flick past full stick is turned
in full a little later, and the cursor is hidden and held in the window
while it has focus (Alt-Tab or Esc frees it, a click or Esc captures it;
the capturing click is no shot).

Pad and keyboard/mouse work together: buttons OR, triggers max, each
stick from whichever device moved it last (a resting pad's drift never
takes it). Presses and wheel steps stay down until the title has read
them, so taps shorter than a frame count.

Letters, digits and punctuation are the keys at their places on a US
keyboard (scan codes), so the left stick is Z Q S D on an AZERTY
keyboard with no setup; keys_by_position = false matches by letter.

[controls] in victory.toml sets and rebinds everything; enabled = false
keeps the old stand-in pad. The scripted VICTORY_KEYS keep their meaning.

Diagnostics: VICTORY_KBM plays keys and mouse motion into this layer;
gameinput=debug logs each pad state the title reads.

First written for Marvisak/VIctory#1529.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Dragging a window border with the cursor captured collapsed the window
to its title bar: every poll clipped the cursor to the client area, and
the clip followed that area as the size loop shrank it (reported with a
repro on the pull request).

- Between WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE the cursor is the user's:
  a captured cursor is freed when the loop starts, nothing captures or
  clips during it, and it stays free afterwards until a click in the
  window.
- Focus gained by a mouse click no longer captures by itself: a click in
  the client area captures (as before), one on a border or the title bar
  does not. Focus gained without a button down (Alt-Tab) still captures.
- A captured cursor is held 16 px inside the client area, so it cannot
  reach the borders; a client area too small for that is not clipped.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Measured in the opening lookout scene (two scripted 420 s runs, one capture
every 10 frames): right stick 0.30 turned ~0.04 px per frame, 0.49 turned
1.9 px, 1.0 about 5 px. The title's dead zone sits near 0.3, so mouse
motion under ~600 counts/s at sensitivity 1.0 used to turn nothing.
stick_deadzone now defaults to 0.3; curve and sensitivity stay 1.0.
Tests of the linear mapping set deadzone 0.0 themselves.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
(cherry picked from commit 538c7883d495eb77045df5b6522df62b0d2c0d04)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:46:44 +00:00
github-bot closed this pull request 2026-11-26 03:46:44 +00:00
Author
Owner

@⁠laptopnotebook on GitHub · 2026-11-25 03:21 UTC · original

Tested this on Windows 11 with a real mouse and keyboard, no controller connected.

Works: mouse look turns the camera fine with a real mouse, and the cursor gets captured on focus and released with Esc / Alt-Tab. Two runs, ~7 min in game for the second, no crashes.

Sometimes no camera movement. Now and then dragging the mouse didn't seem to move the camera at all. I was tabbing out a lot and it was running at ~2 fps, so this might just be frame rate or focus, but it lines up with what you saw about small movements barely turning, probably the title's stick dead zone. I didn't try stick_deadzone / stick_curve.

Bug: resizing the window while the cursor is captured collapses it. Repro:

  1. Start with [controls] at defaults and let the window capture the cursor.
  2. Grab the bottom edge and drag it.
  3. The client area shrinks down to nothing (window ended up 1339x39, just the title bar). After that the cursor is stuck in a horizontal strip, so you can only resize left/right, and there's no way to get the window back with the mouse. I had to restore it with MoveWindow from outside.

I think it's cursor() in gameinput.rs (~line 1348): focus gained from clicking the border captures the cursor (!self.was_focused → capture()), and then every poll re-clips to the current client rect while the size loop runs, so the clip follows the shrinking window. Not clipping between WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE (the lifecycle hook already sees the window's messages), or only capturing on a click inside the client area instead of on any focus gain, should fix it. Might also be worth not clipping to a rect smaller than some minimum.

**@⁠laptopnotebook** on GitHub · 2026-11-25 03:21 UTC · [original](https://github.com/fxceless/victory-fork/pull/577#issuecomment-7151832274) Tested this on Windows 11 with a real mouse and keyboard, no controller connected. **Works:** mouse look turns the camera fine with a real mouse, and the cursor gets captured on focus and released with Esc / Alt-Tab. Two runs, ~7 min in game for the second, no crashes. **Sometimes no camera movement.** Now and then dragging the mouse didn't seem to move the camera at all. I was tabbing out a lot and it was running at ~2 fps, so this might just be frame rate or focus, but it lines up with what you saw about small movements barely turning, probably the title's stick dead zone. I didn't try `stick_deadzone` / `stick_curve`. **Bug: resizing the window while the cursor is captured collapses it.** Repro: 1. Start with `[controls]` at defaults and let the window capture the cursor. 2. Grab the bottom edge and drag it. 3. The client area shrinks down to nothing (window ended up 1339x39, just the title bar). After that the cursor is stuck in a horizontal strip, so you can only resize left/right, and there's no way to get the window back with the mouse. I had to restore it with `MoveWindow` from outside. I think it's `cursor()` in `gameinput.rs` (~line 1348): focus gained from clicking the border captures the cursor (`!self.was_focused` → `capture()`), and then every poll re-clips to the current client rect while the size loop runs, so the clip follows the shrinking window. Not clipping between `WM_ENTERSIZEMOVE` and `WM_EXITSIZEMOVE` (the lifecycle hook already sees the window's messages), or only capturing on a click inside the client area instead of on any focus gain, should fix it. Might also be worth not clipping to a rect smaller than some minimum.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-25 03:24 UTC · original

From a tester working with Claude (AI-assisted); measured on my own machine.

Thank you for testing with a real mouse and keyboard; that is the part my scripted runs could not cover.

  • Window collapsing on resize while captured: confirmed from your description, and your reading matches the code: the capture re-clips to the client rectangle on every poll, so during a size loop the clip follows the shrinking window. I will stop clipping between WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE (and not capture on a click that lands on the border) and push it here as a follow-up commit.
  • Sometimes no camera movement: at about 2 fps a short drag can fall entirely between two pad reads of the title and then decays inside the 100 ms carry, and small rates sit under what looks like the title's own stick dead zone. A calibration run for stick_deadzone / stick_curve is queued here; I will post the measured values and set them as defaults if they hold.
**@⁠claude-GTA6** on GitHub · 2026-11-25 03:24 UTC · [original](https://github.com/fxceless/victory-fork/pull/577#issuecomment-7151891036) *From a tester working with Claude (AI-assisted); measured on my own machine.* Thank you for testing with a real mouse and keyboard; that is the part my scripted runs could not cover. - **Window collapsing on resize while captured:** confirmed from your description, and your reading matches the code: the capture re-clips to the client rectangle on every poll, so during a size loop the clip follows the shrinking window. I will stop clipping between `WM_ENTERSIZEMOVE` and `WM_EXITSIZEMOVE` (and not capture on a click that lands on the border) and push it here as a follow-up commit. - **Sometimes no camera movement:** at about 2 fps a short drag can fall entirely between two pad reads of the title and then decays inside the 100 ms carry, and small rates sit under what looks like the title's own stick dead zone. A calibration run for `stick_deadzone` / `stick_curve` is queued here; I will post the measured values and set them as defaults if they hold.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-25 03:29 UTC · original

From a tester working with Claude (AI-assisted); measured on my own machine.

Fixed in cb3163c6: between WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE the cursor is yours (a captured cursor is freed when the loop starts, nothing captures or clips during it, a click in the window captures again afterwards), and focus gained by a mouse click no longer captures by itself, so a click on a border or the title bar never does.

A captured cursor is also held 16 px inside the client area now, so it can't reach the borders in the first place. A unit test covers the state rules (a_size_or_move_loop_frees_the_cursor_and_border_clicks_do_not_capture); cargo test -p victory-hle -p victory-core passes (115 + 11) and clippy -D warnings is clean on both. I could not drag a real window here, so a re-test of your repro would be welcome.

**@⁠claude-GTA6** on GitHub · 2026-11-25 03:29 UTC · [original](https://github.com/fxceless/victory-fork/pull/577#issuecomment-7151961172) *From a tester working with Claude (AI-assisted); measured on my own machine.* Fixed in cb3163c6: between `WM_ENTERSIZEMOVE` and `WM_EXITSIZEMOVE` the cursor is yours (a captured cursor is freed when the loop starts, nothing captures or clips during it, a click in the window captures again afterwards), and focus gained by a mouse click no longer captures by itself, so a click on a border or the title bar never does. A captured cursor is also held 16 px inside the client area now, so it can't reach the borders in the first place. A unit test covers the state rules (`a_size_or_move_loop_frees_the_cursor_and_border_clicks_do_not_capture`); `cargo test -p victory-hle -p victory-core` passes (115 + 11) and clippy `-D warnings` is clean on both. I could not drag a real window here, so a re-test of your repro would be welcome.
Author
Owner

@⁠laptopnotebook on GitHub · 2026-11-25 04:46 UTC · original

Re-tested cb3163c with the same repro (Windows 11, real mouse and keyboard, release build). Works fine now: with the cursor captured I can't reach the borders, and after Esc I can drag the bottom edge up and down without the window collapsing. Clicking the border or title bar doesn't capture, and a click back in the window does. No crashes. Thanks for the quick fix!

**@⁠laptopnotebook** on GitHub · 2026-11-25 04:46 UTC · [original](https://github.com/fxceless/victory-fork/pull/577#issuecomment-7153148781) Re-tested cb3163c with the same repro (Windows 11, real mouse and keyboard, release build). Works fine now: with the cursor captured I can't reach the borders, and after Esc I can drag the bottom edge up and down without the window collapsing. Clicking the border or title bar doesn't capture, and a click back in the window does. No crashes. Thanks for the quick fix!
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-25 04:49 UTC · original

From a tester working with Claude (AI-assisted); measured on my own machine.

@⁠laptopnotebook thanks for re-testing with a real mouse and keyboard. That was the part we could not check ourselves. The mouse sensitivity calibration that is still owed here is being run now, and I'll post it when it is done.

**@⁠claude-GTA6** on GitHub · 2026-11-25 04:49 UTC · [original](https://github.com/fxceless/victory-fork/pull/577#issuecomment-7153194981) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠laptopnotebook thanks for re-testing with a real mouse and keyboard. That was the part we could not check ourselves. The mouse sensitivity calibration that is still owed here is being run now, and I'll post it when it is done.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-25 06:55 UTC · original

From a tester working with Claude (AI-assisted); measured on my own machine.

Calibration of stick_deadzone / stick_curve, as promised. Two scripted 420 s runs (diagnostics build of this branch, RTX 5090,
Windows 11, ~2.2-2.4 fps in the opening, starting from an existing save). Steady mouse motion was fed through VICTORY_KBM at fixed
right-stick levels; the turn was measured as the horizontal shift between captured frames (one capture every 10 frames, column
cross-correlation). The title read the stick about once per frame at the intended level in every window (gameinput=debug).

Opening lookout scene (the camera turns here):

stick turn per frame runs
0.30 ~0.04 px (3-5 px per 100 frames, about the noise) 1 (the earlier check run)
0.49 1.9 px (19 px per 10 frames, steady over ~70 frames) 1
1.0 ~5 px (one 10-frame interval before the scene ends) 1

So the title's dead zone sits close to 0.3: 0.30 barely moves the camera, 0.49 moves it ~50x more. This matches the "small drags
sometimes do nothing" report: at the old default (no dead zone skipped) a hand speed under ~600 counts/s landed inside it.
The curve is not pinned down by three points (the 1.0 point may hit the scene's yaw limit); a linear response fits within the
noise, so stick_curve stays 1.0.

New default (pushed as b675e1d0): stick_deadzone = 0.3 (was 0.0), stick_curve = 1.0 and mouse_sensitivity = 1.0 unchanged. Any mouse
motion now starts just past the dead zone, so small movements turn the camera. Tests that check the linear mapping now set
deadzone: 0.0 themselves. If a dead zone of 0.3 overshoots on your setup (the camera creeps when you barely touch the mouse),
stick_deadzone = 0.25 in [controls] is the next value to try; please say which feels right.

Not measured / open:

  • After the lookout ends ("Move around / Move the camera" prompt), neither the camera nor the player moved within either
    scripted run: 30 s at full stick turned it ≤7 px, and W (read by the title as left stick +1.0) did not move the player.
    Both runs end ~3 minutes after that point at this frame rate, so this is most likely the title not handing over control yet
    rather than input shaping. I could not measure the
    free-play camera's dead zone, so the 0.3 comes from the lookout camera only.
  • Whether the title caps its time step (the same turn per frame at any frame rate) is not settled: both runs ran at about the same
    frame rate.
  • One scene, one machine, one run per level.
**@⁠claude-GTA6** on GitHub · 2026-11-25 06:55 UTC · [original](https://github.com/fxceless/victory-fork/pull/577#issuecomment-7155304207) *From a tester working with Claude (AI-assisted); measured on my own machine.* Calibration of `stick_deadzone` / `stick_curve`, as promised. Two scripted 420 s runs (diagnostics build of this branch, RTX 5090, Windows 11, ~2.2-2.4 fps in the opening, starting from an existing save). Steady mouse motion was fed through `VICTORY_KBM` at fixed right-stick levels; the turn was measured as the horizontal shift between captured frames (one capture every 10 frames, column cross-correlation). The title read the stick about once per frame at the intended level in every window (`gameinput=debug`). **Opening lookout scene (the camera turns here):** | stick | turn per frame | runs | |---|---|---| | 0.30 | ~0.04 px (3-5 px per 100 frames, about the noise) | 1 (the earlier check run) | | 0.49 | 1.9 px (19 px per 10 frames, steady over ~70 frames) | 1 | | 1.0 | ~5 px (one 10-frame interval before the scene ends) | 1 | So the title's dead zone sits close to 0.3: 0.30 barely moves the camera, 0.49 moves it ~50x more. This matches the "small drags sometimes do nothing" report: at the old default (no dead zone skipped) a hand speed under ~600 counts/s landed inside it. The curve is not pinned down by three points (the 1.0 point may hit the scene's yaw limit); a linear response fits within the noise, so `stick_curve` stays 1.0. **New default (pushed as `b675e1d0`):** `stick_deadzone = 0.3` (was 0.0), `stick_curve = 1.0` and `mouse_sensitivity = 1.0` unchanged. Any mouse motion now starts just past the dead zone, so small movements turn the camera. Tests that check the linear mapping now set `deadzone: 0.0` themselves. If a dead zone of 0.3 overshoots on your setup (the camera creeps when you barely touch the mouse), `stick_deadzone = 0.25` in `[controls]` is the next value to try; please say which feels right. **Not measured / open:** - After the lookout ends ("Move around / Move the camera" prompt), neither the camera nor the player moved within either scripted run: 30 s at full stick turned it ≤7 px, and `W` (read by the title as left stick +1.0) did not move the player. Both runs end ~3 minutes after that point at this frame rate, so this is most likely the title not handing over control yet rather than input shaping. I could not measure the free-play camera's dead zone, so the 0.3 comes from the lookout camera only. - Whether the title caps its time step (the same turn per frame at any frame rate) is not settled: both runs ran at about the same frame rate. - One scene, one machine, one run per level.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.