Script launcher: mouse and keyboard work from it too (#1369) #1393

Manually merged
github merged 1 commit from github-bot/gh-1393 into main 2026-11-29 08:21:47 +00:00 AGit
Owner

@⁠kibagami-nc on GitHub · 2026-11-28 18:45 UTC · original
kibagami-nc:launch/mnk-in-script-launchers → main · +17 −0 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

What happens (#1369)

F1's MOUSE AND KEYBOARD works only when the game is started by victory.exe play. play.rs writes the default bindings.ini to %LOCALAPPDATA%\victory and passes its path to the game as VICTORY_MNK_BINDINGS. Without that variable, mnk::config() has no bindings: mouse and keyboard stay off, and F1's KEY BINDINGS says to turn them on.

play-foxhound.ps1 (and play-nvidia.ps1, which runs it) passes VICTORY_MNK=1 from the menu file, but never names a bindings file. #1369's reporter, on the script launcher, had VICTORY_MNK=1 in their log, MOUSE AND KEYBOARD ON after a restart, and still no mouse and keyboard. KEY BINDINGS said "Enable MnK to change keybinds".

The change (scripts/play-foxhound.ps1)

Right after the menu file and -More are applied, the script does what play.rs does. With VICTORY_MNK=1 and no VICTORY_MNK_BINDINGS:

  • it uses bindings.ini in %LOCALAPPDATA%\victory, or VICTORY_HOME if set, the same file victory.exe play uses, so both launchers share one set of keys;
  • the first time, it writes that file from the repository's bindings.ini, and keeps it afterwards (F1's KEY BINDINGS edits it);
  • it sets VICTORY_MNK_BINDINGS to that file and prints where it is.

A VICTORY_MNK_BINDINGS given with -More is left as given. The repository's own bindings.ini is never written, so a git pull stays clean. Line endings stay CRLF.

Tests

  • Parser: the script parses without errors in Windows PowerShell 5.1 and PowerShell 7.
  • The block, run alone with VICTORY_HOME pointed at a temporary folder:
    1. on, no file yet: the file is written, identical to the repository's, and named;
    2. on, file edited: the edit is kept and the file named;
    3. off: nothing is set;
    4. a path given with -More: left as given.

Not run with the game.

**@⁠kibagami-nc** on GitHub · 2026-11-28 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1393) `kibagami-nc:launch/mnk-in-script-launchers` → `main` · +17 −0 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC ## What happens (#1369) F1's MOUSE AND KEYBOARD works only when the game is started by `victory.exe play`. `play.rs` writes the default `bindings.ini` to `%LOCALAPPDATA%\victory` and passes its path to the game as `VICTORY_MNK_BINDINGS`. Without that variable, `mnk::config()` has no bindings: mouse and keyboard stay off, and F1's KEY BINDINGS says to turn them on. `play-foxhound.ps1` (and `play-nvidia.ps1`, which runs it) passes `VICTORY_MNK=1` from the menu file, but never names a bindings file. #1369's reporter, on the script launcher, had `VICTORY_MNK=1` in their log, MOUSE AND KEYBOARD ON after a restart, and still no mouse and keyboard. KEY BINDINGS said "Enable MnK to change keybinds". ## The change (`scripts/play-foxhound.ps1`) Right after the menu file and `-More` are applied, the script does what `play.rs` does. With `VICTORY_MNK=1` and no `VICTORY_MNK_BINDINGS`: - it uses `bindings.ini` in `%LOCALAPPDATA%\victory`, or `VICTORY_HOME` if set, the same file `victory.exe play` uses, so both launchers share one set of keys; - the first time, it writes that file from the repository's `bindings.ini`, and keeps it afterwards (F1's KEY BINDINGS edits it); - it sets `VICTORY_MNK_BINDINGS` to that file and prints where it is. A `VICTORY_MNK_BINDINGS` given with `-More` is left as given. The repository's own `bindings.ini` is never written, so a `git pull` stays clean. Line endings stay CRLF. ## Tests - **Parser:** the script parses without errors in Windows PowerShell 5.1 and PowerShell 7. - **The block, run alone** with `VICTORY_HOME` pointed at a temporary folder: 1. **on, no file yet:** the file is written, identical to the repository's, and named; 2. **on, file edited:** the edit is kept and the file named; 3. **off:** nothing is set; 4. **a path given with `-More`:** left as given. Not run with the game.
F1's MOUSE AND KEYBOARD only works from `victory.exe play`, which writes the
default bindings.ini to %LOCALAPPDATA%\victory and names it to the game
(VICTORY_MNK_BINDINGS). play-foxhound.ps1, and play-nvidia.ps1 through it,
passed VICTORY_MNK=1 on but no file. So mouse and keyboard stayed off
however the menu was set, and KEY BINDINGS asked to turn them on (#1369).

The script now does as play.rs does: with VICTORY_MNK=1 it uses
bindings.ini in %LOCALAPPDATA%\victory (VICTORY_HOME if set), written from
the repository's bindings.ini the first time and kept afterwards, and names
it. A VICTORY_MNK_BINDINGS given with -More is left as given.

Checked: the script parses in Windows PowerShell 5.1 and PowerShell 7. The
block, run alone, writes the file once, keeps an edited one, does nothing with
mouse and keyboard off, and leaves a given path alone.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 18:45:47 +00:00
github manually merged commit 5dafeea5c7 into main 2026-11-29 08:21:47 +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!1393
No description provided.