Post

06 - Increase macOS key repeat rate

06 - Increase macOS key repeat rate

Contents

YouTube video

If you like this, and want to support me

  • I create and edit my videos in an m1 mac mini, and it’s starting to stay behind in the editing side of things, tends to slow me down a bit, I’d like to upgrade the machine I use for all my videos to a mac mini with these specs:
    • Apple M4 Pro chip with 14‑core CPU, 20‑core GPU, 16-core Neural Engine
    • 24GB unified memory
    • 1TB SSD storage
    • 10 Gigabit Ethernet
  • If you want to help me reach my goal, you can donate here

Image

Discord server

  • After following this guide or even watching the related video, you:
    • Have questions related to one of the tools, configs or scripts that I use
    • Would like me to expand a bit more on how something is done
    • Or simply would like to talk and meet other community members that share your same interests
  • join the discord server in this link
  • Access to the discord server is only for YouTube community members

Image

Follow me on Twitter

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
This post is licensed under CC BY 4.0 by the author.