feat(event): implement touchpad and touchscreen button translation - #711
Merged
pastaq merged 2 commits intoSep 14, 2026
Merged
Conversation
Translate Touch::Button events to mouse buttons, gamepad buttons, keyboard keys, and touchpad buttons in custom profiles. Fixes ShadowBlip#692
Contributor
Author
Testing & Validation
|
pastaq
requested changes
Sep 12, 2026
| } | ||
| } | ||
|
|
||
| #[cfg(test)] |
Contributor
There was a problem hiding this comment.
Please make a new file, value_teat.rs, for all unit testing.
Contributor
Author
There was a problem hiding this comment.
Done. Extracted all unit tests into a dedicated src/input/event/value_test.rs file and verified test execution.
| } | ||
| } | ||
|
|
||
| fn translate_touch_button( |
Contributor
There was a problem hiding this comment.
This is a bit of an anti-pattern but it does reduce nesting quite a bit. Probably a good direction for a refactor of older code at a later time. Not an ask, just making a note for myself.
pastaq
approved these changes
Sep 12, 2026
Contributor
Author
|
@pastaq is there an automation that merges the changes, as I dont see an option to merge the PRs. |
Contributor
|
No, I'll do it when I'm ready to publish a new release. |
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.
When configuring custom device profiles with touchpad button mappings (e.g.
Touchpad:RightPad:Touch:Button:Press->Mouse:Button:Left), translations previously failed withTranslation not implemented for profile mapping.Changes
translate_touch_button()insrc/input/event/value.rsto routeTouch::Buttonevents (TouchandPress) to mouse buttons, gamepad buttons, keyboard keys, and touchpad buttons.Fixes #692