Skip to content

Add basic double click recognition - #205

Open
Feksaaargh wants to merge 1 commit into
InfiniTimeOrg:mainfrom
Feksaaargh:doubleclick
Open

Feksaaargh wants to merge 1 commit into
InfiniTimeOrg:mainfrom
Feksaaargh:doubleclick

Conversation

@Feksaaargh

Copy link
Copy Markdown

This commit adds the ability for InfiniSim to fire the DoubleTap event at all, since it currently cannot.

This implementation is not accurate to actual hardware, which seems to "hold" sequences of taps and figure out what to do with them after taps stop coming in. If it's one tap it sends a normal tap, if it's two taps it sends a double tap, and if it's more then it does nothing (so if you tap the screen repeatedly, it does not send any gestures).
This behavior is verifiable in this example app: https://github.com/Feksaaargh/InfiniTime/tree/app-event-tester (note that the app also consumes button inputs, so you need to long press the button to exit it).

Another inaccuracy is that when double clicking, the first click will send a SingleTap and the second will send a DoubleTap, due to the lack of something like the aforementioned hold system. Hardware only sends the DoubleTap event. I'm not sure if this can be fixed without modifying the general control flow a good bit, since that would require the ability to send an event without direct user input (so some sort of asynchronous and cancellable wait or a system constantly polling/updating the input state).

For now though, I consider this a "good enough" solution to the problem.

This branch has not been deployed

No deployments
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.

1 participant