Speed Up Your Mac’s Keyboard Repeat Rate
For Vim users who rely on hjkl navigation, the default macOS keyboard repeat rate is slow. Two terminal commands fix that:
defaults write -g KeyRepeat -int 1
defaults write -g InitialKeyRepeat -int 10
Restart your Mac (or log out/in) for the changes to kick in. Alternatively, if you want to test and find your ideal settings without repeatedly restarting, you can use mac-key-repeat.zaymon.dev.
What these do
InitialKeyRepeat— how long before a held key starts repeating.10= 150ms, so it kicks in almost immediately.KeyRepeat— the repeat speed once it starts.1is the fastest possible (15ms per repeat).
The millisecond values are based on a 15ms base unit (e.g. 10 × 15ms = 150ms). Apple hasn’t officially documented this but I read somewhere on web
Reverting
If keys are repeating too aggressively, delete the overrides:
defaults delete -g KeyRepeat
defaults delete -g InitialKeyRepeat
Then fine-tune from System Settings > Keyboard.