Post

06 - Increase macOS key repeat rate

06 - Increase macOS key repeat rate

Contents

YouTube video

Increase macOS key repeat rate

  • By default, when you leave a key pressed in macos, it takes ages to move the cursor where you need it, to solve that, you can decrease the key repeat rate
1
2
# Paste this very large terminal command, and then try to navigate back and forth, it will waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay too slow
# Also open a file in nvim and navigate up/down
  • In the terminal you are able to specify a value even lower that in the system settings
  • Go to Settings - Keyboard and configure:
    • “Key repeat rate” all the way to Fast
    • “Delay until repeat” all the way to the right to Short
  • To see what the current values for each the Key repeat rate and the Delay until repeat are
1
2
defaults read NSGlobalDomain KeyRepeat
defaults read NSGlobalDomain InitialKeyRepeat
  • To lower the values even more
  • This first value is the KeyRepeat which is the actual rate at which the keys repeat
    • Default minimum is 2 (30 ms)
1
defaults write -g KeyRepeat -int 1
  • This other value below is for the InitialKeyRepeat which is the delay before the key starts repeating
    • Default minimum is 15 (225 ms)

DO NOT set this value below to 10, I did that in my macbook and was having repeated keys all the time, spent some and finally figured out it was because of this being set to 10. My other computer with the value set to 15 didn’t experience this issue

  • Mi mac mini worked with this set to 15, but my macbook worked with 20, otherwise I would still get repeated keys, so experiment and see what works, for now I’ll keep everything at 20
  • If using a wired keyboard, you may go with lower values, I use a glove80 that switches between the 2 computers, and both connect via Bluetooth
1
defaults write -g InitialKeyRepeat -int 20
  • After this, reboot for the changes to take effect
1
sudo reboot
  • We’ll learn to move through commands even faster in a latter video related to zsh-vi-mode

If you like my content, and want to support me

  • If you want to share a tip, you can donate here
  • I recently was laid off, so if you know about any SRE related roles, please let me know

Discord server

Image

Follow me on social media

  • The following links will be in the YouTube video description:
    • Each one of the videos shown
    • A link to this blogpost

How do you manage your passwords?

  • I’ve tried many different password managers in the past, I’ve switched from LastPass to Dashlane and finally ended up in 1password
  • You want to find out why? More info in my article:
  • If you want to support me in keeping this blogpost ad free, start your 1password 14 day free trial by clicking the image below

Image

This post is licensed under CC BY 4.0 by the author.