Driving: Space / Left Shift do not accelerate or reverse a boat (C and Z/W still do) #478

Open
opened 2026-11-27 02:08:19 +00:00 by github-bot · 1 comment
Owner

@⁠LooperSalty on GitHub · 2026-11-27 01:38 UTC · original

Problem

With keyboard and mouse (no pad connected), a boat (and likely a car) still accelerates only with the key in QWERTY C's place and reverses with the key in QWERTY Z's place (W on AZERTY): the stand-in pad's triggers. The keys added for driving in #470 (Space = right trigger, Left Shift = left trigger) do nothing in game.

Seen on 2026-11-27, main 81734aa5 / b62053fe, Series X, AZERTY keyboard, launched with anyxboxx run.

What was tried

  1. #470: fallback() in third_party/victory/crates/victory-hle/src/modules/gameinput.rs also pulls the right trigger with VK_SPACE and the left one with VK_LSHIFT (unit test passes: Space -> right trigger 1.0, Left Shift -> left trigger 1.0). No change in game.
  2. Local branch fix/vehicle-keys-pad-only (not pushed): Space and Left Shift are also kept out of the keyboard device the title reads (for_the_keyboard), in case the title's own keyboard actions for them cancelled the trigger. Still no change in game.

So the keys reach fallback() (unit-tested) but the title does not accelerate. Open questions:

  • Does the host's keys() really report VK_SPACE / VK_LSHIFT while the window has focus (GetAsyncKeyState over 0x08..=0xFE)? Left Shift may come as the generic VK_SHIFT (0x10, filtered out) or only as VK_LSHIFT depending on how it is queried; worth logging the held keys once per change.
  • Does the title read the boat's throttle from the triggers at all when a keyboard device is present, or from another control (the stand-in pad's C/Z keys work, so triggers do reach it)?
  • Is the build the user ran really the one with the change (the run log names build and victory.exe path)?

Done when

  • A debug line (or VICTORY_KEYS-style trace) shows which virtual keys the stand-in pad sees while Space / Left Shift are held.
  • Space accelerates and Left Shift brakes or reverses in a boat and a car, on QWERTY and AZERTY, with a test that fails without the fix.
  • README controls table and the launcher-v0.2.1 notes updated if the keys change.
**@⁠LooperSalty** on GitHub · 2026-11-27 01:38 UTC · [original](https://github.com/LooperSalty/AnyXboxX/issues/478) ## Problem With keyboard and mouse (no pad connected), a **boat** (and likely a car) still accelerates only with the key in QWERTY **C**'s place and reverses with the key in QWERTY **Z**'s place (**W** on AZERTY): the stand-in pad's triggers. The keys added for driving in #470 (**Space** = right trigger, **Left Shift** = left trigger) do nothing in game. Seen on 2026-11-27, `main` `81734aa5` / `b62053fe`, Series X, AZERTY keyboard, launched with `anyxboxx run`. ## What was tried 1. #470: `fallback()` in `third_party/victory/crates/victory-hle/src/modules/gameinput.rs` also pulls the right trigger with `VK_SPACE` and the left one with `VK_LSHIFT` (unit test passes: Space -> right trigger 1.0, Left Shift -> left trigger 1.0). **No change in game.** 2. Local branch `fix/vehicle-keys-pad-only` (not pushed): Space and Left Shift are also kept out of the keyboard device the title reads (`for_the_keyboard`), in case the title's own keyboard actions for them cancelled the trigger. **Still no change in game.** So the keys reach `fallback()` (unit-tested) but the title does not accelerate. Open questions: - Does the host's `keys()` really report `VK_SPACE` / `VK_LSHIFT` while the window has focus (`GetAsyncKeyState` over `0x08..=0xFE`)? Left Shift may come as the generic `VK_SHIFT` (`0x10`, filtered out) or only as `VK_LSHIFT` depending on how it is queried; worth logging the held keys once per change. - Does the title read the boat's throttle from the triggers at all when a keyboard device is present, or from another control (the stand-in pad's C/Z keys work, so triggers do reach it)? - Is the build the user ran really the one with the change (the run log names `build` and `victory.exe` path)? ## Done when - [ ] A debug line (or `VICTORY_KEYS`-style trace) shows which virtual keys the stand-in pad sees while Space / Left Shift are held. - [ ] Space accelerates and Left Shift brakes or reverses in a boat and a car, on QWERTY and AZERTY, with a test that fails without the fix. - [ ] README controls table and the launcher-v0.2.1 notes updated if the keys change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:08:19 +00:00
Author
Owner

@⁠akimfomin on GitHub · 2026-11-27 02:28 UTC · original

At the reported b62053fe70078deac140ec43039d7ce0af3c6b17, PortBridge found a limit in the existing diagnostic route: both VICTORY_KEYS and VICTORY_KEYS_FILE call the same key_code, which drops Space and LeftShift before they reach fallback. I checked its accepted names and single-character rule against the pinned source: Enter/C/Z are accepted, and those two names are dropped. Meanwhile the focused Win32 scan includes both 0x20 and 0xA0, and Win32 explicitly supports querying the left modifier by its own code. The current fallback unit test injects KeyState directly, downstream of both inputs.

For a short diagnostic build, add "Space" => super::VK_SPACE and "LeftShift" => super::VK_LSHIFT to that parser and log changes to the fallback trigger once. Compare a physical press and a scripted hold of the same exact key, using C as a positive control. If only the script reaches the trigger, look at focus/host sampling. If both reach the trigger but only C drives the boat, compare how the title receives the keyboard and gamepad readings. This was source and CPU-parser checking only. Key names and script path · Win32 modifier query · PortBridge

**@⁠akimfomin** on GitHub · 2026-11-27 02:28 UTC · [original](https://github.com/LooperSalty/AnyXboxX/issues/478#issuecomment-7208153664) At the reported `b62053fe70078deac140ec43039d7ce0af3c6b17`, PortBridge found a limit in the existing diagnostic route: both `VICTORY_KEYS` and `VICTORY_KEYS_FILE` call the same `key_code`, which drops `Space` and `LeftShift` before they reach `fallback`. I checked its accepted names and single-character rule against the pinned source: Enter/C/Z are accepted, and those two names are dropped. Meanwhile the focused Win32 scan includes both 0x20 and 0xA0, and Win32 explicitly supports querying the left modifier by its own code. The current fallback unit test injects KeyState directly, downstream of both inputs. For a short diagnostic build, add `"Space" => super::VK_SPACE` and `"LeftShift" => super::VK_LSHIFT` to that parser and log changes to the fallback trigger once. Compare a physical press and a scripted hold of the same exact key, using C as a positive control. If only the script reaches the trigger, look at focus/host sampling. If both reach the trigger but only C drives the boat, compare how the title receives the keyboard and gamepad readings. This was source and CPU-parser checking only. [Key names and script path](https://github.com/LooperSalty/AnyXboxX/blob/b62053fe70078deac140ec43039d7ce0af3c6b17/third_party/victory/crates/victory-hle/src/modules/gameinput.rs#L1327-L1345) · [Win32 modifier query](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getasynckeystate#remarks) · [PortBridge](https://github.com/akimfomin/PortBridge)
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/LooperSalty--AnyXboxX#478
No description provided.