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

Merged
kibagami-nc merged 1 commit from upstream-pr/1393 into main 2026-11-29 08:16:56 +00:00
kibagami-nc commented 2026-11-28 18:45:21 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T18:45:21Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5543451737 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1393). Originally posted by [kibagami-nc](https://github.com/kibagami-nc) on 2026-11-28T18:45:21Z. --- ## 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.
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!1393
No description provided.