Prompts follow the controls: keys under mouse and keyboard, pad butto… #2545

Manually merged
github merged 1 commit from github-bot/gh-2545 into main 2026-11-30 14:16:14 +00:00 AGit
Owner

@⁠VAldES191 on GitHub · 2026-11-29 14:04 UTC · original
VAldES191:fix-prompts-follow-controls → main · +170 −9 · 5 files · 1 commits · merged 2026-11-30 14:12 UTC

Problem

The keyboard prompt hook was placed whenever VICTORY_PROMPTS was unset, and
skipped when F1's MOUSE AND KEYBOARD was on (VICTORY_MNK_BINDINGS set). The
result was the wrong way round: a controller player saw key caps, and a mouse
and keyboard player saw the pad's buttons.

Change

  • Prompts follow the active controls. Key caps are shown only while the
    keys play: MOUSE AND KEYBOARD on, or CONTROLS set to KEYBOARD
    (gameinput::key_prompts, the opposite of pads_only). With GAMEPAD or
    DUALSENSE the title keeps its Xbox pictures. VICTORY_PROMPTS=keys or
    =gamepad still forces one either way.
  • Under MOUSE AND KEYBOARD the caps name the keys from bindings.ini
    (mnk::prompt_keys → prompts::use_bound_keys), not the stand-in pad's.
    Each control shows the first of its bound keys that has a label. A control
    with no such key (bound only to the wheel, or the right stick, which is the
    mouse) keeps its pad picture, as do animated hold prompts.
  • New key caps: LMB, RMB, MMB, M4, M5, Shift, Ctrl, Alt, Space and the
    digits 0–9.
  • README updated to describe the new behaviour.

Bindings are read once, when the game starts. If you change KEY BINDINGS in F1
during a session, the prompts show the new keys only after a restart.

Files

  • apps/victory/src/run.rs: decides when to place the prompt hook
  • crates/victory-hle/src/modules/gameinput.rs: key_prompts(), prompt_keys()
  • crates/victory-hle/src/modules/mnk.rs: bindings → keys for each pad control
  • crates/victory-game/src/prompts.rs: bound keys, new labels
  • README.md

Tests

  • prompts::tests::bound_keys_name_each_control_by_its_first_key_with_a_label
  • mnk::tests::prompts_name_the_bound_keys
**@⁠VAldES191** on GitHub · 2026-11-29 14:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2545) `VAldES191:fix-prompts-follow-controls` → `main` · +170 −9 · 5 files · 1 commits · merged 2026-11-30 14:12 UTC ## Problem The keyboard prompt hook was placed whenever `VICTORY_PROMPTS` was unset, and skipped when F1's MOUSE AND KEYBOARD was on (`VICTORY_MNK_BINDINGS` set). The result was the wrong way round: a controller player saw key caps, and a mouse and keyboard player saw the pad's buttons. ## Change - **Prompts follow the active controls.** Key caps are shown only while the keys play: MOUSE AND KEYBOARD on, or CONTROLS set to KEYBOARD (`gameinput::key_prompts`, the opposite of `pads_only`). With GAMEPAD or DUALSENSE the title keeps its Xbox pictures. `VICTORY_PROMPTS=keys` or `=gamepad` still forces one either way. - **Under MOUSE AND KEYBOARD the caps name the keys from `bindings.ini`** (`mnk::prompt_keys` → `prompts::use_bound_keys`), not the stand-in pad's. Each control shows the first of its bound keys that has a label. A control with no such key (bound only to the wheel, or the right stick, which is the mouse) keeps its pad picture, as do animated hold prompts. - **New key caps:** LMB, RMB, MMB, M4, M5, Shift, Ctrl, Alt, Space and the digits 0–9. - README updated to describe the new behaviour. Bindings are read once, when the game starts. If you change KEY BINDINGS in F1 during a session, the prompts show the new keys only after a restart. ## Files - `apps/victory/src/run.rs`: decides when to place the prompt hook - `crates/victory-hle/src/modules/gameinput.rs`: `key_prompts()`, `prompt_keys()` - `crates/victory-hle/src/modules/mnk.rs`: bindings → keys for each pad control - `crates/victory-game/src/prompts.rs`: bound keys, new labels - `README.md` ## Tests - `prompts::tests::bound_keys_name_each_control_by_its_first_key_with_a_label` - `mnk::tests::prompts_name_the_bound_keys`
The keyboard prompt hook was placed whenever VICTORY_PROMPTS was unset and
left out under MOUSE AND KEYBOARD (VICTORY_MNK_BINDINGS set), so a
controller got key caps and the keyboard got the pad's buttons.

- The hook is placed only when the keys play: MOUSE AND KEYBOARD on, or
  CONTROLS KEYBOARD (gameinput::key_prompts, the opposite of pads_only).
  VICTORY_PROMPTS=keys or =gamepad still decides by itself.
- Under MOUSE AND KEYBOARD the caps name the keys of bindings.ini
  (mnk::prompt_keys, prompts::use_bound_keys), not the stand-in pad's.
  A control none of whose keys has a label (the wheel; the right stick is
  the mouse) keeps its pad picture.
- Key caps for the mouse buttons, Shift, Ctrl, Alt, Space and the digits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 14:06:54 +00:00
github manually merged commit 9354010c62 into main 2026-11-30 14:16:14 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!2545
No description provided.