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

add Mouse Trackpad mode and gesture like laptop #5

Closed
sukualam opened this issue Oct 8, 2021 · 8 comments
Closed

add Mouse Trackpad mode and gesture like laptop #5

sukualam opened this issue Oct 8, 2021 · 8 comments

Comments

@sukualam
Copy link

sukualam commented Oct 8, 2021

please add trackpad mode, its hard to operating with direct touch..

@gujjwal00
Copy link
Owner

I have tried to implement it but there is a synchronization issue which sort of put me off. Basically, VNC servers do not report the pointer coordinates to client when they change on server side (unless the client decides to draw the pointer locally). So client has to rely on where it sent the last pointer event, which becomes outdated if the pointer is moved without going through the client.

As for the gestures, aren't they already like a laptop?

@leap0x7b
Copy link

leap0x7b commented Nov 1, 2021

I'm so used to this when I previously use RealVNC Viewer. Also, some VNC servers like TigerVNC set the VNC cursor bitmap (yes, VNC has a dedicated cursor bitmap, as seen in RealVNC Viewer) to the X11 cursor bitmap, it also automatically syncs the X and Y positions to the X11 cursor position. So, it certainly not an issue for TigerVNC. I want this feature in AVNC. I felt like AVNC is the most complete VNC viewer because it has so many features I needed in a VNC viewer, in addition of useful features like server discovery and PiP.

@gujjwal00 gujjwal00 reopened this Nov 1, 2021
@gujjwal00
Copy link
Owner

Sorry, accidentally closed!

@gujjwal00
Copy link
Owner

Also, some VNC servers like TigerVNC set the VNC cursor bitmap (yes, VNC has a dedicated cursor bitmap, as seen in RealVNC Viewer) to the X11 cursor bitmap, it also automatically syncs the X and Y positions to the X11 cursor position. So, it certainly not an issue for TigerVNC.

Yes, I know that (please read my first comment). You can still find some remains of my first attempt.

Nevertheless, I will try again to implement it by remembering the last pointer position we sent any event to.

I am not implementing client-side cursor drawing for now though. Not because I dislike it, but because it is too much nontrivial change with the current rendering code of AVNC.

@gujjwal00
Copy link
Owner

Hi all, I have an early version of this feature ready for testing. Please try it, and let me know if it works as expected.

Test APK: app-test.zip

How to enable touchpad mode:
Go to Settings => Input => Gestures.
Disable Direct Touch.
Change the action for 1 Finger Swipe gesture to Move Pointer.

What you can test:
Left/right/double clicking, drag/scroll gestures, or anything else really.

Known issues:
Fling gesture is not yet disabled in Touchpad mode.
AVNC tries to move the pointer to middle of the screen after connecting. Sometimes this can fail.

@zequinh4
Copy link

zequinh4 commented Dec 23, 2021

Greetings @gujjwal00 . Once again, thank you very much for your commitment to the community. I did the test with the samsung trackpad (keyboard cover). Single click and double click working perfectly. The movement too.

Mistake
I cannot scroll to move up or down a content.

What happens?
When you try to scroll with two fingers on the trackpad, what happens is a navigation through the elements of the screen without the pointer moving.

Screen_Recording_20211223-183745_AVNC.mp4

@gujjwal00
Copy link
Owner

Hi @zequinh4 , this issue is about different modes of finger gestures, and should not affect hardware touchpad.

What you are experiencing might be a different bug, so I have opened a separate issue for it. Let's discuss it there.

@gujjwal00
Copy link
Owner

I have implemented trackpad/touchpad mode. It should be available on F-Droid in 2-3 days.

To activate it, disable Settings => Input => Gestures => Direct touch.
When active, One-finger swipe gesture-preference will be disabled, and hard-coded to move the pointer.

Commit: c29b843.
Test APK [CI build]: https://github.com/gujjwal00/avnc/suites/4883905418/artifacts/139823793

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

No branches or pull requests

4 participants