You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the TinyPilot web UI is used via a touch device (e.g., a tablet), you might not be able to issue double clicks by tapping twice on the remote screen.
That’s because when tapping twice with a finger, it’s quite hard to make the second tap so that it matches the position of the first tap exactly. Depending on the operating system of the target machine, the two taps (clicks) won’t be recognised as true and proper double-click, due to the position mismatch. Instead, the target machine treats both clicks as independent.
One way of solving this could be via some sort of timing logic, where we re-use the position of the first tap in case the second tap happens (a) within a certain time threshold and (b) within a certain distance limit.
The text was updated successfully, but these errors were encountered:
Resolves#1781.
This PR improves double-click emulation so that both of the consecutive
mouse (touch) events have the exact same location. On a touch device,
you might otherwise accidentally direct the second click to a slightly
different location, or the target operating system might not even
recognise both clicks as proper double click.
## Notes
- I’ve slightly re-ordered the commentary, which I thought was sensible
due to the increased complexity in the file.
- The parameters for detecting a double-click are heuristic at best –
the 500ms delay is from [this
article](https://en.wikipedia.org/wiki/Double-click#:~:text=rely%20upon%20it.-,Speed%20and%20timing,basis%20for%20other%20timed%20actions.),
and the 500px distance just felt okay when trying from an iPad.
I’ve tested with this on an iPad, so from my side a pure code review
would suffice.
<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1787"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>
---------
Co-authored-by: Jan Heuermann <jan@jotaen.net>
Related #270, see also our initial proof-of-concept.
When the TinyPilot web UI is used via a touch device (e.g., a tablet), you might not be able to issue double clicks by tapping twice on the remote screen.
That’s because when tapping twice with a finger, it’s quite hard to make the second tap so that it matches the position of the first tap exactly. Depending on the operating system of the target machine, the two taps (clicks) won’t be recognised as true and proper double-click, due to the position mismatch. Instead, the target machine treats both clicks as independent.
One way of solving this could be via some sort of timing logic, where we re-use the position of the first tap in case the second tap happens (a) within a certain time threshold and (b) within a certain distance limit.
The text was updated successfully, but these errors were encountered: