Skip to content

Gesture detect Middle Mouse Button #62488

Closed

Description

Use case

There seems to be a PointerEvent for the middle mouse button, however, I see no way to access it from widgets.

Proposal

It would be very useful if you could have an onMiddleMouseButtonPressed callback on the widget level.

Activity

  1. added
    a: mouseIssues related to using a mouse or mouse support
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    c: new featureNothing broken; request for a new capability
    on Jul 29, 2020
  2. goderbauer commented on Jul 29, 2020

    @goderbauer
    Member
  3. added
    P3Issues that are less important to the Flutter project
    on Jul 29, 2020
  4. gspencergoog commented on Jul 29, 2020

    @gspencergoog
    Contributor

    It's possible to do this by looking at TapGestureRecognizer, you can see how it's implemented, and that recognizer can participate in the gesture arena. Basically you have to use a lower level interface than GestureDetector.

    It would be good, however, to support onTertiaryTap* for the gesture detector.

  5. creativecreatorormaybenot commented on Jul 30, 2020

    @creativecreatorormaybenot
    ContributorAuthor

    @gspencergoog Yes, thank you. I was aware of that, however, it would be useful to have this option on the widget level. Do you think making a PR would be benificial?

  6. creativecreatorormaybenot commented on Jul 30, 2020

    @creativecreatorormaybenot
    ContributorAuthor

    I mean that it would be nice to not have to use RawGestureDetector or a custom RenderObject.

  7. gspencergoog commented on Jul 30, 2020

    @gspencergoog
    Contributor

    Yes, I agree. If you'd like to make a PR, that would be great, and otherwise we will get to it eventually. You'll want to look at onSecondaryTap{Up,Down,Cancel} on the GestureDetector, and call it onTertiaryTap{Up,Down,Cancel}. There shouldn't be a plain onTertiaryTap because we don't support double-tap on the secondary button, much less the middle button, and onTap is there mainly to be able to determine the difference between double and single tap.

  8. creativecreatorormaybenot commented on Jul 31, 2020

    @creativecreatorormaybenot
    ContributorAuthor

    @gspencergoog That sounds good. I think that I will open a PR for it 👍🏼

  9. creativecreatorormaybenot commented on Aug 3, 2020

    @creativecreatorormaybenot
    ContributorAuthor

    @gspencergoog I openend a PR, according to how I understood your guidance.

    I really hope that I got it right 😂 Performing changes for that is a mess 😅

  10. gspencergoog commented on Aug 3, 2020

    @gspencergoog
    Contributor

    Thanks! I'm actually out on vacation this week, so it'll be a bit until I get to it, but maybe someone else will take a look before then.

  11. github-actions commented on Aug 18, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: desktopRunning on desktopa: mouseIssues related to using a mouse or mouse supportc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterfound in release: 1.21Found to occur in 1.21frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions