Category filter

Script to configure trackpad settings on macOS devices

The trackpad on a Mac replaces the need for a conventional mouse and allows interaction through various gestures and movements. Aimed at enhancing user convenience, macOS offers a wide range of customizable options on Trackpad, including Multi-Touch Gestures and Scroll & Zoom settings. A macOS user can manually configure the Trackpad settings by accessing System Preferences > Trackpad. Alternatively, the administrators can execute the scripts given in this doc using the Execute Custom Script action to customize the trackpad configurations for macOS users.

Scripting language – Bash

File extension – .sh

Disclaimer:


The sample scripts provided below are adapted from third-party open-source sites.

Notes:

  • The following scripts will act on the currently logged-in user.
  • The user will be logged out of their accounts on deploying these scripts. They will have to log back into the device.

Configure Tap to click

By default, the Tap to click setting is turned on and the users can tap on the trackpad to perform a click. However, if it is deemed to cause accidental taps leading to unintended actions, you may deploy the following script to turn it off. It enforces the end-user to click on the trackpad (instead of tapping) to initiate an action.

You can enable Tap to click, using the following script.

Configure trackpad scrolling

You can take advantage of the two-finger scrolling feature on a Mac trackpad, which enables you to effortlessly scroll up or down a page without the need to manually drag the scrollbar. It is enabled by default, but if you prefer to disable it, you can do so using the following script.

To enable trackpad scrolling, deploy the following script.

Configure trackpad momentum scrolling

Momentum scrolling is a feature that allows users to flick the trackpad with their fingers resulting in a smooth scroll through content. It is enabled by default, but if you prefer to disable it, you can use the following script.

To enable momentum scrolling, use the following script.

Configure Look up using trackpad

Look up gives you the ability to quickly access definitions, thesaurus entries, and other information about a selected word. With a trackpad, you can do so easily by tapping with three fingers on the selected word. It is enabled by default, but if you prefer to disable it, deploy the following script.

To let users use Look up using trackpad, you can deploy the following script.

Configure Drag Lock

Drag Lock allows users to drag and drop items without holding down on the trackpad. To use Drag Lock, simply tap the trackpad twice and drag the item you want to drag, and then tap it again to drop the item. It is disabled by default. You can deploy the following the script to enable it.

Deploy the following script to disable drag lock.

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository