From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Harper Newsgroups: gmane.emacs.devel Subject: Re: OS X Lion and "ApplePressAndHoldEnabled" Date: Mon, 20 Jun 2011 12:26:41 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0cd47a98d5260204a628e2a3 X-Trace: dough.gmane.org 1308598603 20149 80.91.229.12 (20 Jun 2011 19:36:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2011 19:36:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 20 21:36:39 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QYkH0-0005gP-Hu for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2011 21:36:38 +0200 Original-Received: from localhost ([::1]:56403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYkGz-0007E7-EK for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2011 15:36:37 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYjC1-0005u1-Mh for emacs-devel@gnu.org; Mon, 20 Jun 2011 14:27:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYjBz-0001Ro-Ks for emacs-devel@gnu.org; Mon, 20 Jun 2011 14:27:25 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:53692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYjBy-0001Rg-D2 for emacs-devel@gnu.org; Mon, 20 Jun 2011 14:27:22 -0400 Original-Received: by wwf22 with SMTP id 22so1729868wwf.30 for ; Mon, 20 Jun 2011 11:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=RCkDkg9xFypTkgvzRasADYft7zgcvyYAiaTAJXQ5whQ=; b=k2KfnWir6dJOuO74c7Lsh8tEroEbet2pdoRloLi+0HLAFZXCROTnp60Oenlay9bvoS +T6TxDnB33Hfuo4zygYEBnc5eon7xNLGsfAfXdvGgdZmz3/QRggiFEFyxgL09qtPlRRx NmXNWLUx/d0aYav6DJ6ExHN+9IjYu67v815mQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=JjOQUmE+7l8mDZDdDlSUJuG1n3S/j3M1bdI5XoLx50XY7Y59tfvsJaDD8Ghn4i4cYW l3uUBKGlze4mYcqHd+P19MqAD8ClUF3rCMjIGpCKGomge2moCmt6GTTnO04ln0NLkD5f Bl/yqUTgcXXs5UNRS0WzB4Ixl9qepRwY5u7Lg= Original-Received: by 10.216.232.4 with SMTP id m4mr2917745weq.87.1308594441364; Mon, 20 Jun 2011 11:27:21 -0700 (PDT) Original-Received: by 10.216.153.131 with HTTP; Mon, 20 Jun 2011 11:26:41 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140735 Archived-At: --000e0cd47a98d5260204a628e2a3 Content-Type: text/plain; charset=UTF-8 On Mon, Jun 20, 2011 at 12:06 PM, Stefan Monnier 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 --000e0cd47a98d5260204a628e2a3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

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 an= d Hold".
> In Emacs, it's on by default. =C2=A0This translates to in Emacs, a= ny 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 a= s "choose
among various chars" instead of "auto-repeat". =C2=A0This fe= ature 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 so= mething useful, I'd agree with you. =C2=A0However, in it's current = state, even bound to self-insert-command, it appears to do nothing useful a= nd everything harmful. =C2=A0AEIOUY are repeated according to system repeat= rate, all other alphanumeric keys are not repeated (although, when pressin= g a keyboard modifier, even shift, all press-and-hold incur repeated keystr= okes).

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 aft= er Emacs has started.

> Fortunately, there is a workaround, shown to me by hober of #emacs. = =C2=A0If this
> is added at the top of your emacs config file (such that it is execute= d
> before the frame is fully initialized):

> (ns-set-resource nil "ApplePressAndHoldEnabled" "NO&quo= t;)

Maybe we should include it in lisp/term/mac-win.el for now?

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

Tim
--000e0cd47a98d5260204a628e2a3--