[PR #4489] [MERGED] Options > Mods: a test that a native mod's key shows and keeps the key pressed #5650

Closed
opened 2026-11-03 05:14:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4489
Author: @ludovicthenot
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix-zoom-keybind-label


📝 Commits (2)

  • ca9195f Options > Mods: a test that a native mod's key shows and keeps the key pressed
  • 0ddaf69 Merge remote-tracking branch 'hr/main' into fix/pr-4489

📊 Changes

1 file changed (+51 additions, -0 deletions)

View changed files

📝 crates/horizon-client-render/src/options_ui.rs (+51 -0)

📄 Description

🤖 Opened by ludovicthenot's AI agent (Claude Code, Claude Opus 5.5), not by ludovicthenot personally.

What and why

Fixes #3539: a player set the Zoom mod's key to R in Options > Mods and the button showed another key.

The report is from 29 October on the release, v0.2.97, where Zoom was still the WebAssembly mod (1.0.0) with its own key handling. Since then:

  • #3346 gave native mods a settings page in Options > Mods, whose keys are Key Binds rows (native_rows, bind_key in options_ui.rs), kept as key.<id>.<name> lines in horizon-mods.txt;
  • #3350 removed WebAssembly code mods, and Zoom became a native mod (2.0.0, horizon-mods/native/zoom), which reads its key with native_mod_key.

On main the bug doesn't happen. This pull request adds the test that was missing, so it stays that way: a_native_mods_key_shows_and_keeps_the_key_pressed opens a native mod's page with Zoom's key (default Z), clicks the key's button, presses R, and checks that the row shows R and that horizon-mods.txt keeps key.zoom.zoom:key.keyboard.r.

Players on the release get the fix with the next game release (the native Zoom needs a Horizon after #3350).

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Horizon-only (Options > Mods). The rows follow KeyBindsScreen: a click selects the key, the next key pressed binds it, Escape unbinds.

Tested in the game

On main with a throwaway native mod (not in this pull request) shaped like Zoom (zoom, one key, default C), through horizon-ctl (--offscreen): Options > Mods > Zoom > Settings, click the key (> C <), press R.

Step Key button horizon-mods.txt
before C (none)
after pressing R R key.zoom.zoom:key.keyboard.r
after quitting and launching again R key.zoom.zoom:key.keyboard.r

Self-check

cargo test -p horizon-client-render --lib native_mod ✅ 3 passed (the new test among them), cargo fmt --check ✅, cargo clippy -p horizon-client-render --tests ✅ (no warnings). tools/pr_ready.py was not run.

Label: none (a test, nothing new for players).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4489 **Author:** [@ludovicthenot](https://github.com/ludovicthenot) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix-zoom-keybind-label` --- ### 📝 Commits (2) - [`ca9195f`](https://github.com/horizon-rust/horizon/commit/ca9195fb02b0e1ce1ab709e76affae134b5dd0d0) Options > Mods: a test that a native mod's key shows and keeps the key pressed - [`0ddaf69`](https://github.com/horizon-rust/horizon/commit/0ddaf69abc6e50f4d1551aee06c7df7a8cffb69d) Merge remote-tracking branch 'hr/main' into fix/pr-4489 ### 📊 Changes **1 file changed** (+51 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/options_ui.rs` (+51 -0) </details> ### 📄 Description > 🤖 Opened by ludovicthenot's AI agent (Claude Code, Claude Opus 5.5), not by ludovicthenot personally. ## What and why Fixes #3539: a player set the Zoom mod's key to R in Options > Mods and the button showed another key. The report is from 29 October on the release, v0.2.97, where Zoom was still the WebAssembly mod (1.0.0) with its own key handling. Since then: - #3346 gave native mods a settings page in Options > Mods, whose keys are Key Binds rows (`native_rows`, `bind_key` in `options_ui.rs`), kept as `key.<id>.<name>` lines in `horizon-mods.txt`; - #3350 removed WebAssembly code mods, and Zoom became a native mod (2.0.0, `horizon-mods/native/zoom`), which reads its key with `native_mod_key`. On main the bug doesn't happen. This pull request adds the test that was missing, so it stays that way: `a_native_mods_key_shows_and_keeps_the_key_pressed` opens a native mod's page with Zoom's key (default Z), clicks the key's button, presses R, and checks that the row shows `R` and that `horizon-mods.txt` keeps `key.zoom.zoom:key.keyboard.r`. Players on the release get the fix with the next game release (the native Zoom needs a Horizon after #3350). ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [x] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Horizon-only (Options > Mods). The rows follow `KeyBindsScreen`: a click selects the key, the next key pressed binds it, Escape unbinds. ## Tested in the game On main with a throwaway native mod (not in this pull request) shaped like Zoom (`zoom`, one key, default C), through `horizon-ctl` (`--offscreen`): Options > Mods > Zoom > Settings, click the key (`> C <`), press R. | Step | Key button | `horizon-mods.txt` | | --- | --- | --- | | before | `C` | (none) | | after pressing R | `R` | `key.zoom.zoom:key.keyboard.r` | | after quitting and launching again | `R` | `key.zoom.zoom:key.keyboard.r` | ## Self-check `cargo test -p horizon-client-render --lib native_mod` ✅ 3 passed (the new test among them), `cargo fmt --check` ✅, `cargo clippy -p horizon-client-render --tests` ✅ (no warnings). `tools/pr_ready.py` was not run. Label: none (a test, nothing new for players). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:05 +07:00
Sign in to join this conversation.
No milestone
No project
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
horizon-rust/horizon#5650
No description provided.