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

Four finger Hold and swipe (workspace switch) strange hitch feeling even with a 0ms delay. #195

Open
peeweek opened this issue Jul 8, 2023 · 1 comment

Comments

@peeweek
Copy link

peeweek commented Jul 8, 2023

Hello,

After weeks of using this wonderful extension, I switched back to windows, and I felt a really strange difference 4-finger in workspace switching, While on windows, the swipe is immediate, and do not require any hold gesture, using the extension involves a slight hitch before the swipe starts. I have tried putting a 0ms delay, but still, it feels somehow not as reactive as I would expect.

While browsing the code on how it runs, I stumbled upon this line:

(this._swipeGestureBeginTime - this._holdGestureCancelTime <= Math.max(100, TouchpadConstants.HOLD_SWIPE_DELAY_DURATION)) // ms

It seems that there is an additional clamped minimum of 100ms delay for swipe gesture, regardless the amount of milliseconds set in the preferences. From what I understand, regardless of what you configure, it will require at least 100ms of delay before the gesture will start being detected as a Hold/4-Finger-Swipe

I am not sure about the details, why this delay was implemented. Is it a safeguard to prevent glitches? or is it just something that could be removed to improve the reactivity of the gesture?

Thank you, again for the hard work and dedication, <3 your extension make my days even brighter

@peeweek peeweek changed the title Four finger Hold and swipe (workspace switch) strange hitch feelingm even with a 0ms delay. Four finger Hold and swipe (workspace switch) strange hitch feeling even with a 0ms delay. Jul 8, 2023
@peeweek
Copy link
Author

peeweek commented Jul 8, 2023

After making some tests locally I was not able to reach the behavior that I expected, until I found this threshold in the constants that seems to be related to the swipe behavior :

DRAG_THRESHOLD_DISTANCE: 16,

I tampered with the value, with relatively low values (down to 2) and it felt way better.

I know that this threshold is probably here for a reason. But it could be interesting to make it editable so users could adjust the sensitivity of the swipe threshold.

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

1 participant