How to Enable Tap-to-Click via Command Line

command linetouchpadxinputxmodmap

You can use this to reverse scroll direction (natural scroll):

xmodmap -e "pointer = 1 2 3 5 4 7 6 8 9 10 11 12"

You can also set it back again with xmodmap -e "pointer = 1 2 3 4 5 7 6 8 9 10 11 12"

and this to switch the left and right buttons:

xmodmap -e "pointer = 3 2 1"

And change it back with xmodmap -e "pointer = 1 2 3"

But how do you enable tap to click from command line? Preferably with one command, and not permanently.

By the way, yes I do know this exists:

enter image description here

Best Answer

Xmodmap is of no help here. Xmodmap controls physical-to-logical mappings of buttons and keys, not the physical process that generate events in the first place.

The tool for this kind of options is xinput. The property name depends on your touchpad model, it may be something like

xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0

Run xinput list to see the names of available devices and xinput list-props "the device name" to list properties of a device.

See also Dynamic Input Configuration with xinput on the wiki, and some examples.