termux / termux-x11

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

[Bug]: Galaxy Tab S9 Ultra keyboard cover touchpad operation issue #661

Closed hansm629 closed 3 months ago

hansm629 commented 3 months ago

Problem description

@knyipab

Transform captured pointer movements setting value After selecting Automatic (for touchpad)

Turn the toggle switch on Capture external pointer devices when possible. If you select OFF

The touchpad works very well in X11. The pointer speed is consistent and all gestures are recognized well.

https://github.com/termux/termux-x11/assets/101167173/4c2b44d6-c2a4-4441-b9c9-0579ba73dc2d

But

Turn the toggle switch on Capture external pointer devices when possible. If you select ON

The pointer speed becomes uncontrollably fast and gestures don't work as well as they do when turned off.

https://github.com/termux/termux-x11/assets/101167173/8fa8106d-1274-47d6-bf45-5f261ca37c2d

Even if you set Capture external pointer devices when possible to ON, Is it possible to make the mouse pointer work the same way as when it is OFF?

What steps will reproduce the bug?

Turn the toggle switch on Capture external pointer devices when possible. If you select ON

What is the expected behavior?

No response

twaik commented 3 months ago

Try lowering "Captured pointer speed factor" value.

hansm629 commented 3 months ago

@twaik Even if you lower the value to 30%, nothing changes.

twaik commented 3 months ago

Does speed actually change or not?

hansm629 commented 3 months ago

Does speed actually change or not?

@twaik Upon closer inspection, The pace has changed slightly.

However, fine control is still impossible.

hansm629 commented 3 months ago

@twaik Capture external pointer devices when possible switch The OFF state is the most ideal usability.

The point speed was almost similar to the Android environment.

but Capture external pointer devices when possible When the switch is turned OFF It was inconvenient to use because the top bar and bottom navigation were recognized.

twaik commented 3 months ago

app-arm64-v8a-debug.zip Try this apk and set speed factor to 1%.

twaik commented 3 months ago

@hansm629 ?

hansm629 commented 3 months ago

@twaik Test results from the new build When the value is set to 5%, the pointer speed becomes normal.

However, there are the following problems:

twaik commented 3 months ago

First tap always activates pointer capturing. It is android security restriction which can not be overridden. The speed factor is shared between all captured devices, including BT and USB mice.

hansm629 commented 3 months ago

@twaik Capture external pointer devices when possible When the switch is ON

Operates the same as the OFF state Would it be difficult to make only the top bar and bottom navigation unrecognizable?

twaik commented 3 months ago

When the switch is ON

Operates the same as the OFF state

I did not get it.

Would it be difficult to make only the top bar and bottom navigation unrecognizable?

You mean disable notification and navigation bars without pointer capturing? Impossible.

hansm629 commented 3 months ago

@twaik I would like to know if the same symptom occurs on the Galaxy Tab S8 Plus keyboard cover touchpad, but I currently do not have it so I cannot test it.

First of all, in the current scenario Only when the Capture external pointer devices when possible option is turned OFF The Galaxy Tab S9 Ultra's keyboard cover touchpad seems to be working without a problem.

@knyipab Can you review the above symptoms?

twaik commented 3 months ago

Only when the Capture external pointer devices when possible option is turned OFF The Galaxy Tab S9 Ultra's keyboard cover touchpad seems to be working without a problem.

In pointer capturing mode input events are delivered unmodified. In this mode application should decide how exactly input events should be handled. As far as I can see Android applies some kind of factor to input events, but unfortunately there is no public API to get it. That is the reason "Captured pointer speed factor" preference exists.

twaik commented 3 months ago

Fixed by a2e05cbcbf7162941fc88e206dcd098ab1902c39.

knyipab commented 3 months ago

Very slow point speed when using Bluetooth or USB mouse (not recognized even if adjusted in XFCE4 settings) The speed factor is shared between all captured devices, including BT and USB mice.

A shared speed factor doesn't seem ideal when system-configured speeds can differ a lot across devices. I think the app could differentiate the input device type and apply different speed factor. Indeed, sometime ago I implemented touchpad-specific speed factor in a branch of my fork here: https://github.com/knyipab/termux-x11/commit/234d605fd6d3d1d8d26511085449ad1027b13f0e. I did not make a PR cuz I thought it is too minor and make the preference page more clumsy.

Now seeing the design of "additional keyboard" sub-page, it's perhaps a good idea to group "Transform captured pointer movements", "Captured pointer speed factor" and add device-specific (soft touchpad, hard touchpad, mouse and perhaps more?) speed factors into a sub-page of "Captured pointer".

twaik commented 3 months ago

I am planning to make some kind of per-device preferences, but it may take some time.