Many macOS user settings can be fine-tuned with the defaults command in Terminal. The following 15 settings focus on improving keyboard input, Dock responsiveness, screenshot management, Finder navigation, and the environment for long-running tasks.
Some values changed with defaults are internal preference keys rather than options officially provided by Apple in System Settings. Because their behavior or key names may change after a macOS update, it is safest to apply only the settings you need and keep the restoration commands as well.
Things to Check Before Starting
-
Open Terminal: In Finder, launch
Applications > Utilities > Terminal. - Run one line at a time: Do not paste multiple commands at once; run each command and check the result.
- Quit the app: If the target app is running, it may save its existing preferences again. If possible, quit the app before making changes.
-
Administrator privileges are generally unnecessary: The settings below apply to the current user account, so most do not require
sudo. -
Understand what will restart:
killall Finderandkillall Dockterminate those processes, but macOS immediately launches them again. The state of open Finder windows may change.
To check the current values first, use the following format.
defaults read NSGlobalDomain KeyRepeat
defaults read com.apple.finder FXDefaultSearchScope
If you see a message saying that the value does not exist, the key may not yet have been explicitly set.
Keyboard Input Settings
1. Change Press-and-Hold for Letters to Key Repeat
By default, pressing and holding certain letters in macOS displays a menu for selecting accented characters. Disabling this behavior makes the same character repeat while the key is held down.
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
After making the change, completely quit and relaunch the app you are using. Depending on the app, you may need to log out or restart.
Restore:
defaults delete NSGlobalDomain ApplePressAndHoldEnabled
Disabling this setting makes it difficult to use the accented-character selection menu, so users who type in multiple languages should first confirm that their keyboard shortcuts or input sources are sufficient.
2. Shorten the Key Repeat Interval and Initial Repeat Delay
KeyRepeat represents the interval between repeated inputs, while InitialKeyRepeat represents the delay between the initial keypress and the start of repetition. Lower values are faster.
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
If the settings are too fast, characters may be entered multiple times unintentionally. You can start by setting KeyRepeat to 2 and InitialKeyRepeat to around 15, then adjust them. You may need to log out or restart your Mac for the changes to take effect.
Restore:
defaults delete NSGlobalDomain KeyRepeat
defaults delete NSGlobalDomain InitialKeyRepeat
3. Disable Automatic Smart Quote Substitution
In code, JSON, commands, and configuration files, straight quotes and curly smart quotes are treated as different characters. Run the following command to disable automatic substitution globally.
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
Restore:
defaults delete NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled
Some editors and word processors use their own input settings, so you may also need to disable the smart quotes option within the app.
Adjusting Dock Responsiveness
4. Remove the Dock Auto-Show Delay and Animation
First, press Option + Command + D to enable automatic Dock hiding. Then set both the delay before the Dock appears when you move the pointer to the edge of the screen and the duration of the Dock animation to 0.
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
killall Dock
Restore:
defaults delete com.apple.dock autohide-delay
defaults delete com.apple.dock autohide-time-modifier
killall Dock
If you want to retain the animation while only increasing its speed, you can use a value greater than 0, such as 0.15, for autohide-time-modifier.
Reducing System Animations
5. Disable Some Window Animations
The following global setting disables window opening and closing animations in apps that honor it.
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
Restore:
defaults delete NSGlobalDomain NSAutomaticWindowAnimationsEnabled
Recent macOS apps may ignore this internal setting, so the same result is not guaranteed for every window. To also use the official setting provided by Apple, enable System Settings > Accessibility > Display > Reduce motion. Reduce Motion simplifies screen transition effects rather than eliminating animations entirely.
Screenshot Settings
6. Remove Shadows from Window Screenshots
This excludes the shadow around a window when capturing it by pressing Shift + Command + 4, then Space, and selecting the window.
defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer
Restore:
defaults delete com.apple.screencapture disable-shadow
killall SystemUIServer
7. Disable the Preview Thumbnail After Capturing
This disables the small preview that appears in the lower-right corner of the screen immediately after taking a screenshot.
defaults write com.apple.screencapture show-thumbnail -bool false
killall SystemUIServer
Restore:
defaults delete com.apple.screencapture show-thumbnail
killall SystemUIServer
You can also enable or disable the preview under Shift + Command + 5 > Options > Show Floating Thumbnail.
8. Change the Screenshot Save Folder
First, create a dedicated screenshot folder inside the Pictures folder and set it as the save location.
mkdir -p "$HOME/Pictures/Screenshots"
defaults write com.apple.screencapture location -string "$HOME/Pictures/Screenshots"
killall SystemUIServer
If the path contains spaces, you must enclose it in double quotes. Deleting the folder or specifying a location you do not have permission to access may cause problems when saving captures.
Restore to the default Desktop:
defaults write com.apple.screencapture location -string "$HOME/Desktop"
killall SystemUIServer