Skip to content

Instantly share code, notes, and snippets.

@kvpb
Last active July 28, 2022 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvpb/431df97b58f29e1942f8085bbb27419a to your computer and use it in GitHub Desktop.
Save kvpb/431df97b58f29e1942f8085bbb27419a to your computer and use it in GitHub Desktop.
Test Script 69: set macOS keyboard speed
#!/usr/bin/env bash
osascript -e 'tell application "System Preferences" to quit' #
defaults delete com.apple.universalaccess slowKey
defaults write com.apple.universalaccess slowKey -bool FALSE # Disable Slow Keys. (i) Required from macOS 10.12 Sierra onwards to set faster key repeat rates.
defaults delete com.apple.universalaccess slowKeyDelay
#defaults write com.apple.universalaccess slowKeyDelay -int 5 #
defaults delete NSGlobalDomain ApplePressAndHoldEnabled
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool FALSE # Disable press-and-hold for keys.
defaults delete NSGlobalDomain InitialKeyRepeat
defaults write NSGlobalDomain InitialKeyRepeat -int 10 # Set key repeat triggering delay to even shorter. (i) macOS 10.13.3 High Sierra fastest: 15
defaults delete NSGlobalDomain KeyRepeat
defaults write NSGlobalDomain KeyRepeat -int 2 # Set key repeat rate to fastest. [i] Enables key repeat. /i\ From macOS 10.12 Sierra onwards, Apple modified the scales, making 0 too fast for some, also making 3 a reasonable value. (i) macOS 10.13.3 High Sierra fastest: 2
for i in "cfprefsd" "System Preferences" "SystemUIServer"
do
killall "${i}" > /dev/null 2>&1
done
# script69.sh
# Test Script 69: set macOS keyboard speed
#
# Author: Karl V. P. Bertin `kvpb`
# Phone number: +33ABBBBBBBB
# Email: local-part@domain
# LinkedIn: https://www.linkedin.com/in/karlbertin
# Facebook: https://www.facebook.com/profile.php?id=
# Instagram: https://www.instagram.com/karlbertin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment