Skip to content

Repeating left click on long press - #343

Closed
EtienneMiret wants to merge 3 commits into
gujjwal00:masterfrom
EtienneMiret:repeated-clicks
Closed

Repeating left click on long press#343
EtienneMiret wants to merge 3 commits into
gujjwal00:masterfrom
EtienneMiret:repeated-clicks

Conversation

@EtienneMiret

Copy link
Copy Markdown
Contributor

This PR adds an option to the long press gesture action that turns long presses into repeated clicks.

I wasn’t able to create a unit test for it. I tried, but it seems View#postDelayed(Long, () -> Unit) is ignored during unit tests. On my device, this worked very well when tested manually along with commit 5b4f142.

@gujjwal00

Copy link
Copy Markdown
Owner

Can you please give some details about the use case here? Because, IMHO, this looks like a macro that's useful only in a specific app/game. AVNC doesn't feel like the best place for it (maybe something like XClicker would be more usefull?)

@EtienneMiret

Copy link
Copy Markdown
Contributor Author

The use case is to input several letters on a long press on a virtual keyboard. But now that you mention it, maybe AVNC should just trigger a long click (there is already an option for this) and let the virtual keyboard decide what to do then.

I’m checking with my team about whether we can have our virtual keyboard handle long clicks properly.

@gujjwal00

Copy link
Copy Markdown
Owner

Yes, the Long-press option was added specifically for such cases. And not just key-repeat, it allows different behaviors like showing a context menu on long press.

Handling key-repeat on server-side will also ensure that it works with any VNC client.

@EtienneMiret

Copy link
Copy Markdown
Contributor Author

Okay, my latest tests shows we have the desired behavior with the Long-press option. Thank-you!

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.

2 participants