Touch-based clicking is an alternate input form that uses trackpad (or Magic Mouse) taps as a click. For most Mac users, turning on tap-to-click is best done from OS X System Preferences, but advanced users who require more control, automation, or remote enabling of the feature can also enable tap-to-click through the command line by using defaults strings. Using this advanced method also offers the benefit of allowing touch-clicking at the login screens of OS X, something that isn’t available by default if enabled through the GUI controls.
This requires a multitouch compatible Mac trackpad or mouse, whether that’s a newer model MacBook Pro or Air, or a Magic Trackpad or Magic Mouse. If you’re not comfortable with the command line and Terminal, you’re better off using this approach instead.
Enabling Universal Tap-Clicking on a Mac from the Terminal
You’ll notice there are three separate and unique defaults strings listed, one of which enables the general tap click behavior, while the next enables the feature for the Magic Mouse, and the other provides support for tap-to-click at the login and boot screens of OS X. To be thorough and get full touch-click support throughout OS X, issue all three commands separately in the Terminal, then reboot the Mac. As usual, each command should be placed on a single line when executed at the terminal.
sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
sudo defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
sudo defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
These three strings were found in a MacRumors forums thread and have been tested to work in OS X.
Disabling Tap-Clicking from the Terminal
If you want to reverse the above settings, or remotely disable the feature on a Mac, you can use the following defaults strings to turn off touchpad clicking. You’ll notice this is mostly a matter of looking at the above defaults strings and switching ‘true’ to ‘false’ and 1 to 0 where appropriate. Just as above, issue all three commands to be thorough:
sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool false
sudo defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 0
sudo defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 0
Again, reboot the Mac for all changes to take effect when using this command line approach.
Email this Turning On Mac Touch-To-Click Support from the Command Line to a Friend! Receive Articles like this one direct to your email box! Subscribe for free today!
Tidak ada komentar:
Posting Komentar