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

Easier to use right click interaction for touchscreens #68

Merged
merged 3 commits into from
Mar 30, 2023

Conversation

lazd
Copy link
Contributor

@lazd lazd commented Mar 29, 2023

Now you can tap/hold/release and the menu persists or tap/hold/drag/release to select an item.

A timer is now used instead of ticks to determine if a right click should be triggered, and the delay for triggering has been shortened substantially (now it more closely matches Windows).

A deadzone is introduced after right clicking that ensures the menu does not close due to the cursor moving after the right click has been triggered.

After a right click has been triggered, inputs are considered hovers, not clicks, and a special case has been introduced to simulate a click when lifting the finger for a tap/hold/drag/release interaction. This makes using the menu natural for both tap/hold/release/tap to select item in menu or tap/hold/drag/release to select item in menu interaction patterns.

Right.click.demo.mov

@kprinssu
Copy link
Collaborator

Thanks again for the hard work @lazd!

@kprinssu kprinssu merged commit 858c6f2 into VoodooI2C:master Mar 30, 2023
@blankmac
Copy link
Collaborator

Well done. Thanks for working on this!

@lazd
Copy link
Contributor Author

lazd commented Mar 30, 2023

Thanks, @blankmac! If you get a chance to test this, please let me know if you see any strange behavior and I'd be glad to circle back and fix it. I'll be testing extensively on my machine as well.

@lazd
Copy link
Contributor Author

lazd commented Mar 31, 2023

I'm noticing a couple quirks with this, such as left clicks being triggered before the right click fires, so I'm be working on a fix for that and for scroll behavior sometimes turning into drag if you don't lift both fingers at precisely the same time. If anyone finds other bugs, please let me know!

@kprinssu
Copy link
Collaborator

@lazd Please create a follow up a PR! Thanks again for the effort.

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

Successfully merging this pull request may close these issues.

3 participants