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

**URL:** <https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811>\
**Category:** Framework Laptop 13\
**Created:** [November 11, 2021, 6:55pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811 "2021-11-11T18:55:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![scoob](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/scoob/32/4749_2.png) [@scoob](https://community.frame.work/u/scoob)\
**Post date:** [November 11, 2021, 6:55pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/1 "2021-11-11T18:55:54Z")

</div>

When I mechanically click the touchpad, nothing happens. I figured out tap-to-click is working, and two finger taps are treated as right-click. Yet when I actually press down to click, it never registers as a click (no matter which part of the touchpad I click). I am not sure why - tap to click works, and the mouse moves around fine. I’m not certain on the next steps to solve this, I have mostly been looking into various touchpad configurations, e.g. [Arch documentation on libinput](https://wiki.archlinux.org/title/libinput)

I just installed Ubuntu 21.10, partially because the wifi adapter is supported out of the box.

Some debug info I have gathered:

```auto
$ xinput list
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
⎡ Virtual core pointer id=2	[master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4	[slave pointer (2)]
⎜ ↳ xwayland-pointer:17 id=6	[slave pointer (2)]
⎜ ↳ xwayland-relative-pointer:17 id=7	[slave pointer (2)]
⎣ Virtual core keyboard id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard id=5	[slave keyboard (3)]
    ↳ xwayland-keyboard:17 id=8	[slave keyboard (3)]

```

It seems like libinput is being used rather than synaptics (`xserver-xorg-input-synaptics`), based on this:

```auto
$ sudo dpkg -l | grep libinput
ii libinput-bin 1.18.1-1 amd64 input device management and event handling library - udev quirks
ii libinput10:amd64 1.18.1-1 amd64 input device management and event handling library - shared library
ii xserver-xorg-input-libinput 1.1.0-1 amd64 X.Org X server -- libinput input driver

```

Would love to see what ideas people have - I am not sure where to start as far as debugging past these steps … Has anyone else had this issue?

EDIT: So, I just found this: [Trackpad clicks not registering? - #4 by Paul\_Kim](http://community.frame.work/t/trackpad-clicks-not-registering/9763/4)  
It looks like clicking the middle of the trackpad many times gets it to work. It worked for me, too - I spammed the middle of the touchpad and less than a minute of that did get left and right clicking to suddenly work. 😳

---

<div class="post-metadata">

**Author:** ![satcomjimmy](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@satcomjimmy](https://community.frame.work/u/satcomjimmy)\
**Post date:** [November 14, 2021, 3:06pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/2 "2021-11-14T15:06:09Z")

</div>

so, this has been driving me crazy and I thank you. double finger for right click

---

<div class="post-metadata">

**Author:** ![scoob](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/scoob/32/4749_2.png) [@scoob](https://community.frame.work/u/scoob)\
**Post date:** [November 14, 2021, 5:04pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/3 "2021-11-14T17:04:02Z")

</div>

@satcomjimmy ah yes, I had to change the settings to get double finger for right click instead of the default where the area in which you clicked determined left or right click.

Here is how I changed that setting on Ubuntu 21.10:

```auto
gsettings set org.gnome.desktop.peripherals.touchpad click-method 'fingers'

```

To see what the options are, use this command:

```auto
gsettings range org.gnome.desktop.peripherals.touchpad click-method

```

---

<div class="post-metadata">

**Author:** ![satcomjimmy](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@satcomjimmy](https://community.frame.work/u/satcomjimmy)\
**Post date:** [November 14, 2021, 6:14pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/4 "2021-11-14T18:14:17Z")

</div>

Maybe I already changed something and it afected that, but it is just working for me today. I had previously added accessibility settings to allow a long press to act as a right click but it isn’t as clean and doesn’t work in every instance.

---

<div class="post-metadata">

**Author:** ![scoob](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/scoob/32/4749_2.png) [@scoob](https://community.frame.work/u/scoob)\
**Post date:** [November 14, 2021, 6:48pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/5 "2021-11-14T18:48:34Z")

</div>

@satcomjimmy If you install `gnome-tweaks`, you can use it to configure this setting through the GUI:

 ![Screenshot from 2021-11-14 13-44-25](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/2X/4/4b89becbd8316c04a301c37df48f721c370c9936.png)

In particular note the **Mouse Click Emulation** is set to **Fingers**.

---

<div class="post-metadata">

**Author:** ![Elis\_Grahn](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@Elis\_Grahn](https://community.frame.work/u/Elis_Grahn)\
**Post date:** [September 7, 2022, 7:35am UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/6 "2022-09-07T07:35:50Z")

</div>

I have been annoyed by the exact same problem for some weeks too and **spamming the middle of the mouse/trackpad actually worked!** 😨 Thank you!

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [December 31, 2022, 12:23pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/7 "2022-12-31T12:23:54Z")

</div>

I faced this issue now. The touchpad’s clicks were not recognized.

I am using the things below.

- Fedora 36
- Kernal: `6.0.15-200.fc36.x86_64`
- Sway (Wayland based)

The clicks are recognized after clicking the middle of the trackpad many times.

One more criteria I found is, that I am using wireless mouse via USB-A expansion card in the left front port. When turning on the wireless mouse, and clicking by the mouse, the touchpad’s clicks were also started to be recognized after that.

Here is the latest log in the `dmesg`. I am not sure it is related to the issue.

dmesg

```auto
[50974.844446] usb usb2-port2: attempt power cycle
[50978.892272] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?

```

I have an issue with the left front port: [Disk expansion card in the left front port is not detected on Fedora](http://community.frame.work/t/disk-expansion-card-in-the-left-front-port-is-not-detected-on-fedora/24390)

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [August 30, 2023, 10:12pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/8 "2023-08-30T22:12:21Z")

</div>

This issue still annoys me. But I finally found a workaround not to use the touchpad click. That’s to emulate the mouse left, right click, and left drag & drop.

Below is my sway config file for that. And the entire sway config is [here](https://github.com/junaruga/framework-laptop-config/blob/main/home/.config/sway/config). The [ydotool](https://github.com/ReimuNotMoe/ydotool) is helpful. On my keyboard, CapsLock is also Escape.

~/.config/sway/config

```auto
# Mod4: Meta key.
set $mod Mod4
...
# Mouse emulation
mode "mouse" {
    # Left click (down then up)
    bindsym Space exec "sudo ydotool click 0xC0"

    # Enable the space key to drag & drop.
    # However, the `bindsym --release` option is unreliable.
    # https://github.com/swaywm/sway/issues/7217
    # Left down (drag and drop start)
    # bindsym Space exec "sudo ydotool click 0x40"
    # Left up (drag and drop end)
    # bindsym --release Space exec "sudo ydotool click 0x80"

    # Left down (drag and drop start)
    bindsym f exec "sudo ydotool click 0x40"
    # Left up (drag and drop end)
    bindsym d exec "sudo ydotool click 0x80"
    # Right click (down then up)
    bindsym s exec "sudo ydotool click 0xC1"
    bindsym a exec "sudo ydotool click 0xC1"

    # Return to default mode
    bindsym Escape mode "default"
}
bindsym $mod+d mode "mouse"
...

```

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/junaruga/32/5342_2.png) [@junaruga](https://community.frame.work/u/junaruga)\
**Post date:** [September 26, 2023, 11:10pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/9 "2023-09-26T23:10:33Z")

</div>

Edited: Added mouseless section.

## Mouseless

I am experimenting with an app called [mouseless](https://github.com/jbensmann/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](http://community.frame.work/t/responded-wayland-mega-thread-and-fractional-scaling-fedora-39-beta/37972/8) . (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](https://github.com/jbensmann/mouseless/issues/25#issuecomment-1769120144).

## 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](https://github.com/junaruga/framework-laptop-config).

### Sway

```auto
$ 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

```auto
$ 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

```

---

<div class="post-metadata">

**Author:** ![Nathan\_Friedly](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/nathan_friedly/32/18560_2.png) [@Nathan\_Friedly](https://community.frame.work/u/Nathan_Friedly)\
**Post date:** [January 27, 2024, 12:59pm UTC](https://community.frame.work/t/touchpad-click-left-right-are-not-working-ubuntu-v21-10-solved-by-spam-clicking-the-middle-of-the-trackpad/10811/10 "2024-01-27T12:59:03Z")

</div>

Thank you!
