Mouse and touchpad different primary button

I am using Nexdock with my L5 connected to a bluetooth mouse. In the Mouse & Touchpad section of settings it is possible to set the primary mouse button to left or right. However, that affects also the touchpad, which I want to keep at the default.

Is there a way through the terminal to set only the mouse primary button? I know there was a command like xinput that I could use on some laptop linux distros, but it isn’t available in PureOS, at least not by default.

I have revisited this topic and try to set the mouse and touchpad action through gsettings. I have changed the mouse to left-handed with this command
gsettings set org.gnome.desktop.peripherals.mouse left-handed true
and it works, but as before that also makes a two-finger click on the touchpad to be interpreted as a one-finger click. I want the opposite, so I tried to change org.gnome.desktop.peripherals.touchpad left-handed, which defaults to ‘mouse’, i.e. same as mouse settings (left-handed in my case).

So, I looked at the values available for that key and found the following:

$ gsettings range org.gnome.desktop.peripherals.touchpad left-handed
enum
'right'
'left'
'mouse'

I have tried all three of them, but they all work the same - a one-finger click on the touchpad is recognized as a secondary button click or two-finger click.

Are there any other gsettings keys that could change this to the way I want?

1 Like

Anyone having any knowledge about this?

I have this issue on Gitlab since a while back.

Interstingly, on my Dell XPS laptop running Ubuntu 20.04, the mouse is left-handed and the touchpad is right-handed. However, the gsettings as seen below are somewhat confusing.

tomas@tomas-laptop:~$ gsettings range org.gnome.desktop.peripherals.mouse left-handed
type b
tomas@tomas-laptop:~$ gsettings get org.gnome.desktop.peripherals.mouse left-handed
true
tomas@tomas-laptop:~$ gsettings range org.gnome.desktop.peripherals.touchpad left-handed
enum
'right'
'left'
'mouse'
tomas@tomas-laptop:~$ gsettings get org.gnome.desktop.peripherals.touchpad left-handed
'mouse'