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:
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
Run
xinput list
to see the names of available devices andxinput list-props "the device name"
to list properties of a device.See also Dynamic Input Configuration with xinput on the wiki, and some examples.
You can use
gsettings
:Which enables tap to click.
Will disable it. This is the same as changing it in System Settings.
Based on the main answer, given that I had to modify some of the instructions there:
The command to enable tap-to-click is therefore of the form:
To read the "device" you have to do
But it may prove difficult to identify the device in that list. Some tips: it is probably under "Virtual core pointer"; it may contain terms like "Syn", "Synaptics", "Touchpad", "Alps", "Glidepoint". e.g., mine was
AlpsPS/2 ALPS GlidePoint id=16
, but I had to guess; as I was not sure I have tested if that was the correct ID number by disabling/enabling the touchpad withxinput --disable 16
andxinput --enable 16
.Now, to get rid of all the confusing names, ID-numbers can be used instead of the device and action names.
So, to read the "action":
Which listed among others:
So, using ID numbers instead of names, the final command was:
Note: for some reason, using the name of the action within the command, as suggested by the main answer, wouldn't work for me (
xinput set-prop ""AlpsPS/2 ALPS GlidePoint" "Tapping Enabled" 1
), while using just the name of the device did work (xinput set-prop "AlpsPS/2 ALPS GlidePoint" 297 1
).This command can be useful in systems where there is no GUI for such setting, like in the LXQT that I was testing at the date of the post.
When setting the
Synaptics Tap Action
value usingxinput
, you may need to specify a sequence of numbers. For example, to get normal primary and secondary tap functionality on my Logitech touchpad, I had to do this:I believe this means: