Skip to the test
KeyboardTest

Mac Key Repeat Rate: Delay and Speed Settings

macOS stores Key Repeat and Delay Until Repeat in 15-millisecond ticks, and the sliders in System Settings only reach part of the range. Hold any letter key for three seconds: the checker measures the delay before the first repeat and the interval between repeats, converts both to tick values, and writes out the defaults commands that reproduce or change them. If the letter never repeats, the press-and-hold accent popup is on, and the command to turn it off is here too. The mac keyboard test needs no install, account or sign-up, just open it and start.

Hold a key

This does not look like macOS. The measurements still work, but the slider and Terminal translations apply to a Mac.

Holding

--

Press and hold any letter key for three seconds.

Delay until repeat (ms)
--
Repeats per second
--
Repeat interval (ms)
--

Terminal commands matching what was measured

defaults write -g InitialKeyRepeat -int <delay ticks>
        defaults write -g KeyRepeat -int <repeat ticks>

Log out and back in for the change to apply. Values below 15 / 2 are only reachable from Terminal, not the slider.

macOS values

InitialKeyRepeat (ticks)
--
KeyRepeat (ticks)
--

Press-and-hold accent popup

Hold a letter key to find out

Turn it off so letters repeat: defaults write -g ApplePressAndHoldEnabled -bool false

Compare with the default and the fast presets

One tick is 15 ms. The System Settings sliders stop at 15 and 2; Terminal goes lower.

macOS key repeat presets
PresetInitialKeyRepeatKeyRepeatCommands

Your Mac key repeat rate decides how quickly a key repeats, and macOS stops the sliders well short of what many typists want. Convert milliseconds into the values macOS stores, and you can push the keyboard past that limit.

Mac Key Repeat Rate Converter and Formula

macOS stores whole ticks of 15 ms, not milliseconds, so the key repeat speed you want must be divided by 15 before it goes into a command. Want a closer look at keyboard typing wrong characters? A free tool on this site shows you in seconds.

$$\text{value} = \frac{\text{milliseconds}}{15}$$

InitialKeyRepeat and KeyRepeat explained

InitialKeyRepeat is the wait before a held key starts repeating, and KeyRepeat is the gap between repeats after that. A 135 ms wait and a 45 ms gap become 135 ÷ 15 = 9 and 45 ÷ 15 = 3.

Normal minimum values in System Settings

Normal minimum values in System Settings
SettingDefaults keyNormal minimumValue
Delay until repeatInitialKeyRepeat225 ms15
Repeat intervalKeyRepeat30 ms2

Anything below that minimum value is possible only through a Terminal command.

Change Key Repeat Delay in System Settings

Choose the Apple menu, open System Settings, then click Keyboard in the sidebar. Older macOS versions call this app System Preferences. See how your keyboard handles mac keyboard on windows with the free tool on this site.

Delay until repeat and keyboard settings

  • Drag the Delay until repeat slider toward Short to shorten the wait.
  • Drag the repeat slider toward Fast to speed up each repeated character.
  • Test in any text area, such as when you hold down the Delete key.

Press and hold for special characters

With press and hold on, keys such as a show accent marks and diacritics instead of repeating, so the sliders seem to do nothing. Turn it off with defaults write -g ApplePressAndHoldEnabled -bool false and you lose those special characters.

Tuning Key Repeat Speed for Vim Navigation: 105 ms and 60 ms

I'm editing a long config file in Neovim and holding j to scroll feels sluggish. The slider is already at Fast, so I check what the number behind it is: defaults read NSGlobalDomain KeyRepeat prints 2, which is 30 ms, and the delay prints 15, which is 225 ms. The first wait is the part that bothers me.

I decide on a 105 ms wait and a 60 ms gap, then run the key repeat conversion: 105 ÷ 15 = 7 and 60 ÷ 15 = 4. After I enter both with defaults write and reboot, a held key starts after about a tenth of a second, and a 200-line scroll takes roughly 12 seconds instead of 6.

Tuning Key Repeat Speed for Vim Navigation: 105 ms and 60 ms
Wait before repeatValueResult
225 ms15Apple's normal minimum; safe
105 ms7Fast, no stray repeats
75 ms5Tapped keys start doubling

Rerunning with 75 ms (value 5) is where it breaks: quick taps of e begin producing ee, because a normal keystroke lasts about as long as the wait. My judgement call is that the delay, not the gap, is the number to watch. The gap only changes how fast the cursor moves, but a delay shorter than your tap length changes what you type. One caveat: a wireless keyboard adds its own latency, so test again if you switch from a wired one, and return to 15 if doubled letters appear.

Increase Key Repeat Rate With a Terminal Command

A macOS key repeat rate faster than the user interface allows is possible from the Terminal.

Defaults write and defaults read commands

Read your current setting first with defaults read NSGlobalDomain KeyRepeat. Then apply the values from the formula, using defaults write -g InitialKeyRepeat -int 9 and defaults write -g KeyRepeat -int 3. Stay near the default value if keys begin repeating on their own.

Restart, Bluetooth and wired keyboard tips

Log out or reboot your MacBook to apply the change. A Bluetooth keyboard may need larger numbers than a wired keyboard, and you should navigate a few documents to confirm the cursor moves smoothly.

Frequently asked questions

What do the InitialKeyRepeat and KeyRepeat values mean?

InitialKeyRepeat is the wait before a held key starts repeating, and KeyRepeat is the gap between each repeat after that. macOS stores both in 15 ms steps, so 15 means 225 ms and 2 means 30 ms.

How do I check my current key repeat settings?

Open Terminal and run defaults read NSGlobalDomain KeyRepeat and defaults read NSGlobalDomain InitialKeyRepeat. The numbers returned are the stored values, which you multiply by 15 to get milliseconds.

How fast can I set the key repeat rate in System Settings?

Open System Settings, choose Keyboard, and drag the Delay until repeat and Key repeat rate sliders. The sliders stop at 225 ms for the delay (value 15) and 30 ms for the repeat interval (value 2).

How do I go below the System Settings minimum?

Run the defaults write commands from this calculator in Terminal. Values lower than 15 for the delay or 2 for the interval go beyond the sliders, and you need to log out or restart for them to apply.

Why do my keys repeat on their own after lowering the delay?

A very short initial delay can make normal keystrokes register as repeats, especially on a Bluetooth keyboard. Raise the InitialKeyRepeat value back toward 15 and test again.

Why does changing the sliders have no effect on Mac?

Press and hold for special characters can override key repeat. Running defaults write -g ApplePressAndHoldEnabled -bool false and restarting makes the settings take effect, but you lose the accent-mark popup.

Do I need to restart after changing the key repeat rate?

Yes, log out or restart for Terminal changes to apply. Some setups report that reconnecting the keyboard is enough, so try that first if you want to avoid a reboot.

How do I go back to the default key repeat rate?

Set InitialKeyRepeat to 15 and KeyRepeat to 2 with defaults write, or drag the sliders in System Settings back to your preferred position.

Comments and feedback