termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.96k stars 301 forks source link

Galaxy Tab S9 Ultra Touch Pad Compatible Issues #434

Closed hansm629 closed 5 months ago

hansm629 commented 1 year ago

With the Capture external mouse when possible option active

These are issues that occurred on the Galaxy Tab S9 Ultra Keyboard Cover.

As of PRoot-Distro Ubuntu 23.04.

1. All gestures, including one-tab gestures, do not work Galaxy Tab S8+ Keyboard Cover Touchpad used gestures but Galaxy Tab S9 Ultra Touchpad doesn't work with all gestures, including one tap.

2. Too fast mouse pointer speed When you use the touchpad on the Galaxy Tab S9 Ultra Keyboard Cover, the mouse pointer is incredibly fast to an uncontrollable degree. Adjusting mouse sensitivity in XFCE does not apply.

Please check. log_20230823_3.txt

Knightly-Spartan commented 11 months ago

Have the same issue on my Tab S9+, to click I have to press the touchpad, which is horrible on the book cover keyboard and moves the cursor, so I end up clicking someplace else. The two-finger scroll doesn't work at all, neither does drag and drop.

ilkersigirci commented 10 months ago

Also have the same problem in my termux_xfce setup on my Samsung Tab S9 Ultra. I hope it can be fixed.

greentailkitsune commented 9 months ago

Same problem. If the cursor direction and speed can be changed in the input matrix. xinput set-prop "Lorie mouse" "Coordinate Transformation Matrix" 0 0.1 0 -0.1 0 0 0 0 1 Then two-finger gestures are not corrected in any way. Any chance this will be fixed?

twaik commented 7 months ago

@mistletoe235 you can post it here as zip or tarball.

mistletoe235 commented 7 months ago

I have the same problem. And I have spent two hours to change the source code. The version was added with "dex". As for me, all the functions of a touchpad work all right.

apk_and_changed_code.zip

twaik commented 7 months ago

Probably it will be better to make a pull request. This way we will see all the changes and system will generate updated apk.

Knightly-Spartan commented 7 months ago

Would be easier for users to update too.

twaik commented 7 months ago

Upgrade what?

Knightly-Spartan commented 7 months ago

I meant update the app. The apk from the zip gets recognized as different app and Android is refusing to do update the app.

twaik commented 7 months ago

I will merge the changes only after making sure it does not break existing code for other users. I am not refusing to upgrade it.

mistletoe235 commented 7 months ago

Sorry, I forgot to sign it with the official key. If you encountered any problems due to the key, you can change to this apk file. @Knightly-Spartan app-arm64-with-same-sign.zip

twaik commented 7 months ago

@mistletoe235 pull request please.

greentailkitsune commented 7 months ago

@mistletoe235 Have you succeeded in resolving the two-finger gesture problem? I've tested your fix, but the swipe direction with two fingers is still malfunctioning. The most detailed description of the problem is at the link https://github.com/termux/termux-x11/issues/419

Galaxy Tab S9 Ultra

mistletoe235 commented 7 months ago

@greentail-kitsune I only debug on my S8+, maybe S9 Ultra has some else problems. The problem that video shows I only find when I connect the mouse and using the touchpad. I also don't know how to fix it, sorry.

AlphaBs commented 7 months ago

@mistletoe235 It works almost perfectly on the Galaxy Tab S8+ bookcover touchpad. However, actions like dragging and long presses still don't seem to work.

Anyway, thanks for the great work. It would be better if you make a pull request so your code is included in the main repository.

AlphaBs commented 7 months ago

I found that I can drag with two fingers. Clicking on the left side of the touchpad with one finger (not touching) and moving it with the other finger is dragging.

mjelintacharge commented 6 months ago

@twaik Galaxy Tab S9 Ultra user here, can confirm this patch by @Knightly-Spartan does indeed fix annoying things about samsung book cover keyboard trackpad:

  1. Tapping to perform a left click now works fine
  2. Holding left click and then dragging something now works (finally!)

However! This is all with capture external mouse when possible disabled. Enabling this option does still result in touch pad being unusable.

p.s. @Knightly-Spartan: Thank you for your contribution. I was very disappointed after seeing that the support of this specific keyboard/trackpad is pretty much non existent everywhere, and only with patches like this it does get much more bearable for any serious work.

ilkersigirci commented 6 months ago

It's been 7 months since the issue is created. Although related PR's exist, they seem to not going to merge with the main branch. Will there be any official solution to this problem?

twaik commented 6 months ago

Again. I am not going to merge PR because it breaks compqtibility with existing devices. And I can not fix this PR because I have no devices for tests.

ilkersigirci commented 6 months ago

Again. I am not going to merge PR because it breaks compqtibility with existing devices. And I can not fix this PR because I have no devices for tests.

I can help with testing if requested. It would be awesome if this is fixed for our devices

twaik commented 6 months ago

I can help with testing if requested.

Testing means testing in real time. I can not make changes, send apk and wait for response.

ilkersigirci commented 6 months ago

Alright then, just wanted to help

AlphaBs commented 6 months ago

maybe I can fix the issue. I have a device and I can test with it. but I'm not sure it's okay to copy the original PR to open new PR. this would lose the author of the original commit.

twaik commented 6 months ago

I can use authored-by feature in PR to keep author of commit.

ilkersigirci commented 5 months ago

I have installed the latest build on my Tab S9 Ultra. Unfortunately, tap to click or touchpad two finger gestures not working. Hence, I don't think this issue should be closed

PS: There were working when using the apk file from the comment

twaik commented 5 months ago

@ilkersigirci check it with "Capture external mouse" disabled...

ilkersigirci commented 5 months ago

I have checked and tried all the combinations in the settings. Unfortunately, none of them seems to be working, sir.

Finger gestures on the touchscreen works btw, only touchpad related gestures not working

twaik commented 5 months ago

@AlphaBs can you please help?

AlphaBs commented 5 months ago

@twaik looks like the commit was reverted? 76309c1c7b7a515a942a650d2b8e8e40fd06c865

@ilkersigirci can you try this build? https://github.com/termux/termux-x11/actions/runs/8410806031

my setting is disabled "Capture External Mouse" and "Trackpad" mode.

ilkersigirci commented 5 months ago

Thank you, I have tried it and it seems to working perfectly. I am using the same settings that you've mentioned

AlphaBs commented 5 months ago

About "Capture External Mouse" option, on my device just skipping this code resolves the issue. I can't debug the exact reason since I can't use my device for now, what about to add a new option to skip it?

twaik commented 5 months ago

on my device just skipping this code resolves the issue.

This code is needed to handle dex touchpad (or any other touchpad that send touchscreen events) as a touchpad even in the case if user chooses "Simulated touchscreen" or "Direct touchscreen" modes.

So skipping that code will brake dex touchpad in the case user chooses something other that "Trackpad" touch mode. That is not an option.

Knightly-Spartan commented 5 months ago

Maybe a toggle to skip the code or not. So it works for both DeX tounchpad and the keyboard trackpads

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Twaik Yont @.> Sent: Monday, March 25, 2024 10:57:17 AM To: termux/termux-x11 @.> Cc: Amit Sanwariya @.>; Mention @.> Subject: Re: [termux/termux-x11] Galaxy Tab S9 Ultra Touch Pad Compatible Issues (Issue #434)

on my device just skipping this codehttps://github.com/termux/termux-x11/blob/76309c1c7b7a515a942a650d2b8e8e40fd06c865/app/src/main/java/com/termux/x11/input/TouchInputHandler.java#L185 resolves the issue.

This code is needed to handle dex touchpad (or any other touchpad that send touchscreen events) as a touchpad even in the case if user chooses "Simulated touchscreen" or "Direct touchscreen" modes.

So skipping that code will brake dex touchpad in the case user chooses something other that "Trackpad" touch mode. That is not an option.

— Reply to this email directly, view it on GitHubhttps://github.com/termux/termux-x11/issues/434#issuecomment-2017243110, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABR6G6RDK26KUEYHV4M3LNLYZ6RSLAVCNFSM6AAAAAA33QU3WGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJXGI2DGMJRGA. You are receiving this because you were mentioned.Message ID: @.***>

twaik commented 5 months ago

Maybe a toggle to skip the code or not.

Again. Skipping that code is not an option. It will break dex touchpad in the case if option other than "Trackpad" will be chosen. We should fix that code, not skip it.

mjelintacharge commented 5 months ago

@twaik

Why is this issue closed, if the commit regarding this issue (https://github.com/termux/termux-x11/commit/2104ea690d3f043d381f2ca9c6e6cfef723b4ca5) was reverted back via this commit (https://github.com/termux/termux-x11/commit/76309c1c7b7a515a942a650d2b8e8e40fd06c865)??

What needs to be done further, so that this can finally be merged and not rollbacked? And if something needs to be done, should this be reopened then?

twaik commented 5 months ago

Why is this issue closed, if the commit regarding this issue (2104ea6) was reverted back via this commit (76309c1)??

Probably it was removed by mistake. Now it is back.

mjelintacharge commented 5 months ago

Why is this issue closed, if the commit regarding this issue (2104ea6) was reverted back via this commit (76309c1)??

Probably it was removed by mistake. Now it is back.

Thanks! Now regarding the "Capture External Mouse", I am willing to put some time & effort to investigate and fix this issue. Are there any specific guidelines as to what is acceptable & what is not, regarding the code? Should we open a separate issue for this?

twaik commented 5 months ago

Are there any specific guidelines as to what is acceptable & what is not, regarding the code

First of all changes should not break behaviour of input handling on different devices. If there will be anything else I'll tell you.

I do not think we should create new issue for this.

hansm629 commented 5 months ago

@twaik Based on build version #590

When using the touchpad of the Galaxy Tab S9 Ultra keyboard cover on the X11 server, there is still a symptom of the touchpad moving uncontrollably quickly. T^T

https://github.com/termux/termux-x11/assets/101167173/2912f0cb-f25e-41c2-8882-82ba563e1bca

twaik commented 5 months ago

Ok, there is new preference called "captured pointer speed factor" in build 591.

twaik commented 5 months ago

@hansm629 ?

hansm629 commented 5 months ago

@twaik Sorry for the late feedback.

As a result of testing with build #593, we confirmed that the touchpad axis was still reversed and moved very quickly.

twaik commented 5 months ago

axis was still reversed and moved very quickly.

Yeah, and that is a reason I made two new preferences for that. Did you test them?

hansm629 commented 5 months ago

@twaik Are you talking about the pointer speed control feature below? Once set to 0, the pointer speed becomes normal.

However, the speed of the mouse connected via Bluetooth seems to be very slow. Screenshot_20240326_132456_TermuxX11

hansm629 commented 5 months ago

@twaik And strangely enough, if you apply the function to invert the pointer axis, the pointer axis of the mouse connected via Bluetooth will change, but

The touchpad on the keyboard cover did not change.

twaik commented 5 months ago

I was talking about both "transform captured pointer mouse" and "captured pointer speed factor". These preferences are not device specific, you have to change them according to the device you use. If you have very slow pointer of bt mouse you have to set speed factor to 200.

twaik commented 5 months ago

And strangely enough, if you apply the function to invert the pointer axis, the pointer axis of the mouse connected via Bluetooth will change, but

The touchpad on the keyboard cover did not change.

I'll fix that.

twaik commented 5 months ago

@twaik Are you talking about the pointer speed control feature below? Once set to 0, the pointer speed becomes normal.

However, the speed of the mouse connected via Bluetooth seems to be very slow. Screenshot_20240326_132456_TermuxX11

Minimum is 30%, not 0%.