Touchpad click (left & right) are not working (Ubuntu v21.10) [Solved by spam-clicking the middle of the trackpad]

Edited: Added mouseless section.

Mouseless

I am experimenting with an app called mouseless as a way to avoid using touchpad. The mouseless was introduced at [RESOLVED] Wayland mega thread and Fractional scaling (Fedora 39 Beta) - #8 by Cheng . (Thanks!) It’s like QMK’s mouse emulation. So far it’s better than the ways I introduced above.

And my mouseless config is here.

Tap-to-click

As another workaround, I enabled the tap-to-click and tap-to-drag feature for the touchpad in libinput to sway (wayland-based-window manager) and i3 (X window-based window manager).

The setting is like this. You can see my actual config files here.

Sway

$ cat ~/.config/sway/config.d/00-framework
...
input type:touchpad {
    # tap: tap-to-click
    tap enabled
    # drag: tap-to-drag
    # https://wayland.freedesktop.org/libinput/doc/latest/tapping.html#tap-and-drag
    drag enabled
}

i3

$ cat /etc/X11/xorg.conf.d/41-trackpad-framework.conf
# https://fedoraproject.org/wiki/Input_device_configuration
Section "InputClass"
        Identifier "libinput touchpad framework"
        MatchIsTouchpad "on"
        MatchDriver "libinput"
        Option "Tapping" "on"
        Option "TappingDrag" "on"
EndSection