Skip to content

Feature request: force touch action without normal click #45

Closed

Description

@smammy

I have the "Force touch with one finger" gesture set up trigger a middle mouse click. It looks like Multitouch is sending a normal click event followed by a force touch event.

Any way to prevent the normal click event from being sent? My use case is using force touch as middle click, to open links in new tabs in Firefox.

Activity

  1. changed the title [-]Feature request: torce touch action without normal click[/-] [+]Feature request: force touch action without normal click[/+] on Jun 13, 2019
  2. rxhanson commented on Jun 14, 2019

    @rxhanson
    Owner

    In order to prevent the normal click from being sent for this gesture, Multitouch would have to intercept all clicks on the trackpad and wait to see if a force touch follows each one before programmatically executing a click after some specified delay if no force touch occurs. If the delay is too long, then normal mouse clicks - particularly mouse down, would be noticeably delayed. If the delay is too short, the force touch has to be executed really quickly after the initial click (this might not be an issue for most people). My initial thought has always been that it wouldn't be possible to get the delay right, and that any amount of delay would produce noticeable lag at a certain point.

    With all that said, the proper path forward may just be to remove click actions or specifically the middle click action as a possible option for this gesture. I left them all in because they might still be of use depending on the applications a user has, but middle click for browsers would most likely be the common choice here. I'll revisit the timing of intercepting clicks though, to be sure what the best user experience would be.

  3. smammy commented on Jun 14, 2019

    @smammy
    Author

    Ah, I see. Thanks for the explanation. I think you're right that delaying normal clicks to see if they're followed by a force touch is probably not going to work well. I'd be happy to try out any test releases you might make as you're experimenting. In the mean time I'm going to try to kludge force touch support into Firefox. 😆

  4. smammy commented on Jun 14, 2019

    @smammy
    Author

    Just playing around a bit, I think my use case could be satisfied by mapping 1-finger force touch to a "click with command key down" action. Firefox maps ⌘Click to Open Link in New Tab, and it checks for the command key on mouseUp, not mouseDown. So what about adding an option to send click events with a modifier key down?

  5. smammy commented on Jun 14, 2019

    @smammy
    Author

    (I see that "⌘-click" is an option for the three-finger click trigger, but not for force touch click triggers.)

  6. rxhanson commented on Jun 14, 2019

    @rxhanson
    Owner

    As you might suspect, I did not include the left clicks (with modifiers) as available actions for reasons similar to what you're experiencing with the middle click. A force touch means that you have a human executed mouse down and if additional programmatic mouse clicks are executed on top of that human executed left mouse down, then there's some pretty jenky mouse click behavior. A while back, I looked into executing a programmatic mouse up followed by another mouse down/up upon force touch, but the jenky behavior still persisted.

    There is something else I could try that might work, but might still have strange behavior: executing a programmatic mouse up with modifier when the force touch occurs. Since links are opened in Firefox (and other browsers) on mouse up, this theoretically should work. I'll post back when I get a chance to test it out.

  7. smammy commented on Jun 14, 2019

    @smammy
    Author

    That makes sense. Good luck and let me know when you have something ready to test. :)

  8. rxhanson commented on Jun 15, 2019

    @rxhanson
    Owner

    Alright, I tried out the programmatic mouse up with cmd modifier on force touch, and this worked for opening links in a new tab on both Firefox and Chrome. It's in the v1.13.4 beta. Let me know when you get a chance to try it out and if it works for you.

    This is one of the few actions that I would consider adding in some functionality to make it so this only occurs when firefox or chrome are frontmost, but that's not an easy thing to communicate in the UI since it's specific to a single gesture/action combination. I'll put a task on my backlog to come back to it another time and see if there's an elegant way to do it.

  9. smammy commented on Jun 21, 2019

    @smammy
    Author

    Thanks! I've been busy but will try it as soon as I can!

  10. smammy commented on Jun 21, 2019

    @smammy
    Author

    This works perfectly for my use case. Thanks!

  11. rxhanson commented on Jun 21, 2019

    @rxhanson
    Owner

    Awesome! Thanks for testing it out and getting back to me.

  12. smammy commented on Jun 27, 2019

    @smammy
    Author

    Still working great, @rxhanson! However, it only works for links. In firefox, middle-click on a tab header closes the tab, but cmd-click doesn't. So I'm wondering if you can revisit this one and see if a proper middle-click event can be sent.

  13. rxhanson commented on Jun 27, 2019

    @rxhanson
    Owner

    Off the top of my head, I think this should work. I'll see if I can roll it into my next release.

  14. rxhanson commented on Jun 29, 2019

    @rxhanson
    Owner

    Alright, this is now in v1.15. I made it a new click action, called Force Touch Middle Click, so you'll have to configure the gesture to this new action. Let me know if it works as you'd expect when you get a chance to try it out.

  15. smammy commented on Jul 3, 2019

    @smammy
    Author

    v1.15 works great for Firefox. Thanks!

  16. smammy commented on Jul 3, 2019

    @smammy
    Author

    Oh, also, I'm glad you decided to extend it to all apps... being able to middle-click in iTerm again is great!

  17. rxhanson commented on Jul 3, 2019

    @rxhanson
    Owner

    Thanks for trying it out and letting me know!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions