fix(input): Mouse 4 and Mouse 5 can be bound in Controls (#3226) #3257

Merged
HumanBean merged 2 commits from cuecuemoar/Longshot:fix/mouse-side-button-bind into main 2026-12-05 17:07:29 +00:00
Contributor

Summary

In the Controls page (F1), a control's key slot that is listening takes a mouse button pressed then, but only the left, right and middle ones: Mouse 4 and Mouse 5, the side buttons, did nothing, so they could not be bound (#3226). This came with the Controls page's move to the Rust UI (#2822). The names Mouse4 and Mouse5 were already there, and play already reads both buttons (host/nn_hid.c, since #1329), but nothing passed a side button on to the menu:

  • host/display.c never handled WM_XBUTTONDOWN/WM_XBUTTONUP and counted only three buttons as held;
  • gpu/vk/vk_ui.cpp masked the pointer's buttons with & 7u before the UI saw them;
  • the UI's button bits and key_names::MOUSE, the table a listening Keybind looks a pressed button up in, stopped at the middle button.

Now the side buttons are the menu's buttons X1 (8) and X2 (16), from Windows' WM_XBUTTON* (button_bit, shared with the pop-out windows) and from SDL's buttons 4 and 5 on Linux. They reach the UI through MKW_UI_BUTTONS, and a listening Keybind takes them as Mouse4 and Mouse5. Nothing else in the UI reads them: only the left button clicks. With the Insert menu closed, in play or in a game menu, they go on as before: their controls' (nn_hid.c), and on Windows DefWindowProc still gets their messages.

gpu/vk/vk_api.h gets two values of the HOS_MOUSE_* enum, nothing of MkwVkHost or MkwVkRenderer, so MKWVK_API_VERSION stays.

Read first: host/display.c button_bit and the WM_XBUTTONDOWN case; game/crates/key-names/src/lib.rs MOUSE.

Linux's half for play, binding a side button and it acting in the game, is #1172 (TrashPanda, WIP: VK_XBUTTON1/2 from SDL's X1/X2 in keys_update). This PR uses the same buttons 4 and 5 for the menu and does not touch that path.

Fixes #3226

Testing

Tested: Windows 10, RTX 4090, driver 617.42, a 5-button mouse; a copy of my own save. Runtime v3.2.0-335-g7e106835a (this head's code: since then only tests changed). In Controls:

  • A's key slot listening, Mouse 4 pressed: the slot shows Mouse 4; Y's with Mouse 5: Mouse 5. The run's settings file then holds key_a = "5,0" and key_y = "6,0".
  • Neither side button does anything over the menu while no slot is listening.
  • In play, the mouse captured, Mouse 4 and Mouse 5 act as A and Y; on the pause screen, Mouse 4 confirms as A, as before (#1329).

Checks:

  • game-ui a_listening_keybind_takes_the_mouse_side_buttons (new): a listening Keybind takes X1 and X2 as Mouse4 and Mouse5, and while not listening they neither start it nor change it. It fails on main (assertion failed: Mouse4, left: [], right: [(Change, Text("Mouse4"))]) and passes here.

  • tests/test_display_pointer.py: the window procedure's button messages are compiled in too, as button_event. The new cases:

    • Windows: WM_XBUTTONDOWN with the Insert menu open is a press of X1 or X2 at its point, and VK_XBUTTON1/2 down count as held.
    • Windows: a side button's up lets the capture go only when no button is still down.
    • Windows: with only a game menu open, or none, a side button is no press of the menus.
    • Linux: SDL's buttons 4 and 5 are X1 and X2.
    • vk_ui.cpp passes the pointer's buttons on masked by MKW_UI_BUTTONS, not & 7.

    It fails on main (FAIL: gpu/vk/vk_ui.cpp passes the pointer's buttons on without the side buttons; with that mask alone mended, FAIL line 580: ... out.pressed==HOS_MOUSE_X1) and passes here with g++ and clang. Undoing each part of the fix in turn fails it: the held buttons, the press, the Insert menu's gate (it then becomes a game-menu press), either MK_XBUTTON in the capture's release, SDL's 4 and 5, the mask.

  • tests/screensaver_test.c compiles the whole window procedure: its fixture got the side buttons' constants and a stand-in for button_bit. button_bit is written with ifs, so tests/test_menu_hit.py and the button cut still find the window procedure's own case WM_LBUTTONDOWN: / case WM_RBUTTONDOWN:. Every check that reads a changed file passes (run_all.py --changed), apart from five that fail on main too in this WSL.

  • scripts/check_host_compile.py: Linux 83 host units, Windows (llvm-mingw) 81, 0 failed, on 7e106835a as on main 7bc53f841.

  • The whole suite --strict, 7e106835a against main 7bc53f841: 845 passed, 53 failed, 13 skipped on both, the same 53 files failing (they fail on main in this WSL). Since then only tests/display_pointer_test.cpp and tests/test_display_pointer.py changed, and they pass on this head.

  • cargo test -p game-ui -p key-names: 194 and 2 passed.

  • A cold review by a second agent (the diff and the tests) found nothing blocking. The fix's mutations it found untested, the mask and the capture's release, are now caught by the checks above.

Still to test:

  • Linux, a 5-button mouse, by hand: in Controls, a listening slot takes Mouse 4 and Mouse 5 (SDL's buttons 4 and 5; the game can't run in WSL here, and the side buttons need a real mouse). Using them in play on Linux is #1172's.

Measurements

Nothing on the frame path: the mask is a constant, and the two extra GetAsyncKeyState calls run only when a mouse message is published.

Risks

Low. A side button pressed with the Insert menu open is now the menu's, so a listening slot takes it. Out of a listening slot nothing reads it. Out of the Insert menu nothing changes. A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated. (Nothing to change: docs/modding/settings.md already lists Mouse4 and Mouse5.)
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d

## Summary In the Controls page (F1), a control's key slot that is listening takes a mouse button pressed then, but only the left, right and middle ones: Mouse 4 and Mouse 5, the side buttons, did nothing, so they could not be bound (#3226). This came with the Controls page's move to the Rust UI (#2822). The names `Mouse4` and `Mouse5` were already there, and play already reads both buttons (`host/nn_hid.c`, since #1329), but nothing passed a side button on to the menu: - `host/display.c` never handled `WM_XBUTTONDOWN`/`WM_XBUTTONUP` and counted only three buttons as held; - `gpu/vk/vk_ui.cpp` masked the pointer's buttons with `& 7u` before the UI saw them; - the UI's button bits and `key_names::MOUSE`, the table a listening Keybind looks a pressed button up in, stopped at the middle button. Now the side buttons are the menu's buttons X1 (8) and X2 (16), from Windows' `WM_XBUTTON*` (`button_bit`, shared with the pop-out windows) and from SDL's buttons 4 and 5 on Linux. They reach the UI through `MKW_UI_BUTTONS`, and a listening Keybind takes them as `Mouse4` and `Mouse5`. Nothing else in the UI reads them: only the left button clicks. With the Insert menu closed, in play or in a game menu, they go on as before: their controls' (nn_hid.c), and on Windows `DefWindowProc` still gets their messages. `gpu/vk/vk_api.h` gets two values of the `HOS_MOUSE_*` enum, nothing of `MkwVkHost` or `MkwVkRenderer`, so `MKWVK_API_VERSION` stays. Read first: `host/display.c` `button_bit` and the `WM_XBUTTONDOWN` case; `game/crates/key-names/src/lib.rs` `MOUSE`. Linux's half for play, binding a side button and it acting in the game, is [#1172](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1172) (TrashPanda, WIP: `VK_XBUTTON1/2` from SDL's X1/X2 in `keys_update`). This PR uses the same buttons 4 and 5 for the menu and does not touch that path. Fixes #3226 ## Testing **Tested:** Windows 10, RTX 4090, driver 617.42, a 5-button mouse; a copy of my own save. Runtime `v3.2.0-335-g7e106835a` (this head's code: since then only tests changed). In Controls: - A's key slot listening, Mouse 4 pressed: the slot shows Mouse 4; Y's with Mouse 5: Mouse 5. The run's settings file then holds `key_a = "5,0"` and `key_y = "6,0"`. - Neither side button does anything over the menu while no slot is listening. - In play, the mouse captured, Mouse 4 and Mouse 5 act as A and Y; on the pause screen, Mouse 4 confirms as A, as before (#1329). Checks: - `game-ui` `a_listening_keybind_takes_the_mouse_side_buttons` (new): a listening Keybind takes X1 and X2 as `Mouse4` and `Mouse5`, and while not listening they neither start it nor change it. It fails on `main` (`assertion failed: Mouse4, left: [], right: [(Change, Text("Mouse4"))]`) and passes here. - `tests/test_display_pointer.py`: the window procedure's button messages are compiled in too, as `button_event`. The new cases: - Windows: `WM_XBUTTONDOWN` with the Insert menu open is a press of X1 or X2 at its point, and `VK_XBUTTON1/2` down count as held. - Windows: a side button's up lets the capture go only when no button is still down. - Windows: with only a game menu open, or none, a side button is no press of the menus. - Linux: SDL's buttons 4 and 5 are X1 and X2. - `vk_ui.cpp` passes the pointer's buttons on masked by `MKW_UI_BUTTONS`, not `& 7`. It fails on `main` (`FAIL: gpu/vk/vk_ui.cpp passes the pointer's buttons on without the side buttons`; with that mask alone mended, `FAIL line 580: ... out.pressed==HOS_MOUSE_X1`) and passes here with g++ and clang. Undoing each part of the fix in turn fails it: the held buttons, the press, the Insert menu's gate (it then becomes a game-menu press), either `MK_XBUTTON` in the capture's release, SDL's 4 and 5, the mask. - `tests/screensaver_test.c` compiles the whole window procedure: its fixture got the side buttons' constants and a stand-in for `button_bit`. `button_bit` is written with `if`s, so `tests/test_menu_hit.py` and the button cut still find the window procedure's own `case WM_LBUTTONDOWN:` / `case WM_RBUTTONDOWN:`. Every check that reads a changed file passes (`run_all.py --changed`), apart from five that fail on `main` too in this WSL. - `scripts/check_host_compile.py`: Linux 83 host units, Windows (llvm-mingw) 81, 0 failed, on 7e106835a as on `main` 7bc53f841. - The whole suite `--strict`, 7e106835a against `main` 7bc53f841: 845 passed, 53 failed, 13 skipped on both, the same 53 files failing (they fail on `main` in this WSL). Since then only `tests/display_pointer_test.cpp` and `tests/test_display_pointer.py` changed, and they pass on this head. - `cargo test -p game-ui -p key-names`: 194 and 2 passed. - A cold review by a second agent (the diff and the tests) found nothing blocking. The fix's mutations it found untested, the mask and the capture's release, are now caught by the checks above. **Still to test:** - Linux, a 5-button mouse, by hand: in Controls, a listening slot takes Mouse 4 and Mouse 5 (SDL's buttons 4 and 5; the game can't run in WSL here, and the side buttons need a real mouse). Using them in play on Linux is #1172's. ## Measurements Nothing on the frame path: the mask is a constant, and the two extra `GetAsyncKeyState` calls run only when a mouse message is published. ## Risks Low. A side button pressed with the Insert menu open is now the menu's, so a listening slot takes it. Out of a listening slot nothing reads it. Out of the Insert menu nothing changes. A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. (Nothing to change: `docs/modding/settings.md` already lists `Mouse4` and `Mouse5`.) - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d
The Controls page's Keybind takes a mouse button pressed while it listens, but only the left, right and middle
ones: the side buttons (Mouse 4, Mouse 5) never reach the menu. Names them as the menu's buttons X1 (8) and X2 (16)
in the UI, the renderer's and the host's headers, and checks:
- game-ui: a listening Keybind takes X1 and X2 as Mouse4 and Mouse5; not listening, they click nothing;
- test_display_pointer: on Windows, WM_XBUTTONDOWN with the Insert menu open is a press of X1 or X2 at its point,
  VK_XBUTTON1/2 down are held, and with only a game menu or none open they stay their controls'; on Linux, SDL's
  buttons 4 and 5 are X1 and X2.
Both fail on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d
fix(input): Mouse 4 and Mouse 5 can be bound in Controls, the side buttons reaching the Insert menu (#3226)
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
c40c980845
Since the Controls page moved to the Rust UI (#2822) a Keybind takes only the left, right and middle buttons:
nothing passed the side buttons on.
- host/display.c: WM_XBUTTONDOWN with the Insert menu open is a press of X1 or X2 (button_bit, shared with the
  pop-out windows); VK_XBUTTON1/2 count as held; WM_XBUTTONUP lets the capture go like the other ups. With a game
  menu open or in play the side buttons stay their controls' (nn_hid.c reads them), and DefWindowProc still has them.
- host/posix/display_sdl.c: SDL's buttons 4 and 5 are X1 and X2 (the bridge's too).
- gpu/vk/vk_ui.cpp: the pointer's buttons pass on masked by MKW_UI_BUTTONS, no longer & 7; a static_assert keeps
  the host's bits the UI's.
- key-names: MOUSE maps the bits 8 and 16 to the codes 0x05 and 0x06, whose names are Mouse4 and Mouse5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d
Author
Contributor

Tested in game: Windows 10, RTX 4090, driver 617.42, a 5-button mouse, a copy of my own save; runtime v3.2.0-335-g7e106835a (this head's code). F1 > Controls: A's slot listening took Mouse 4, Y's took Mouse 5 (settings file: key_a = "5,0", key_y = "6,0"); the side buttons do nothing over the menu while no slot listens; in play (mouse captured) Mouse 4 and Mouse 5 act as A and Y; on the pause screen Mouse 4 confirms as A, as before.

Tested in game: Windows 10, RTX 4090, driver 617.42, a 5-button mouse, a copy of my own save; runtime v3.2.0-335-g7e106835a (this head's code). F1 > Controls: A's slot listening took Mouse 4, Y's took Mouse 5 (settings file: key_a = "5,0", key_y = "6,0"); the side buttons do nothing over the menu while no slot listens; in play (mouse captured) Mouse 4 and Mouse 5 act as A and Y; on the pause screen Mouse 4 confirms as A, as before.
cuecuemoar changed title from WIP: fix(input): Mouse 4 and Mouse 5 can be bound in Controls (#3226) to fix(input): Mouse 4 and Mouse 5 can be bound in Controls (#3226) 2026-12-05 16:26:29 +00:00
Owner
@rebase
Member

I rebased this pull request onto main (6b888fa3d2): the new head is 077f987f38.

Conflicts resolved

  • host/display.c: Kept the side-button release handling and the base branch’s updated menu function reference.

Nothing was built or run: read the resolution before merging.


Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I rebased this pull request onto `main` (6b888fa3d2c1): the new head is 077f987f38d8. **Conflicts resolved** - host/display.c: Kept the side-button release handling and the base branch’s updated menu function reference. Nothing was built or run: read the resolution before merging. --- <sub>Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed fix/mouse-side-button-bind from c40c980845
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 077f987f38
Some checks failed
PR description / Title and description (pull_request_target) Successful in 8s
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Successful in 13s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 13s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 15m0s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m26s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m7s
CI / Website build and checks (pull_request) Failing after 44s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Failing after 24m21s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 45m32s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m5s
2026-12-05 17:05:36 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The reported Windows run shows the binding fix working, but the Linux input path has not yet been tested with a real side-button mouse. Recommend approval; not approved on the forge.

The change passes side-button presses through the host and UI so a listening Controls keybind can name them Mouse4 and Mouse5. It also changes pointer handling in pop-out windows; Linux gameplay support remains a separate, existing limitation.

Nits (1): optional.

  • L2: The description says nothing else in the UI reads the side buttons and that they do nothing when no slot listens, but a press also changes the UI to pointer mode. When: With a keyboard or controller focus ring visible, pressing a side button passes a nonzero pressed mask to Core::input, which hides the ring and selects the pointer look. Do: Describe the pointer-mode change alongside the fact that side buttons do not activate controls when no keybind listens.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L1 host/posix/display_sdl.c:129: The Linux side-button binding path needs the real-mouse run already identified in Still to test. (more on the line) Do: On Linux with a five-button mouse, bind each side button in Controls and verify the displayed and saved bindings.

@fix can do L2.

Checks: Still running: PR description / Title and description (pull_request_target).

More: does it help, other systems, switches, what was read

Does it help: Yes on the reported Windows run: both buttons were bound and then used in play. The game-free tests reportedly fail on the base and pass on this head; the Linux binding path still needs an in-game run.

Other systems: Windows and Linux have separate event paths, and both also feed pop-out windows. The reported in-game run covers Windows; the Linux fixture covers the button mapping but does not exercise SDL with a real mouse. GPU vendor differences are not apparent in this input wiring. Linux gameplay support for these bindings is explicitly outside this change.

Switches: None added, changed or removed.

Reviewed: 077f987f38 against 6b888fa3d2: Read AGENTS.md, CONTRIBUTING.md, the pull request template, relevant standards, the diff and commit messages. Read the changed key-name and input definitions and the pointer test harness; inspected the changed host and renderer paths and their callers. The large changed source files and UI test file were skimmed outside the changed areas, rather than read in full. No review checklist was present at docs/review-checklist.md. Comments and supplied CI results were read; overlapping pull requests cannot be checked on the closed network beyond the one named in the description.; nothing run (a code review).

Checked and fine:

  • The new button bits match between the host and renderer and are checked by a static assertion.
  • The Windows capture release checks the remaining side buttons as well as the original three.
  • The renderer interface structs are unchanged, so the repository rule does not require an MKWVK_API_VERSION bump.
  • Both commits include AI-assistance trailers; the diff contains no game-derived outputs or generated binaries.

Testing: No code or tests were run during review. The author reports a successful Windows in-game run and game-free checks; the supplied CI status has no head-only failures and one check still running.

Overlaps and merge order: The description identifies #1172 as the separate Linux gameplay support change; its merge order cannot be verified from the checkout.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The reported Windows run shows the binding fix working, but the Linux input path has not yet been tested with a real side-button mouse. Recommend approval; not approved on the forge. The change passes side-button presses through the host and UI so a listening Controls keybind can name them Mouse4 and Mouse5. It also changes pointer handling in pop-out windows; Linux gameplay support remains a separate, existing limitation. **Nits (1)**: optional. - **L2**: The description says nothing else in the UI reads the side buttons and that they do nothing when no slot listens, but a press also changes the UI to pointer mode. *When:* With a keyboard or controller focus ring visible, pressing a side button passes a nonzero pressed mask to Core::input, which hides the ring and selects the pointer look. **Do:** Describe the pointer-mode change alongside the fact that side buttons do not activate controls when no keybind listens. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `host/posix/display_sdl.c:129`: The Linux side-button binding path needs the real-mouse run already identified in Still to test. (more on the line) **Do:** On Linux with a five-button mouse, bind each side button in Controls and verify the displayed and saved bindings. `@fix` can do L2. **Checks:** Still running: `PR description / Title and description (pull_request_target)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the reported Windows run: both buttons were bound and then used in play. The game-free tests reportedly fail on the base and pass on this head; the Linux binding path still needs an in-game run. **Other systems:** Windows and Linux have separate event paths, and both also feed pop-out windows. The reported in-game run covers Windows; the Linux fixture covers the button mapping but does not exercise SDL with a real mouse. GPU vendor differences are not apparent in this input wiring. Linux gameplay support for these bindings is explicitly outside this change. **Switches:** None added, changed or removed. **Reviewed:** 077f987f38d8 against 6b888fa3d2c1: Read AGENTS.md, CONTRIBUTING.md, the pull request template, relevant standards, the diff and commit messages. Read the changed key-name and input definitions and the pointer test harness; inspected the changed host and renderer paths and their callers. The large changed source files and UI test file were skimmed outside the changed areas, rather than read in full. No review checklist was present at docs/review-checklist.md. Comments and supplied CI results were read; overlapping pull requests cannot be checked on the closed network beyond the one named in the description.; nothing run (a code review). **Checked and fine:** - The new button bits match between the host and renderer and are checked by a static assertion. - The Windows capture release checks the remaining side buttons as well as the original three. - The renderer interface structs are unchanged, so the repository rule does not require an MKWVK_API_VERSION bump. - Both commits include AI-assistance trailers; the diff contains no game-derived outputs or generated binaries. **Testing:** No code or tests were run during review. The author reports a successful Windows in-game run and game-free checks; the supplied CI status has no head-only failures and one check still running. **Overlaps and merge order:** The description identifies #1172 as the separate Linux gameplay support change; its merge order cannot be verified from the checkout. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.</sub>
@ -127,3 +127,3 @@
pointer_publish_at(x, y, pressed, wheel);
}
static uint32_t sdl_button_bit(int b) { return b == 1 ? HOS_MOUSE_LEFT : b == 3 ? HOS_MOUSE_RIGHT : b == 2 ? HOS_MOUSE_MIDDLE : 0; }
static uint32_t sdl_button_bit(int b) { /* (SDL's 4 and 5 are the side buttons, Mouse 4 and 5: #3226) */
Member

L1 (should fix): The Linux side-button binding path needs the real-mouse run already identified in Still to test.

When: The fixture supplies SDL button numbers directly, so it cannot show that a real Linux SDL event reaches a listening Controls slot and is saved as the intended binding.

Do: On Linux with a five-button mouse, bind each side button in Controls and verify the displayed and saved bindings.

**L1** (should fix): The Linux side-button binding path needs the real-mouse run already identified in Still to test. *When:* The fixture supplies SDL button numbers directly, so it cannot show that a real Linux SDL event reaches a listening Controls slot and is saved as the intended binding. **Do:** On Linux with a five-button mouse, bind each side button in Controls and verify the displayed and saved bindings.
HumanBean deleted branch fix/mouse-side-button-bind 2026-12-05 17:07:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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
MagicBeanDev/Longshot!3257
No description provided.