Skip to content

Instantly share code, notes, and snippets.

@nickpunt
Last active June 12, 2017 09:11
Show Gist options
  • Save nickpunt/18911a0f9ee389155e44 to your computer and use it in GitHub Desktop.
Save nickpunt/18911a0f9ee389155e44 to your computer and use it in GitHub Desktop.
tell application "System Preferences"
reveal pane id "com.apple.preference.trackpad"
end tell
tell application "System Events" to tell process "System Preferences"
-- Uncheck lookup & data detectors
tell tab group 1 of window "Trackpad"
click radio button "Point & Click"
click checkbox 1
end tell
-- Uncheck Zoom
tell tab group 1 of window "Trackpad"
click radio button "Scroll & Zoom"
click checkbox 2
end tell
end tell
delay 1
tell application "System Preferences"
reveal pane id "com.apple.preference.trackpad"
end tell
tell application "System Events" to tell process "System Preferences"
-- Recheck lookup & data detectors
tell tab group 1 of window "Trackpad"
click radio button "Point & Click"
click checkbox 1
end tell
-- Recheck Zoom
tell tab group 1 of window "Trackpad"
click radio button "Scroll & Zoom"
click checkbox 2
end tell
end tell
quit application "System Preferences"
@jeanpaul
Copy link

Thank you for this script! I found that zooming works after running this script, but that swiping with two fingers to navigate (between pages, in Mail.app, Calendar, etc.) was still broken. For this, I added extra clicks on checkbox 1 in the "More Gestures" tab. This seems to work for now:

diff --git a/TrackpadFix (Forcetouch).scpt b/TrackpadFix (Forcetouch).scpt
index a32b7be..c88bf9c 100644
--- a/TrackpadFix (Forcetouch).scpt 
+++ b/TrackpadFix (Forcetouch).scpt 
@@ -14,6 +14,12 @@ tell application "System Events" to tell process "System Preferences"
        click checkbox 2
    end tell

+   -- Uncheck Swipe between pages
+   tell tab group 1 of window "Trackpad"
+       click radio button "More Gestures"
+       click checkbox 1
+   end tell
+   
 end tell

 delay 1
@@ -34,5 +40,11 @@ tell application "System Events" to tell process "System Preferences"
        click checkbox 2
    end tell

+   -- Recheck Swipe between pages
+   tell tab group 1 of window "Trackpad"
+       click radio button "More Gestures"
+       click checkbox 1
+   end tell
+   
 end tell
-quit application "System Preferences"
\ No newline at end of file
+quit application "System Preferences"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment