unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tim Harper <timcharper@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: OS X Lion and "ApplePressAndHoldEnabled"
Date: Mon, 20 Jun 2011 12:26:41 -0600	[thread overview]
Message-ID: <BANLkTi=z2ZEP_Eq41SE-pt0MgKjUqF3+oA@mail.gmail.com> (raw)
In-Reply-To: <jwvr56oidoj.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

On Mon, Jun 20, 2011 at 12:06 PM, Stefan Monnier
<monnier@iro.umontreal.ca>wrote:

> > In the latest version of OS X Apple has introduced "Press and Hold".
> > 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.
>
> IIUC this is because "press and hold" is then interpreted as "choose
> 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.

>
> > 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")
>
> Maybe we should include it in lisp/term/mac-win.el for now?
>

That sounds good... but do you mean ns-win.el?

Tim

[-- Attachment #2: Type: text/html, Size: 2702 bytes --]

  reply	other threads:[~2011-06-20 18:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 20:58 OS X Lion and "ApplePressAndHoldEnabled" Tim Harper
2011-06-18 16:29 ` Chong Yidong
2011-06-18 18:54   ` Tim Harper
2011-06-20 16:22     ` Tim Harper
2011-06-20 18:06 ` Stefan Monnier
2011-06-20 18:26   ` Tim Harper [this message]
2011-06-20 18:33     ` Stefan Monnier
2011-06-20 18:35       ` [PATCH] Default to disable PressAndHold in Mac OS X Lion Tim Harper
2011-06-21 18:50       ` OS X Lion and "ApplePressAndHoldEnabled" David Reitter
  -- strict thread matches above, loose matches on Subject: below --
2011-06-17 21:01 Donald Ephraim Curtis
2011-06-17 21:29 ` Edward O'Connor
2011-06-17 21:36 ` Tim Harper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=z2ZEP_Eq41SE-pt0MgKjUqF3+oA@mail.gmail.com' \
    --to=timcharper@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).