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

Merged
VAldES191 merged 1 commit from upstream-pr/2545 into main 2026-11-30 14:12:02 +00:00
VAldES191 commented 2026-11-29 14:04:53 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by VAldES191 on 2026-11-29T14:04:53Z.


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
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5551474978 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2545). Originally posted by [VAldES191](https://github.com/VAldES191) on 2026-11-29T14:04:53Z. --- ## 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`
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!2545
No description provided.