termux-x11 icon indicating copy to clipboard operation
termux-x11 copied to clipboard

Touchpad right-click cancel and two-finger gesture axis inversion issue

Open hansm629 opened this issue 1 year ago • 40 comments

Thank you for the new build. Most of the Galaxy Tab S8+ keyboard cover touchpad compatibility is improved in the latest build. :)

Reports additional symptoms identified during the test.

https://github.com/termux/termux-x11/assets/101167173/c6a5627b-8a05-49c5-93d1-0b858b7da1ab

1. touchpad right-click cancel If you click right on the touchpad, the click result seems to be canceled. (Video 00:09~00:20)

2. two-finger gesture axis inversion issue eaacb2ff-e151-4059-ba1b-dcb517d4da2c

Two-finger gestures confirmed the symptoms of reversing the axis when moving up, down, left, and right. (video 00:22~00:30)

log_20230808.txt The log file is here.

hansm629 avatar Aug 08 '23 13:08 hansm629

Your log is taken from version without some debugging lines. Try to reproduce the same movements with this: app-arm64-v8a-debug.zip And post the log again please.

twaik avatar Aug 08 '23 20:08 twaik

@Giova445 can you please make the same thing?

twaik avatar Aug 08 '23 21:08 twaik

I am using Xperia 5 ii and when I capture the physical mouse the X and Y are flipped

shiumano avatar Aug 08 '23 23:08 shiumano

Your log is taken from version without some debugging lines. Try to reproduce the same movements with this: app-arm64-v8a-debug.zip And post the log again please.

In this APK, the symptoms of reversing the x and y axes appear again as in the past.

This is the log file. log_20230809.txt

hansm629 avatar Aug 09 '23 00:08 hansm629

@Rmtdi do the same thing.

twaik avatar Aug 09 '23 04:08 twaik

I am using Xperia 5 ii and when I capture the physical mouse the X and Y are flipped

Give me some details.

twaik avatar Aug 09 '23 05:08 twaik

After using that version apk, my problem was fixed :), and I don't know how to get the log file, this file doesn't look right, hope it helps. 1603rmtdilog.txt

Rmtdi avatar Aug 09 '23 08:08 Rmtdi

@twaik here's the log, I've tested so far with the build Making termux-x11 command work on Android 14+ (termux/termux-packages… but I'm still having the two-finger axis inversion issue, tested on galaxy tab s7+

test1.txt

Giova445 avatar Aug 11 '23 21:08 Giova445

@Giova445 that is probably because I did not commit the fix. I stil can not reproduce it on my local devices and changes I made to fix it most likely break compatibility for other devices. I should test real touchpad and after that I will make some other changes...

twaik avatar Aug 11 '23 21:08 twaik

@AlphaBs can you please check if you can fix this?

twaik avatar Mar 24 '24 18:03 twaik

I see you've added a new option and I can't wait to try it, but I'm currently unable to use my device for about two weeks for security reasons. 😭

AlphaBs avatar Mar 24 '24 21:03 AlphaBs

@hansm629 Is Touchpad right-click cancel still reproducible? I see some code in master branch that handles it.

twaik avatar Mar 25 '24 12:03 twaik

@twaik I'll test it out after work! We will respond within 2 hours! :)

hansm629 avatar Mar 25 '24 13:03 hansm629

Also you can check the new preference "transform captured pointer movements".

twaik avatar Mar 25 '24 13:03 twaik

It is not a fix, but at least you can make your touchpad behave more predictable.

twaik avatar Mar 25 '24 13:03 twaik

@hansm629

We will respond within 2 hours! :)

twaik avatar Mar 31 '24 07:03 twaik

@hansm629

We will respond within 2 hours! :)

I'm going out for a while right now. I'll tell you the test results when I get back home! :)

hansm629 avatar Mar 31 '24 07:03 hansm629

@hansm629 this issue is the last one. Any updates?

twaik avatar Apr 01 '24 16:04 twaik

@twaik

As of latest #597 build

If you adjust the Transform captured point movements option, the axis of the mouse point connected via Bluetooth is reversed, but

The touchpad on the keyboard cover not applied and the mouse point axis is reversed, making it impossible to use normal gestures.

  • Double tap function does not work
  • Two-finger gestures must be moved in the opposite direction to work as desired.

https://github.com/termux/termux-x11/assets/101167173/328650ce-0e7b-4dc4-8b49-6cd3fa63d294

https://github.com/termux/termux-x11/assets/101167173/09829c61-9686-4bda-88a5-11cfe795bf61

hansm629 avatar Apr 01 '24 16:04 hansm629

@twaik Still, it seems like the touchpad right-click cancel has been fixed.

hansm629 avatar Apr 01 '24 16:04 hansm629

The touchpad on the keyboard cover not applied and the mouse point axis is reversed, making it impossible to use normal gestures.

I did not really understand this sentence. Can you please tell it in other words?

twaik avatar Apr 01 '24 16:04 twaik

@twaik Oh sorry. I am not good at English, so I have to use a translator.

This means that the new Transform captured point movements option does not apply to the touchpad of the Galaxy Tab S9 Ultra keyboard cover.

hansm629 avatar Apr 01 '24 16:04 hansm629

@AlphaBs how do you think, can we make DexListener's GestureDetector use standard practices for detecting gestures like single and doubletap? Currently it is limited to scrolling detection. I am not sure how exactly to deal with GestureDetector and custom Samsung flags.

twaik avatar Apr 01 '24 17:04 twaik

I don't think that GestureDetector can handle the custom flags which Samsung touchpad produces, but I will test it later.

and 'double tap', I can't see any differences between double tap event and single tap event on my device. no special flag, no classification. it just reports normal single tap event but twice.

AlphaBs avatar Apr 03 '24 11:04 AlphaBs

I encountered the same flipped pointer axis issue in Dex mode when I use my Samsung Fold 5 phone as trackpad in landscape orientation (it's normal in portrait orientation). Even worse, the left click does not work at all. If developers do not own a Samsung device or cannot reproduce, I could record log and post it. Thank you.

knyipab avatar Apr 20 '24 08:04 knyipab

Recording log will not help. I must have an ability to test things in real time. I don't have the energy or the time to implement this.

twaik avatar Apr 21 '24 19:04 twaik

I am happy to help but I'm very unfamiliar with your code. Could you give me hint on which file I should begin with for this matter?

knyipab avatar Apr 21 '24 23:04 knyipab

Could you give me hint on which file I should begin with for this matter?

https://github.com/termux/termux-x11/blob/master/app/src/main/java/com/termux/x11/input/TouchInputHandler.java

twaik avatar Apr 26 '24 01:04 twaik

@hansm629 I made a pull request at #617 to fix the issue. See if you may want to try (as I don't own a pad with physical touchpad). An automatically built APK is available on the github action: https://github.com/termux/termux-x11/actions/runs/8864550086.

You will want to choose Automatic (for touchpad) under Transform captured point movements option.

knyipab avatar Apr 28 '24 03:04 knyipab

@knyipab I tested the apk you build!

I set it to automatic. Screenshot_20240428_132513_TermuxX11

The touchpad of the Galaxy Tab S9 Ultra keyboard cover is not inverted. Right click, left click, gestures, etc. all work well.

but Touchpad related There is a symptom of returning to Android Home when an event occurs.

https://github.com/termux/termux-x11/assets/101167173/53335f42-df00-462d-91a9-049fdf98ce7d

Please check~

hansm629 avatar Apr 28 '24 04:04 hansm629