Repository navigation
Conversation
Mice report their thumb buttons as either BTN_SIDE/BTN_EXTRA or BTN_BACK/BTN_FORWARD. MouseBack and MouseForward only matched the first pair, so binds on them never fired for mice using the second. A mouse bind now holds every code its name covers. Fixes noctalia-dev#445
Saeverix
marked this pull request as ready for review
October 14, 2026 21:32
Contributor
|
This pull request was converted to a draft because its description is missing required Missing:
Add the items above to the description, keeping their exact wording, then mark the pull Sections that only offer context may be deleted; nothing else about this pull request was |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mice report their thumb buttons as either BTN_SIDE/BTN_EXTRA or BTN_BACK/BTN_FORWARD. MouseBack and MouseForward only matched the first pair, so binds on them never fired for mice using the second. A mouse bind now holds every code its name covers.
Fixes #445
Summary
MouseBackandMouseForwardnow match both evdev codes mice use for their thumb buttons:BTN_SIDE/BTN_BACKandBTN_EXTRA/BTN_FORWARD.Keybind::mouseButton(one code) becamemouseButtons(every code the name covers), andhandleMouseBindchecks whether the pressed codeis in that list. The other uses of the field only changed their types. Presses that no bind consumes
still reach clients with their original code.
Motivation
Mice report their thumb buttons under one of two evdev pairs. Most use
BTN_SIDE/BTN_EXTRA, butsome (the reporter's Logitech, for example) send
BTN_FORWARD, soMod+MouseForwardnever fired forthem.
Type of Change
Related Issue
Fixes #445
Testing
Run in containers that mirror the CI "Build and test" and "Lint" jobs (
archlinux:latest, same packages,unprivileged user):
just build: builds with-Werrorjust test: 65 passed, 0 failed. 49 skipped are umbrielfx renderer tests that need a GPU (exit 77).just lint: clang-tidy clean across all 203 filesAlso built natively for Fedora 44 and run as a nested session (see Manual Coverage).
Manual Coverage
Mod+MouseBack/Mod+MouseForwardwork in a nested session with my mouse, which sendsBTN_SIDE/BTN_EXTRA. I don't have a mouse that sendsBTN_BACK/BTN_FORWARD, so that path iscovered by the unit test only. It would be great if the reporter could confirm it.
Screenshots / Videos
Checklist
SCOPE.md, or its scope was agreed in an issue or on Discord first.CONTRIBUTING.md.just format, or this PR has no C++ changes.docs/andexamples/config.toml, or this PR does not change user-facing configuration or behavior.Additional Notes
This is my first contribution to Umbriel, because I love Noctalia and Umbriel. It's also my first
change in a C++ project, so please be kind with the feedback. I'm an experienced C# developer, but
C++ needs a different mindset for many things.
AI disclosure: I wrote this change with Claude Code (an AI coding assistant). The AI wrote most
of the C++, while I directed and reviewed it. In review I pushed back on its first version, which
converted the pressed code with two new helper functions and also changed
scroll_button. I askedfor the current approach instead: store every code in the bind and match against the list, with no
new helpers, and keep the change limited to keybinds. I also had it extend the existing
parsesMouseButtonstest rather than add a separate one. I've gone through the final diff andunderstand what it does, but I'd welcome extra scrutiny of the C++ itself.
Known trade-offs:
BTN_SIDEandBTN_BACKseparately; both triggerMouseBack.scroll_buttonstill uses a single code (its own list infields_input.cpp), soscroll_button = "MouseForward"is still rejected on aBTN_FORWARDmouse. Left out to keep thisPR to the ticket; happy to follow up if wanted.