Skip to content

Instantly share code, notes, and snippets.

@michael-yx-wu
Last active August 29, 2015 14:27
Show Gist options
  • Save michael-yx-wu/bcb66af8b0e8b392470a to your computer and use it in GitHub Desktop.
Save michael-yx-wu/bcb66af8b0e8b392470a to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ `defaults read -g ApplePressAndHoldEnabled` -eq 1 ]; then
defaults write -g ApplePressAndHoldEnabled -bool false
echo "Disabled press and hold"
else
defaults write -g ApplePressAndHoldEnabled -bool true
echo "Enabled press and hold"
fi
echo "Applications may need to be restarted for changes to take effect"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment