JoseExposito / touchegg

Linux multi-touch gesture recognizer
GNU General Public License v3.0
3.62k stars 167 forks source link

Possibility of two-finger gesture support? #562

Closed eggbean closed 2 years ago

eggbean commented 2 years ago

I always use the trackpoint on my ThinkPad and have the trackpad disabled in GNOME, but I really like touchegg as it allows me to keep the trackpad disabled in GNOME while still allowing me to use it for gestures. (I don't want to enable the trackpad in GNOME as I find the palm-rejection to be terrible.)

This results in a nearly ideal situation for me, other than not being able to configure or use two-finger gestures.

I know that this is a niche edge case, but how difficult would it be for me to fork this and make it possible to use it with two-finger gestures? Is it technically feasible?

JoseExposito commented 2 years ago

I always use the trackpoint on my ThinkPad and have the trackpad disabled in GNOME, but I really like touchegg as it allows me to keep the trackpad disabled in GNOME while still allowing me to use it for gestures

Technically, this is a bug, but I'm happy you are using it as a feature ;)

I don't want to enable the trackpad in GNOME as I find the palm-rejection to be terrible

Most likely, something is failing in libinput. If you attach the output of sudo libinput record for your keyboard and your touchpad and the output of sudo libinput debug-events --verbose I can have a look. The first command will show problems with your touchpad size being unknown, causing suboptimal palm detection. The second one will show if disable while typing is working or not.

I know that this is a niche edge case, but how difficult would it be for me to fork this and make it possible to use it with two-finger gestures? Is it technically feasible?

Unfortunately, no, it is not possible. 2 finger swipes are used by the system, usually to scroll. Only 3 and 4 finger swipes are available,

eggbean commented 2 years ago

I see. Well, it was worth querying about.

This is the output of sudo libinput record http://sprunge.us/jrncr2 ..and sudo libinput debug-events --verbose http://sprunge.us/3mnk2i

I only did stuff on the trackpad for the second one. Is this enough info for you to tell? Thanks,

JoseExposito commented 2 years ago

Disable while typing seems to be working as expected:

palm: dwt activated with Elan Touchpad<->AT Translated Set 2 keyboard

You should notice that your touchpad is disabled automatically while you are typing.

And the touchpad size is set: Size in mm: 98x60. Sometimes, not knowing it causes issues, but in your case is present. The quirk AttrResolutionHint=31x31 looked suspicious because it is applied to a wide range of devices, but, that's the correct resolution for your touchpad (calculated as `max[X|Y] - min[X|Y] / [width|height]).

In conclusion, I can't think of any obvious reason about why palm detection is not working as expected. Closing this issue, but feel free to create an issue on libinput, someone could try to help you with palm detection.

eggbean commented 2 years ago

Thanks. I'll try keeping the trackpad enabled and see if I can get used to it and disable it if I cannot.