Skip to content

InkWell does not expose callbacks for handling tertiary taps #129058

Closed
flutter/packages
#12676

Description

@Craftplacer

Is there an existing issue for this?

Use case

In my app, I want to replicate the behavior of opening content in another view via the middle mouse button. I'm not quite sure if Material intends a ripple effect to be shown for the middle mouse button but in this case I thought to put it in my existing InkWell for now. I see that #62788 has implemented middle mouse button clicks (tertiary taps) but the PR author failed to update potentially related widgets.

Proposal

Expose and handle following callbacks:

  • onTertiaryTap
  • onTertiaryTapUp
  • onTertiaryTapDown
  • onTertiaryTapCancel

Activity

  1. Craftplacer commented on Jun 17, 2023

    @Craftplacer
    ContributorAuthor

    Side note: I am slightly worried about the API complexity as it is right now because we're introducing 4 callbacks for each pointer device button. A drawing tablet stylus can have up to 3 buttons and a mouse up to 5 buttons. Are there any plans to refactor/simplify/future-proof these interfaces?

  2. darshankawar commented on Jun 19, 2023

    @darshankawar
    Member

    The said methods are exposed / available for GestureDetector class but not for InkWell currently.

    https://api.flutter.dev/flutter/material/InkWell/InkWell.html

  3. added
    c: new featureNothing broken; request for a new capability
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Jun 19, 2023
  4. Craftplacer commented on Jun 21, 2023

    @Craftplacer
    ContributorAuthor

    Related: #115641

  5. HansMuller commented on Jun 21, 2023

    @HansMuller
    Contributor
  6. flutter-triage-bot commented on Mar 8, 2024

    @flutter-triage-bot

    This issue is missing a priority label. Please set a priority label when adding the triaged-design label.

  7. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Mar 13, 2024
  8. Renzo-Olivares commented on Mar 19, 2024

    @Renzo-Olivares
    Contributor

    Hi @Craftplacer, I think given a specific widget and use-case we would welcome a PR to add tertiary tap support. I do recognize that this callback pattern doesn't scale well, and is definitely something that requires a re-visit in the future. One potential solution I can think of is providing the button type in the details object provided to a callback. If I find some time I'll explore this, but anyone is also welcome to try.

  9. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
  10. github-actions commented on Oct 28, 2026

    @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.

  11. locked as resolved and limited conversation to collaborators on Oct 28, 2026
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

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions