Issue with 3 finger swipe/4 finger pinch with libinput-gestures

I am setting up my thinkpad P14s gen 2 with manjaro i3. When setting up libinput and libinput-gestures, I’m facing some issues with 3-4 finger swipes and pinches.

3 finger swipe

I’m using the following config for moving between workspaces:

gesture swipe right      3 _internal ws_down
gesture swipe left       3 _internal ws_up

This works, except everytime I swipe it also pastes the clipboard. Clearly, it is also executing 3 finger tap before executing the swipe gesture mapping.

How do I fix this behavior? Is there a way to do this without removing the existing 3 tap gesture? If not, where can I remove the 3 finger tap for middle click behavior?

4 finger pinch

I’m also trying to use 4 finger pinch for quitting application:

gesture pinch in 4	xdotool key alt+shift+q

But all my 3-4 finger pinches get registered as swipes (see output of libinput-gestures -d below).

libinput-gestures: SWIPE down 4 [-17.700000000000003, 19.91]
libinput-gestures: SWIPE right 4 [47.419999999999995, -43.04]
libinput-gestures: SWIPE left 4 [-53.17, 51.010000000000005]
ibinput-gestures: SWIPE left 3 [-50.06999999999999, 44.769999999999996]
libinput-gestures: SWIPE up 3 [27.04, -41.26]

How do I fix the issue?

Appreciate the help.

This might help

Maybe I missed it but the gist doesn’t seem to have any references to the issues I’m having with 3 and 4 finger gestures.