tools: keymap overlay for remapped bindings #3664

Open
github-bot wants to merge 2 commits from github-bot/gh-3664 into main AGit
Owner

@⁠ReSerendipity on GitHub · 2026-11-30 03:21 UTC · original
ReSerendipity:tools/keymap-overlay → main · +578 −0 · 4 files · 2 commits · open

Fixes: nothing. This adds a tool; it does not fix a defect.

What it changes

bindings.ini decides which key presses the pad, but the glyphs the title draws keep naming
the Xbox button. Move X off Space and LB off Tab to an ordinary GTA V-shaped layout
and every prompt on screen is wrong; the only reminder left is the ini on a second monitor.

This adds tools/keymap-overlay/: one C# WinForms form compiled by the .NET Framework
csc.exe that already ships with Windows, a two-line build script, the DPI manifest, and a
README.

On screen it is a small always-on-top card with two columns, the key you press and the action
it stands for:

  • widths, row heights and the card size are measured from the strings with TextRenderer.MeasureText;
  • WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE and ShowWithoutActivation, so it never takes focus
    from the game and never appears in Alt-Tab (it is not click-through; park it off the aim);
  • left-drag moves it, wheel or the right-click menu sets opacity in 5% steps between 30% and 100%;
  • x, y and opacity persist to keymap-overlay.ini beside the exe, and an off-screen
    position is clamped back on load;
  • --watch=<process> polls every 2 s and closes itself after two consecutive misses, so a
    launcher can start it unconditionally before victory play.

The table is data, not source: the built-in default is English, and an optional
keymap-overlay.labels.txt beside the exe (read as UTF-8, <key> | <action> per line, plus
note / title / footer / menu-opacity / menu-close) replaces it with no rebuild.
footer takes {0} for the opacity percentage. So a mapping for another layout, or a
translation of the action column, is a text file next to the exe rather than a fork of the
source.

No binaries are committed: source, manifest, build script and README only.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing):
    RTX 5070 Ti Laptop 12 GB, Windows 11 26100, 2560x1600 at 150% scaling, Series X profile,
    1440p, --dlss quality, --fg-type dlss --framegen 4, ray tracing off.

  • Before: mapped keys existed only in bindings.ini; every in-game prompt named a pad button
    that no longer does anything.

  • After: build.cmd produces keymap-overlay.exe (15,872 B). The card is sized from the
    loaded table, measured from GetWindowRect on each build:

    labels beside the exe card size
    none (built-in English, 18 rows) 393x508
    18-row UTF-8 labels, Chinese action column 325x508
    4-row labels 347x191

    i.e. the row count and the label text both come from the file, and the Chinese column is
    narrower than the English one as expected. /codepage:65001 keeps the source readable; the
    labels file itself is UTF-8 and is not affected by that switch. Drag position and opacity
    come back from the ini after a restart.

  • For shader changes, the wave sizes tested (32 and/or 64 lanes): not applicable, no shader code.

  • cargo test passed for the crates it touches: no Rust crates are touched, and no .rs file
    changes, so the three CI gates are unaffected.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
    Related: #1739 (F5 map editor), #482 (F2 remapping page), #982 (VICTORY_KEYMAP).
    Those add editors inside the title's own menu stack; this is a separate always-on-top card
    that needs no game-side change, no rebuild, and works while the game is drawing its own
    wrong prompts. It reads bindings.ini semantics but never touches the file.
**@⁠ReSerendipity** on GitHub · 2026-11-30 03:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3664) `ReSerendipity:tools/keymap-overlay` → `main` · +578 −0 · 4 files · 2 commits · open Fixes: nothing. This adds a tool; it does not fix a defect. ## What it changes `bindings.ini` decides which key presses the pad, but the glyphs the title draws keep naming the Xbox button. Move `X` off `Space` and `LB` off `Tab` to an ordinary GTA V-shaped layout and every prompt on screen is wrong; the only reminder left is the ini on a second monitor. This adds `tools/keymap-overlay/`: one C# WinForms form compiled by the .NET Framework `csc.exe` that already ships with Windows, a two-line build script, the DPI manifest, and a README. On screen it is a small always-on-top card with two columns, the key you press and the action it stands for: - widths, row heights and the card size are measured from the strings with `TextRenderer.MeasureText`; - `WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE` and `ShowWithoutActivation`, so it never takes focus from the game and never appears in Alt-Tab (it is not click-through; park it off the aim); - left-drag moves it, wheel or the right-click menu sets opacity in 5% steps between 30% and 100%; - `x`, `y` and `opacity` persist to `keymap-overlay.ini` beside the exe, and an off-screen position is clamped back on load; - `--watch=<process>` polls every 2 s and closes itself after two consecutive misses, so a launcher can start it unconditionally before `victory play`. The table is data, not source: the built-in default is English, and an optional `keymap-overlay.labels.txt` beside the exe (read as UTF-8, `<key> | <action>` per line, plus `note` / `title` / `footer` / `menu-opacity` / `menu-close`) replaces it with no rebuild. `footer` takes `{0}` for the opacity percentage. So a mapping for another layout, or a translation of the action column, is a text file next to the exe rather than a fork of the source. No binaries are committed: source, manifest, build script and README only. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): RTX 5070 Ti Laptop 12 GB, Windows 11 26100, 2560x1600 at 150% scaling, Series X profile, 1440p, `--dlss quality`, `--fg-type dlss --framegen 4`, ray tracing off. - Before: mapped keys existed only in `bindings.ini`; every in-game prompt named a pad button that no longer does anything. - After: `build.cmd` produces `keymap-overlay.exe` (15,872 B). The card is sized from the loaded table, measured from `GetWindowRect` on each build: | labels beside the exe | card size | |---|---| | none (built-in English, 18 rows) | 393x508 | | 18-row UTF-8 labels, Chinese action column | 325x508 | | 4-row labels | 347x191 | i.e. the row count and the label text both come from the file, and the Chinese column is narrower than the English one as expected. `/codepage:65001` keeps the source readable; the labels file itself is UTF-8 and is not affected by that switch. Drag position and opacity come back from the ini after a restart. - For shader changes, the wave sizes tested (32 and/or 64 lanes): not applicable, no shader code. - `cargo test` passed for the crates it touches: no Rust crates are touched, and no `.rs` file changes, so the three CI gates are unaffected. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #1739 (F5 map editor), #482 (F2 remapping page), #982 (`VICTORY_KEYMAP`). Those add editors inside the title's own menu stack; this is a separate always-on-top card that needs no game-side change, no rebuild, and works while the game is drawing its own wrong prompts. It reads `bindings.ini` semantics but never touches the file.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 03:26:12 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3664/head:github-bot/gh-3664'
git switch 'github-bot/gh-3664'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3664'
git switch 'github-bot/gh-3664'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3664'
git switch 'github-bot/gh-3664'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3664'
git switch 'main'
git merge --squash 'github-bot/gh-3664'
git switch 'main'
git merge --ff-only 'github-bot/gh-3664'
git switch 'main'
git merge 'github-bot/gh-3664'
git push origin 'main'
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!3664
No description provided.