tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
3.02k stars 252 forks source link

Touch input: improve double click emulation #1781

Closed jotaen4tinypilot closed 5 months ago

jotaen4tinypilot commented 5 months ago

Related https://github.com/tiny-pilot/tinypilot/issues/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.