14

I just wanted to make some input where I press a key and the auto-repeat function engages so I don't have to press the 0 key many times to make a long number.

10000000000000000000000000000

This has always worked without fail in the past, but it's not something I do often and I'm not sure where to look next to figure out what might be preventing this.

keyboard - system preferences

I've toggled the sliders to change the delay for key repeat, but the only thing I can hang my hat on is that perhaps Lion disables this with the new feature where you hold down some keys (like the vowels, but also some consonants) to get alternate accented characters.

s turns into ß or ś or š and so on....

Am I missing an obvious setting, or is this something that has moved to a hidden setting or is simply a bug that these controls are still around since key repeat is now deprecated?

Comments welcome if anyone doesn't have an answer, but can provide specifics where this does work for them. I've checked two Macs so I'm guessing it's not related to keyboard type or connection method.

Tetsujin
  • 115,663
bmike
  • 235,889

2 Answers2

11

The accented character selection when a key is held was one of the tiny things that changed in Lion. To disable it, run this in the Terminal:

defaults write -g ApplePressAndHoldEnabled -bool false

I will admit, though, it is strange that there's a setting in System Preferences that only affects behavior accessed through a defaults write command.

nohillside
  • 100,768
Kyle Cronin
  • 23,242
  • 21
  • 83
  • 143
  • 1
    I am going to file one heck of a bug report for leaving those controls but detached from the actual on off switch. Thanks! – bmike Mar 28 '12 at 04:56
  • 2
    The key repeat controls in Lion still affect keys other than letters and numbers — arrow keys, return, delete, function/hardware keys, punctuation, etc. Some apps, like Terminal, will still repeat alphanumeric characters, too. It does seem strange that punctuation and "option" characters allow repeating but not numbers, even though there are no numbers that trigger the popup. – joelseph Mar 28 '12 at 05:03
  • 1
    Wow - a pile of undocumented mess (assuming I can't find this documented now that I know the defaults command) - perhaps that's why it took so long for me to notice with terminal being unchanged. – bmike Mar 28 '12 at 12:11
  • 1
    This command requires a restart to take effect. – stiemannkj1 Aug 12 '14 at 13:27
  • This just started suddenly in Yosemite for me today. I had to reset the NVRAM the other day due to issues with USB and it caused other issues (FileVault and I was forced to change my password upon boot, as if I'd forgotten it). But everything was fine keyboard-wise until this morning. I tried two different keyboards, both which have worked, and reset the NVRAM twice. Plus I fiddled with the keyboard options, resetting things back to default, etc. Your terminal command has saved my day! –  Mar 10 '15 at 13:22
  • 1
    Nevermind - it didn't fix it for the GUI apps. Shit! –  Mar 10 '15 at 13:27
  • It appears to be some modifier key. I hit a few keys around the keypad and above the cursor cluster, and it suddenly started working. Weird. –  Mar 10 '15 at 13:32
3

As Kyle menitoned, this is a side effect of Lion's new accent feature.

If you have TinkerTool installed, you could easily enable or disable the feature as of version 10.7, which lets you:

Re-enable the key repeat feature

Cajunluke
  • 17,704
Senseful
  • 23,929
  • Thanks guys - I also missed this one... http://apple.stackexchange.com/questions/23770/in-lion-if-i-keep-pressing-a-key-why-doesnt-it-repeat – bmike Mar 28 '12 at 05:07