Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for multiple mouse button events #8480

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ElliotGarbus
Copy link
Contributor

This PR adds support for multiple mouse button events, fixing issue #3597
The PR also adds some documentation for how the mouse multi-touch simulation works.

Implementation note: The original implementation used a variable, self.current_drag to hold the current touch. This limited the behavior to only work correctly when one button was pressed at a time. In multi-touch simulation is this not an issue as the buttons have predefined roles. When multi-touch simulation is disabled this did not allow multiple buttons to be used simultaneously. This fix changes self.curent_drag to a dictionary, and holds a touch per button. In the case that multi-touch simulation is enabled, a single key is used to access the self.current_drag dict, retaining the original behavior.

When multi-touch simulation is disabled. Each mouse button will properly report their button up/down state changes. If the mouse is dragged with multiple buttons pressed there will be an on_touch_move message for each button.

Maintainer merge checklist

  • Title is descriptive/clear for inclusion in release notes.
  • Applied a Component: xxx label.
  • Applied the api-deprecation or api-break label.
  • Applied the release-highlight label to be highlighted in release notes.
  • Added to the milestone version it was merged into.
  • Unittests are included in PR.
  • Properly documented, including versionadded, versionchanged as needed.

@akshayaurora akshayaurora added this to the 3.0.0 milestone Dec 12, 2023
@akshayaurora akshayaurora added the Component: input kivy/input label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants