How to set 'Tap to Click' behavior on macOS Catalina from command-line?

880 Views Asked by At

I am scripting the creation of new users for a macOS Catalina system. I am trying to activate by default the 'Tap to click' behaviour for the trackpad. I am already running these commands which do properly activate the 'Tap to click' check-box in "System Preferences -> Trackpad -> Point & Click"

defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

Unfortunately even if the 'Tap to click' check-box is checked the tap to click doesn't work. Even If I log out and in the user or restart the computer the tapping dowsn't work. But if I do un-check and check it again manually then it works as supposed.

I suspect that there must be another attribute on some other preference file that should be flagged as well to make the 'Tap to click' effective and that the GUI is taking care ...

Any idea on how to completely automate the 'Tap to click' activation?

0

There are 0 best solutions below