gujjwal00 / avnc

VNC Client for Android
GNU General Public License v3.0
600 stars 57 forks source link

Question on external mouse event logging? #232

Closed wuzhongjie1997 closed 2 months ago

wuzhongjie1997 commented 2 months ago

First of all, thanks a lot for this great app, it's the most responsive and elegant VNC for Android client I've ever seen. Great job!

Description of issue

Now I have an android tablet running a highly modified Android 14 ROM. When using AVNC in landscape mode, I enabled 'touch screen mode', turned on 'mouse event pass through' and noticed this weird issue:

Whenever I try to interact with the app using an external USB mouse, and when the cursor is to the right side of the screen (when the X coordinate as measured by Android Developer Settings goes beyond 1600, the height in pixels of my screen), any mouse events (right click, double click, left click, drag...) that i trigger from the usb mouse gets ignored by the app.

So basically i can only use the external mouse in a 1600x1600 square area to the left of my screen.

My thoughts and questions

Now that this involves a specific display orientation (landscape mode), the weird x-coordinate limit, and that the issue is not present on my other Android devices, tell me this is most likely an issue with the OS in this specific tablet. I'm currently reaching out to their official tech support, but in the meantime I'd really like to grab some logs for myself and try to figure things out.

So - is it possible? How can I use the logging function of AVNC to try to get an understanding of this issue? If impossible, what would be your advice on trying to solve this issue? The logs are primarily to be provided to the tech support, but I guess the same issue would be present in a lot of other devices...

Many thanks for reviewing, and any feedback is appreciated.

wuzhongjie1997 commented 2 months ago

This clip shows some mouse interactions I tried when reproducing the issue. Drags started from the left (X < 1600) region can continue functioning to X > 1600 area, cannot start drags in X > 1600 area. Clicks also don't work with X>1600.

Weirdly enough, touch screen clicks do work even with X>1600...... Can't understand this. Though, using external mouse is a real requirement for using CAD design apps remotely, so this issue is pretty frustrating for me.

screen-20240623-135218.mp4

gujjwal00 commented 2 months ago

This looks very much like issue #203.

wuzhongjie1997 commented 2 months ago

What most baffles me here is that, tapping the touchscreen is OK consistently throughout the entire display area, the issue only arises when I use a USB mouse...... makes me wonder where the differences may be. Also, outside of AVNC the USB mouse clicks OK all over the screen as well.

wuzhongjie1997 commented 2 months ago

Just to be clear, I tried toggling the 'delay tap' setting with no luck

gujjwal00 commented 2 months ago

Yes, simple tapping is not an issue. If you disable mouse passthrough, tapping will work correctly in AVNC too.

But then AVNC can't differentiate between left & right clicks. Problem happens because right portion of the screen is not generating all events necessary for mouse passthrough. It only generates simple tap events.

gujjwal00 commented 2 months ago

Probably because developers working on ROM never fully tested with an external mouse.

gujjwal00 commented 2 months ago

Closing since this is an OS bug.