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

Feature req: Timeout gesture for default action #118

Open
kn666 opened this issue Apr 8, 2022 · 6 comments
Open

Feature req: Timeout gesture for default action #118

kn666 opened this issue Apr 8, 2022 · 6 comments

Comments

@kn666
Copy link

kn666 commented Apr 8, 2022

Sometimes the default behavior of the right button is required. If you right-click and wait longer than the threshold value without moving (for example, 0.5 s), the gesture can be canceled and default events can be triggered. Thanks.

@kn666 kn666 changed the title Feature req: Timeout gesture for default reaction Feature req: Timeout gesture for default action Apr 8, 2022
@kn666
Copy link
Author

kn666 commented Apr 12, 2022

  1. Also if gesture is shorter than some minimum (5-10px) cancel it and fire default click event.

@username0x0a
Copy link
Member

username0x0a commented Apr 15, 2022

There certainly is a default action 🤔 and it works exactly as you describe; if you don't move the mouse at all, after a short timeout, right click is invoked; at least in case of click quick.

The minimum pixel length rule is also applied already. 👍

Is there some specific application causing you troubles? It could also be caused by your gestures configuration, yet I can't really think about a possible setup in real quick. Or do you specifically mean click-and-hold action? 💡

@kn666
Copy link
Author

kn666 commented Apr 15, 2022

For example, in Desktop (Finder) even after shortest movement menu will not be opened.
Similarly even if I wait for several seconds, gesture will not timeout. This is disturbing in RDP window, where I need interaction with MS Windows for right button file drag-drop.

What are timeout and minimal length values? Is it possible to expose them for fine tuning?

@username0x0a
Copy link
Member

username0x0a commented Apr 15, 2022

Uff, I haven't looked at the code for some time 😄 yet it should be as follows:

  • minimal gesture length value (threshold) seems to be 30 screen points (AppDelegate.m:382)
    • I've just tested – short gestures are ignored and invoke context menu immediately, it behaves this way (to my surprise) in all 360° directions
  • timeout after quick mouse click release is pretty short, yet still capable of performing the gesture when it's indicated
    • there's no actual value here I guess as it's only limited by the interruption MacGesture causes in the event loop, tries to identify the gesture and hands the event resolution back to the system in case no gesture is recognised

If you press the right-button, keep it pressed and release after some time, then no, there's no timeout in that case (as during the press, we expect user to perform a gesture) and after releasing, context menu is shown until manually dismissed. If you want the context menu to be shown, you're supposed to either a) release the right mouse button at some point or b) release it immediately so that MG wouldn't even start recognising the gesture.

Behaviour in combination with any RDP/remote desktop software may cause issues as these apps have their own mouse capture & events processing stacks, very likely in conflict with what MG may do. Windows-specific gestures like right-mouse dragging are even not known to macOS and since MG wants to follow macOS behaviour guidelines in the first place, this would be a direct conflict. I'd better recommend blacklisting RDP apps as we can't really guarantee any good behaviour with these.

@kn666
Copy link
Author

kn666 commented Apr 17, 2022

  1. Could you please expose 30 in settings to play with it? I have a HiDPI screen, and maybe 30 is not enough for me.
  2. If I
  • press the right button, wait 3 sec, draw a gesture, release the right button
  • or press the right button, draw a gesture, wait 3 sec, release the right button
    in both cases, the gesture is fired. Is it different for you?

I'd prefer to have the standard action if the gesture took longer than {parameter} seconds.

@kn666
Copy link
Author

kn666 commented Apr 20, 2022

I've additionally checked 1. Short gesture is actually not triggered. But default action - like local menu for desktop is also not invoked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants