On Mon, Jun 20, 2011 at 12:06 PM, Stefan Monnier <address@hidden>
> In the latest version of OS X Apple has introduced "Press and Hold".IIUC this is because "press and hold" is then interpreted as "choose
> In Emacs, it's on by default. This translates to in Emacs, any alphanumeric
> key, when held down not in combination of any key modifiers, only one key
> press is emitted, in contrast with the previous behavior where the key is
> repeated as fast as your system repeat rate is set.
among various chars" instead of "auto-repeat". This feature makes sense
when the key is bound to self-insert-command (whether you like it or
not is another issue, but at least I don't see a reason why Emacs
should necessarily disable it rather than obey the user's system-wide
preference for it), but it clearly makes no sense when the key is bound
to some unrelated command.
If it did something useful, I'd agree with you. However, in it's current state, even bound to self-insert-command, it appears to do nothing useful and everything harmful. AEIOUY are repeated according to system repeat rate, all other alphanumeric keys are not repeated (although, when pressing a keyboard modifier, even shift, all press-and-hold incur repeated keystrokes).
Not sure how/if Emacs can enable/disable it selectively depending on the
current binding of the key.
I'm not sure either... unfortunately this is not a setting that can be changed after Emacs has started.
Maybe we should include it in lisp/term/mac-win.el for now?
> Fortunately, there is a workaround, shown to me by hober of #emacs. If this
> is added at the top of your emacs config file (such that it is executed
> before the frame is fully initialized):
> (ns-set-resource nil "ApplePressAndHoldEnabled" "NO")
That sounds good... but do you mean ns-win.el?