How to enable key repeating in macos

One thing I’ve always liked about Macs is their secondary keys, where holding down a letter key will display variations of that letter, like holding down “u” to get “ü.” This comes in handy when spelling non-English words, but if that’s not something you ever do, Apple’s substitution of special characters for the traditional key repeats of Windows computers can be an unneeded – and perhaps unwanted – feature.

The good news is that there’s a simple way to take control and change the behavior of long key presses to accommodate your needs. This not only works with letters, but number keys as well.

Enable key repeat on Mac

1) Open Terminal from Spotlight or by locating it in the Applications folder.

2) Enter the following command into Terminal and press enter:

3) Restart any open applications in which you want this setting to activate. You should now be able to hold down a key and have it repeat its character indefinitely.

4) If you want to speed up the rate of key repeats or decrease the delay before a held key starts repeating, System Preferences has these options filed under the Keyboard header. Simply adjust these sliders to suit your taste.

How to enable key repeating in macos

Reverting back: If you don’t like the results or want to get back the alternate characters for whatever reason, doing so is as simple as following the above steps but changing the latter part of the command from “false” to “true”. This simply means substituting the following command for the one in step 2:

That’s all it takes. Whether you like key repeats or simply dislike alternate characters, toggling between these settings is a breeze.

For more, take a look at our keyboard shortcuts section for quicker ways to accomplish tasks on your Mac. And if you have tips like this you’d like to share, leave a comment or hit us up on Twitter!

How to enable key repeating in macos

macOS has the accent keys feature, which makes it easier for users to add alphabets accent marks by pressing and holding an alphabet key. While this is useful for people who use them, it is also an inconvenience for users who don’t as because of accent keys you cannot enter letters repeatedly by holding down an alphabet button. If you want to change this behavior of your Mac and disable accent keys, then we have got your covered. To do so all you need to do is enter a Terminal command and reboot your computer.

Disable macOS Accent Keys and Enable Key Repeat

Important: Before following the steps below make sure you have configured the key repeat settings correctly as detailed here.

Step 1: On your Mac launch the Terminal application. Make sure you have administrative privileges to your computer. If not, then sign in with an admin account.

Step 2: Once Terminal is launched copy and paste the following command and hit the ‘Return’ key.

defaults write -g ApplePressAndHoldEnabled -bool false

Step 3: Once the command has been entered reboot your Mac.

After the reboot when you press and hold any alphabet key from your keyboard the key will be entered repeatedly instead of you seeing the accent menu. The speed of key repeat will depend on how you have set it up from Keyboard settings.

Matt Klein
How to enable key repeating in macosMatt Klein
Writer

Matt Klein has nearly two decades of technical writing experience. He’s covered Windows, Android, macOS, Microsoft Office, and everything in between. He’s even written a book, The How-To Geek Guide to Windows 8. Read more.

How to enable key repeating in macos

As anyone who uses a Mac knows, entering special characters is really easy–you just hold down a letter. That’s great if you want to play Pokémon Go with your friends mañana, but not so much if you realllllllllllllllllly want to play now.

Normally, on macOS, when you hold down a key, it will display a popup allowing you pick a special character if there are any assigned to that particular key.

How to enable key repeating in macos

If a key doesn’t have any special characters behind it and you hold it down, nothing will happen.

You can repeat some keys like space, backspace, and arrows, but that’s about it. So, how do you fix this?

You can switch it back to the more old school behavior–where holding a key repeats it–but it’s somewhat inconvenient. You can’t really have both options, since the hoop you have to jump through kind of makes it a this-way-or-that-way type of deal.

You have to use a command in the Terminal, which might seem easy enough except that in order to make it stick, you have to restart the computer. Want to change it back? Enter the command and restart again.

To do this, first open the Terminal from the Utilities > Applications folder.

How to enable key repeating in macos

With the Terminal open, now enter the following command and hit Return.

How to enable key repeating in macos

Next, restart your computer and you should now be able to repeat all characters.

How to enable key repeating in macos

Before you continue though, you might want to make sure that you adjust the repeat speed to suit your preferences. To do this, first open the System Preferences and then click open “Keyboard”.

How to enable key repeating in macos

The controls that apply are Key Repeat and Delay Until Repeat.

The first option will let you dictate how fast a key repeats. Note, if it is off, then keys won’t repeat at all.

The Delay Until Repeat option lets you decide how long it takes when you press and hold a key before it begins repeating.

How to enable key repeating in macos

If you want to reenable special characters, then you will need to enter the command in the Terminal again, change the last part to “true” and then again restart your computer.

Granted, this isn’t the most convenient way to go about switching between repeating and special characters. While you might not use one or the other often enough that this necessarily seems like a big problem, there are enough Mac users out there asking this very same question.

It would be far more convenient if Apple would simply add a checkbox to the keyboard preferences panel that lets you enable or disable special characters as needed.

Unfortunately, judging by a cursory Google search, this is a problem people have been looking into since at least OS X Lion, so its apparently something Apple doesn’t think needs fixing.

  • › How to Show Your Work Hours and Location in Google Calendar
  • › You Can Finally Move WhatsApp Chats From iPhone to Android
  • › How to Print Double-Sided on Windows 11
  • › Samsung Galaxy Phones Are Getting Grammarly Installed by Default
  • › How to Enable Cookies in Google Chrome

How to enable key repeating in macos Matt Klein
Matt Klein has nearly two decades of technical writing experience. He’s covered Windows, Android, macOS, Microsoft Office, and everything in between. He’s even written a book, The How-To Geek Guide to Windows 8.
Read Full Bio »

How to enable key repeating in macos

Apple’s macOS now shows a palette with accented or alternate characters to choose from when you press and hold a key for any letter. For instance, if you press and hold the key with the letter “O,” you will get a palette with options like ô, ö, ò, ó, œ, ø, ō, and õ to choose from.

While this is handy, it is not useful for many users. Also, with this feature, the company has disabled the feature that allows you to press and hold the key for repeating the character or letter multiple times. This means you cannot press and hold the key and expect the letter to keep tying until you release the key.

However, you can bring back the key repetition feature on your macOS through a command entered in Terminal. Here is a step-by-step guide for the same.

How to enable key repeating in macos

How to enable key repetition feature in macOS

Step 1: Open the Terminal window on your macOS device. For this, you can press the Command + Spacebar keys to open the Spotlight. In the search bar, type Terminal and press Return (Enter). This will open the Terminal on your Mac.

Step 2: When the Terminal opens on your device, enter the following command and then press the Return key.

defaults write -g ApplePressAndHoldEnabled -bool false

After you have completed the above two steps, log out of your account and then log back in. That’s it. The repeating key feature is now enabled on your device and you can press and hold any keys for repeating letters.

If you want to disable the feature, then follow the same steps as above but just change the command line in Step 2 to “true” instead of “false” at the end.

How to enable key repeating in macos

If you hold down many keys in Mac OS X, particularly vowels but also letters like j and n, a little popup menu appears showing an accented character selection window. This is a fairly new change to OS X behavior, replacing the long existing default of a repeating key press instead, where if you hold down a key the letter will repeat endlessly until you let goooooooooooo with repeating letters of that which is held down.

If you want to turn off the character accent selector and re-enable key repetition with extended keypresses, you can easily do so through a defaults write command.

To get started, launch the Terminal app and enter the following command onto a single command line (it’s often easiest to just copy and paste the defaults string) and then hit the Return key:

defaults write -g ApplePressAndHoldEnabled -bool false

You shouldn’t need to do anything for the change to take effect, but relaunching apps may be beneficial if you don’t immediately notice a difference.

Try it out, and you can can now repeat keys as usual rather than have the iOS-style accented popup appear.

If you want to bring the accented character selector menu back with a long keypress, you’ll use the same defaults command string in the Terminal, but use true instead, like so:

defaults write -g ApplePressAndHoldEnabled -bool true

Most apps need to be relaunched for the change to take place again.

This works in all versions of OS X where the Press And Hold feature exists, including Macs with Mavericks, Mountain Lion, and Lion.

To disable the press and hold accented character picker you need to digit the following commad in a Terminal window:

After that you will have to Log Out and then Log In again. Or just restart the Mac.

If you want to re-enable the functionality, you need to digit

the Log Out and Log In again.

Comments

Profile cancel

This site uses Akismet to reduce spam. Learn how your comment data is processed.

I’ve been trying to sort this for ages now, and you seem to suggest the same “fix” as a gazillion other pages, but it just doesn’t work for me. Personally, I want the accent menu back! I used to have this function when I bought my Macbook Pro a few months and I thought iy was great, but at some point it just disabled itself…so now I’m stuck with key repeat 🙁

Any suggestions/advice would be seriously appreciated.

marcomc replied:

Hi Nik,
in my personal experience using

defaults write -g ApplePressAndHoldEnabled -bool true

did always the trick to restore the accent menu.

what you may try to do is to append the command ‘sudo’ in this way

sudo defaults write -g ApplePressAndHoldEnabled -bool true

That will execute the command with administrator privileges and may force the update of the configuration file that stores the setting.

If you’ve ever had a repeating key, you will know how annoying it can be. Every time you have to double back to erase a duplicate “i” or “s,” you lose a little time. It may even interfere with your thought flow, killing your productivity throughout the day.

The good news is that repeating keys are typically easily fixed, especially if it ends up being a hardware problem. Here are a few troubleshooting steps to take to fix those pesky repeat letters.

How to enable key repeating in macos

Start Simple

As with any computer issue, it’s important to tackle the simplest troubleshooting steps first. If you have another keyboard, plug it in and start typing.

How to enable key repeating in macos

This will help you narrow down whether your existing keyboard is the problem.

Clean & Repair Keys

How to enable key repeating in macos

The next fairly simple step is to clean your keyboard. You should already give your computer a thorough cleaning on a fairly regular basis, but your keyboard is especially prone to dirt.

Shut the computer down and turn the keyboard upside down to shake out any loose debris. Wipe the keys down and used canned air to loosen any dirt that might be trapped. You can then turn the keyboard upside down again to eliminate what the canned air has dislodged.

If that doesn’t do the trick, you may need to remove the keys that are repeating and clean beneath them with a cotton swab.

Run Operating System Updates

How to enable key repeating in macos

If you haven’t updated your system recently, a quick operating system update can never hurt. On a Windows 10 machine, go to Start > Settings > Update and Security > Windows Update.

For MacOS, click on the Apple icon in the upper-left corner and choose App Store>Updates. You can also use a program like Windows Driver Booster to check for any outdated keyboard drivers and make them current.

Check System Configuration

How to enable key repeating in macos

Once you’ve physically inspected your keyboard and ruled that cause out, it’s time to check your system configuration. To do this, you’ll need to boot your computer in safe mode.

Only essential programs run when you’re in safe mode, so you can try typing in that mode and see if the problem persists. If it does, it’s likely a software issue.

Turn Off Key Repeat

How to enable key repeating in macos

On Mac laptops, there’s a setting called Key Repeat designed to allow you to press on a key and hold it to type the same letter over and over until you release it. If you’re experiencing duplicate keys on more than one key, this could be the culprit.

Type Keyboard in the Spotlight Search bar to open your keyboard settings. In the Keyboard tab, toggle Key Repeat to Off.

Reset to Default

How to enable key repeating in macos

In Windows 10, you can reset your keyboard to its factory settings. Go to Windows Settings > Time & Language > Region and Language. There, you’ll add a new language, make that new language the primary one, then move English back to the top. This will reset the keyboard.

With a Mac, you can reset your keyboard by resetting the Mac SMC. The easiest way to do this is to remove the battery, press and hold the power button for five seconds, and reinstall the battery. Choose Apple > Shut Down.

Once your computer is off, press the Shift, Control, and Option keys while pressing the power button at the same time. Hold for ten seconds, then release all keys. When you press your power button again, your computer will boot up.

Technology writer whose work has appeared on Techwalla, Dell’s TechPageOne, and Dataversity, among many others. She worked in information systems for the State of Tennessee for 13 years, including several years as a help desk manager. Read Stephanie’s Full Bio

I use the vim plugin and I typically scroll in vim by just holding j. In VSCode holding j just does a single j command, no matter how long it’s held for.

Even in vanilla vscode this also doesn’t work – problematic if you’re trying to type long blocks of ########################### for comment separators. Any idea how to enable this functionality?

10 Answers 10

To disable the Apple press and hold for VSCode only, run this command in a terminal:

Then restart VSCode.

To re-enable, run this command in a terminal:

How to enable key repeating in macos

You are on OSX, correct? If so, the issue might be Apple’s “Press&Hold”, where you can select alternative characters on long presses.

You can disable this “feature” with a defaults command in the terminal:

You have to restart VSCode afterwards.

To reenable the previous behaviour:

How to enable key repeating in macos

The official vim-plugin for VS Code mentions how to set it up on macOS

The answer by Steve above didn’t quite work for me because of global settings. It also left me curious about where to find the com.microsoft.VScode domain name for an app. Here is what worked for me and a generalized formulation:

To enable repeats for a specific app, like VSCode, first make sure that there isn’t an overriding global setting.

defaults delete -g ApplePressAndHoldEnabled

Then enable the setting for the specific app, you can find the domain name of an app by finding it in the Info.plist document under the Contents folder where it is installed.

Then set the setting on the command line.

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

You can use this pattern other app specific settings as well. Just make sure that your settings aren’t being overwritten globally.

For more information on defaults type defaults help . One more note, you don’t need to run this as sudo if your user is already an admin.

On a Windows machine, pressing and holding a keyboard key results in the character being repeated. For example, if I press and hold q for a few seconds, I end up with the following:

Similarly, I can press and hold the Backspace key to delete multiple characters.

On a Mac pressing and holding a key for several seconds results in the character being typed only once. To type it repeatedly, it is necessary to physically press it multiple times.

I’m unclear about whether that is a bug or a supposed-feature, but I am interested in replicating this functionality on a Mac.

A couple of notes and additional ideas to supplement the selected answer:

The speed of repetition of characters (how many characters are added per second when a key is held down) can be controlled by adjusting the “Key Repeat” option under System Preferences => Keyboard (Keyboard tab). However, if the fastest speed is not fast enough (it wasn’t for me), you can further adjust this setting by opening Terminal and typing:

Where 0 indicates the minimum speed (smaller is faster). The fastest that can be set by the system preferences is 2 , so the other two remaning, faster options are 1 (fast) and 0 (fastest).

The amount of time it takes for key repetition to begin can also be set by adjusting the “Delay Until Repeat” option under System Preferences => Keyboard (Keyboard tab). Again, if this is still too slow for you (as it was for me), you can set an even faster speed by opening Terminal and typing:

Where 4 , again, can be adjusted (smaller is faster). I’d highly recommend you do not set this option under 4 , though, because that would just be impossibly fast (touching a key for a mere split second would type about 10 repeating characters). I ended up setting mine to 7 , which might still be too fast for me.

How to enable key repeating in macos

Most keyboards by default repeat a key when a user continually presses it down, but this can pose a barrier for users with motor impairments. Many operating systems, however, allow users to adjust this feature—either by delaying the keyboard’s response time or by disabling the feature completely.

To Adjust/Disable Keyboard Repeat in Linux:

Select Settings> Keyboard. Select the Typing tab. Uncheck “Key presses repeat when a key is held down” to disable auto-repeat. Use the sliders for “Delay” and “Speed” to adjust how long a key is pressed before it begins repeating, and how quickly it repeats once activated.

To Adjust/Disable Keyboard Repeat in macOS:

Select System Preferences> Keyboard. Select the Keyboard tab. Use the Key Repeat slider to adjust the speed of repeat. Use the Delay Until Repeat slider to adjust how long a key can be held down before it begins repeating. Note that the Key Repeat slider has an option at one end for Off.

To Adjust/Disable Keyboard Repeat in Windows 10:

Select Settings> Ease of Access. From the list on the left, select Keyboard. Turn on Filter Keys. Turn on Enable Repeat Keys. From the pull-down menus, select how long the computer should wait to begin repeating and “How long should the computer wait before accepting subsequent repeated keystrokes” (This is the repeat speed. Smaller numbers equals faster repeat.)

Where To Buy:

This is a generic entry. For more information about this type of feature, type or paste the following search phrase into your preferred web browser: “adjust/disable key repeat [your operating system].”