From unknown Thu Aug 14 20:52:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#38296 <38296@debbugs.gnu.org> To: bug#38296 <38296@debbugs.gnu.org> Subject: Status: Allow Option key to be modifier for non-char key and mouse events Reply-To: bug#38296 <38296@debbugs.gnu.org> Date: Fri, 15 Aug 2025 03:52:57 +0000 retitle 38296 Allow Option key to be modifier for non-char key and mouse ev= ents reassign 38296 emacs submitter 38296 Mattias Engdeg=C3=A5rd severity 38296 normal tag 38296 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 20 06:40:24 2019 Received: (at submit) by debbugs.gnu.org; 20 Nov 2019 11:40:25 +0000 Received: from localhost ([127.0.0.1]:49030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXOLQ-0008Sg-Jr for submit@debbugs.gnu.org; Wed, 20 Nov 2019 06:40:24 -0500 Received: from lists.gnu.org ([209.51.188.17]:51952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXOLO-0008SY-PV for submit@debbugs.gnu.org; Wed, 20 Nov 2019 06:40:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42666) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXOLN-0008FP-Et for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2019 06:40:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_50,KHOP_HELO_FCRDNS, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iXOLL-0004QH-Be for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2019 06:40:20 -0500 Received: from mail1476c50.megamailservers.eu ([91.136.14.76]:60014 helo=mail118c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iXOLK-0004Hr-Lt for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2019 06:40:19 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574247306; bh=NWqYtif/+hywgQ3mCUnGexjtdy4Bimepe+AHZYtxXIs=; h=From:Subject:Date:To:From; b=nDFsS8eLberR1JctuxwI/FBi6lHhZHAo7gYTCrGU2ZjsPwGnZZdjRjmf/Q2qDG8Kr jzGhOb4+KSZpO3Il3VnNoj5QXXOn3d9lX5cC0UBI1BtrOz1Qe4kbhvdM9jHswxAIW/ Is0iN3Ah1TCKF08y897nY1EvElQHzOMQfrXMQE9E= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-ee54e353.032-75-73746f71.bbcust.telenor.se [83.227.84.238]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xAKAt5EP031739 for ; Wed, 20 Nov 2019 10:55:06 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_AAC7929A-58CA-4519-ACF1-7628DFC17887" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Allow Option key to be modifier for non-char key and mouse events Message-Id: <278BB45E-2B2A-4B98-A658-324F1E6F60D2@acm.org> Date: Wed, 20 Nov 2019 11:55:04 +0100 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0207.5DD51B8A.003E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=dLXYZ9Rb c=1 sm=1 tr=0 a=Fmb7hdz85/yTNbhpOvpRKA==:117 a=Fmb7hdz85/yTNbhpOvpRKA==:17 a=M51BFTxLslgA:10 a=drp3avIr7J7FEIP39kAA:9 a=QEXdDO2ut3YA:10 a=9oTz5h4PX-zHKN-gRuIA:9 a=B2y7HmGcmWMA:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.136.14.76 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_AAC7929A-58CA-4519-ACF1-7628DFC17887 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Mac users, especially those of us with a non-US keyboard, need the = Option keys for entering various characters, and thus set = 'ns-alternate-modifier' to nil, or use 'ns-right-alternate-modifier' to = employ only one of them for this purpose. However, this prevents use of = that key as modifier for function keys (arrows, backspace etc) or mouse = actions. This patch adds the variable 'ns-alternate-modifier-char-entry' which, = when non-nil, inhibits the Option key translation to Emacs modifiers for = character keys but allows it for any other event. For example, setting (setq ns-alternate-modifier 'super) (setq ns-alternate-modifier-char-entry t) makes Option act as Super with function keys and mouse clicks, but = retains the standard macOS semantics for character entry (for example, = Option + p =3D =CF=80). --Apple-Mail=_AAC7929A-58CA-4519-ACF1-7628DFC17887 Content-Disposition: attachment; filename=0001-Add-ns-alternate-modifier-char-entry.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-ns-alternate-modifier-char-entry.patch" Content-Transfer-Encoding: quoted-printable =46rom=2057e5811920211a41cfd97db9da30acebc32024e7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Tue,=2019=20Nov=202019=2020:54:49=20+0100=0A= Subject:=20[PATCH]=20Add=20ns-alternate-modifier-char-entry=0A=0AAllow=20= the=20Option=20keys=20to=20be=20used=20for=20normal=20character=20entry=20= while=0Ahaving=20them=20generate=20Emacs=20modifiers=20for=20other=20= events=0Aby=20setting=20'ns-alternate-modifier-char-entry'=20to=20= non-nil.=0A=0A*=20doc/emacs/macos.texi=20(Mac=20/=20GNUstep=20Basics):=20= Document=20the=20variable.=0A*=20lisp/cus-start.el=20(standard):=20Allow=20= customisation.=0A*=20src/nsterm.m=20(EV_MODIFIERS2):=20Add=20argument.=0A= (EV_MODIFIERS):=20Adapt=20EV_MODIFIERS2=20invocation.=0A= (ns_get_shifted_character,=20[EmacsView=20keyDown:]):=20Use=20the=20new=20= variable.=0A(syms_of_nsterm):=20Define=20the=20new=20variable.=0A*=20= etc/NEWS:=20Mention=20the=20new=20variable.=0A---=0A=20= doc/emacs/macos.texi=20|=20=206=20++++++=0A=20etc/NEWS=20=20=20=20=20=20=20= =20=20=20=20=20=20|=20=206=20++++++=0A=20lisp/cus-start.el=20=20=20=20|=20= =201=20+=0A=20src/nsterm.m=20=20=20=20=20=20=20=20=20|=2035=20= +++++++++++++++++++++++++----------=0A=204=20files=20changed,=2038=20= insertions(+),=2010=20deletions(-)=0A=0Adiff=20--git=20= a/doc/emacs/macos.texi=20b/doc/emacs/macos.texi=0Aindex=20= d9920957ad..85ede7bd68=20100644=0A---=20a/doc/emacs/macos.texi=0A+++=20= b/doc/emacs/macos.texi=0A@@=20-61,6=20+61,12=20@@=20Mac=20/=20GNUstep=20= Basics=0A=20ignore=20them,=20in=20which=20case=20you=20get=20the=20= default=20behavior=20of=20macOS=0A=20accentuation=20system=20from=20the=20= right=20@key{Option}=20key.=0A=20=0A+@vindex=20= ns-alternate-modifier-char-entry=0A+=20=20To=20make=20the=20@key{Option}=20= keys=20retain=20their=20macOS=20behaviour=20for=0A+entering=20characters=20= but=20work=20as=20Emacs=20modifiers=20with=20function=20keys=20and=0A= +mouse=20actions,=20set=20the=20@code{ns-alternate-modifier-char-entry}=0A= +variable=20to=20a=20non-nil=20value.=0A+=0A=20=20=20@kbd{S-mouse-1}=20= adjusts=20the=20region=20to=20the=20click=20position,=0A=20just=20like=20= @kbd{mouse-3}=20(@code{mouse-save-then-kill});=20it=20does=20not=20pop=0A= =20up=20a=20menu=20for=20changing=20the=20default=20face,=20as=20= @kbd{S-mouse-1}=20normally=0Adiff=20--git=20a/etc/NEWS=20b/etc/NEWS=0A= index=20db00d40bb6..75f54304fe=20100644=0A---=20a/etc/NEWS=0A+++=20= b/etc/NEWS=0A@@=20-3218,6=20+3218,12=20@@=20Previously=20it=20was=20= supported=20only=20in=20the=20Cygwin-w32=20build.=0A=20**=20Emacs=20now=20= handles=20key=20combinations=20involving=20the=20macOS=20"command"=0A=20= and=20"option"=20modifier=20keys=20more=20correctly.=0A=20=0A++++=0A+**=20= New=20user=20option=20'ns-alternate-modifier-char-entry'.=0A+Set=20to=20= non-nil=20to=20allow=20the=20macOS=20"option"=20keys=20to=20be=20used=20= for=20normal=0A+character=20entry=20while=20treating=20them=20as=20Emacs=20= modifiers=20for=20function=20keys=0A+and=20mouse=20events.=0A+=0A=20**=20= The=20special=20handling=20of=20'frame-title-format'=20on=20NS=20where=20= setting=20it=0A=20to=20't'=20would=20enable=20the=20macOS=20proxy=20icon=20= has=20been=20replaced=20with=20a=0A=20separate=20variable,=20= 'ns-use-proxy-icon'.=20=20'frame-title-format'=20will=20now=0Adiff=20= --git=20a/lisp/cus-start.el=20b/lisp/cus-start.el=0Aindex=20= e4b6d8f2d6..9d50108204=20100644=0A---=20a/lisp/cus-start.el=0A+++=20= b/lisp/cus-start.el=0A@@=20-470,6=20+470,7=20@@=20= minibuffer-prompt-properties--setter=0A=20=09=09=20=20=20=20=20=20(const=20= control)=20(const=20meta)=0A=20=09=09=20=20=20=20=20=20(const=20alt)=20= (const=20hyper)=0A=20=09=09=20=20=20=20=20=20(const=20super))=20"23.3")=0A= +=09=20=20=20=20=20(ns-alternate-modifier-char-entry=20ns=20boolean=20= "27.1")=0A=20=09=20=20=20=20=20(ns-function-modifier=0A=20=09=20=20=20=20= =20=20ns=0A=20=09=20=20=20=20=20=20(choice=20(const=20:tag=20"No=20= modifier=20(work=20as=20function)"=20none)=0Adiff=20--git=20= a/src/nsterm.m=20b/src/nsterm.m=0Aindex=20e1d745e332..38a404620d=20= 100644=0A---=20a/src/nsterm.m=0A+++=20b/src/nsterm.m=0A@@=20-380,7=20= +380,7=20@@=20-=20(NSColor=20*)colorUsingDefaultColorSpace=0A=20=20=20= return=20modifiers;=0A=20}=0A=20=0A-#define=20EV_MODIFIERS2(flags)=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+#define=20= EV_MODIFIERS2(flags,=20enable_alternate_mod)=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20(((flags=20&=20= NSEventModifierFlagHelp)=20?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= hyper_modifier=20:=200)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20|=20((flags=20&=20= NSEventModifierFlagShift)=20?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-397,13=20+397,15=20= @@=20-=20(NSColor=20*)colorUsingDefaultColorSpace=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= NSEventModifierFlagCommand,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20ns_command_modifier,=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_command_modifier)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A-=20=20=20|=20ev_modifiers_helper=20(flags,=20= NSLeftAlternateKeyMask,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20NSRightAlternateKeyMask,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20NSEventModifierFlagOption,=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_alternate_modifier,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20ns_right_alternate_modifier))=0A+=20=20=20= |=20(enable_alternate_mod=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20=20=20?=20ev_modifiers_helper=20(flags,=20= NSLeftAlternateKeyMask,=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20NSRightAlternateKeyMask,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20NSEventModifierFlagOption,=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_alternate_modifier,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20ns_right_alternate_modifier)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A+=20=20=20=20=20=20:=200))=0A=20=0A= -#define=20EV_MODIFIERS(e)=20EV_MODIFIERS2=20([e=20modifierFlags])=0A= +#define=20EV_MODIFIERS(e)=20EV_MODIFIERS2=20([e=20modifierFlags],=20= true)=0A=20=0A=20#define=20EV_UDMODIFIERS(e)=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20\=0A=20=20=20=20=20((([e=20type]=20=3D=3D=20= NSEventTypeLeftMouseDown)=20?=20down_modifier=20:=200)=20=20=20=20=20=20=20= \=0A@@=20-2630,13=20+2632,15=20@@=20so=20some=20key=20presses=20(TAB)=20= are=20swallowed=20by=20the=20system.=20=20*/=0A=20=20=20NSTRACE=20= ("ns_get_shifted_character");=0A=20=0A=20=20=20if=20((flags=20&=20= NSRightAlternateKeyMask)=20=3D=3D=20NSRightAlternateKeyMask=0A-=20=20=20=20= =20=20&&=20(EQ=20(ns_right_alternate_modifier,=20Qnone)=0A+=20=20=20=20=20= =20&&=20(ns_alternate_modifier_char_entry=0A+=20=20=20=20=20=20=20=20=20=20= ||=20EQ=20(ns_right_alternate_modifier,=20Qnone)=0A=20=20=20=20=20=20=20=20= =20=20=20||=20(EQ=20(ns_right_alternate_modifier,=20Qleft)=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20&&=20EQ=20(ns_alternate_modifier,=20= Qnone))))=0A=20=20=20=20=20modifiers=20|=3D=20rightOptionKey;=0A=20=0A=20= =20=20if=20((flags=20&=20NSLeftAlternateKeyMask)=20=3D=3D=20= NSLeftAlternateKeyMask=0A-=20=20=20=20=20=20&&=20EQ=20= (ns_alternate_modifier,=20Qnone))=0A+=20=20=20=20=20=20&&=20= (ns_alternate_modifier_char_entry=0A+=20=20=20=20=20=20=20=20=20=20||=20= EQ=20(ns_alternate_modifier,=20Qnone)))=0A=20=20=20=20=20modifiers=20|=3D=20= optionKey;=0A=20=0A=20=20=20if=20((flags=20&=20NSRightCommandKeyMask)=20= =3D=3D=20NSRightCommandKeyMask=0A@@=20-6287,7=20+6291,8=20@@=20In=20that=20= case=20we=20use=20UCKeyTranslate=20(ns_get_shifted_character)=0A=20=20=20= =20=20=20=20=20=20=20modifier=20keys,=20which=20returns=200=20for=20= shift-like=20modifiers.=0A=20=20=20=20=20=20=20=20=20=20Therefore=20its=20= return=20value=20is=20the=20set=20of=20control-like=0A=20=20=20=20=20=20=20= =20=20=20modifiers.=20=20*/=0A-=20=20=20=20=20=20emacs_event->modifiers=20= =3D=20EV_MODIFIERS2=20(flags);=0A+=20=20=20=20=20=20bool=20enable_alt=20= =3D=20fnKeysym=20||=20!ns_alternate_modifier_char_entry;=0A+=20=20=20=20=20= =20emacs_event->modifiers=20=3D=20EV_MODIFIERS2=20(flags,=20enable_alt);=0A= =20=0A=20=20=20=20=20=20=20/*=20Function=20keys=20(such=20as=20the=20= F-keys,=20arrow=20keys,=20etc.)=20set=0A=20=20=20=20=20=20=20=20=20=20= modifiers=20as=20though=20the=20fn=20key=20has=20been=20pressed=20when=20= it=0A@@=20-9414,6=20+9419,16=20@@=20Convert=20an=20X=20font=20name=20= (XLFD)=20to=20an=20NS=20font=20name.=0A=20at=20all,=20allowing=20it=20to=20= be=20used=20at=20a=20lower=20level=20for=20accented=20character=20= entry.");=0A=20=20=20ns_right_alternate_modifier=20=3D=20Qleft;=0A=20=0A= +=20=20DEFVAR_BOOL=20("ns-alternate-modifier-char-entry",=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20ns_alternate_modifier_char_entry,=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20"Whether=20the=20option=20or=20= alternate=20keys=20are=20used=20for=20character=20entry.\n\=0A+When=20= non-nil,=20the=20alternate=20/=20option=20keys=20work=20as=20Emacs=20= modifiers=20for\n\=0A+function=20keys=20and=20mouse=20actions=20but=20= not=20with=20character-generating=20keys.\n\=0A+When=20nil,=20the=20keys=20= are=20interpreted=20by=20Emacs=20for=20all=20events.\n\=0A+In=20either=20= case,=20`ns-alternate-modifier'=20and=20`ns-right-alternate-modifier'\n\=0A= +describe=20what=20Emacs=20modifiers=20are=20being=20generated.");=0A+=20= =20ns_alternate_modifier_char_entry=20=3D=20false;=0A+=0A=20=20=20= DEFVAR_LISP=20("ns-command-modifier",=20ns_command_modifier,=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20"This=20variable=20describes=20the=20= behavior=20of=20the=20command=20key.\n\=0A=20Set=20to=20the=20symbol=20= control,=20meta,=20alt,=20super,=20or=20hyper=20means=20it=20is=20taken=20= to=20be\n\=0A--=20=0A2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_AAC7929A-58CA-4519-ACF1-7628DFC17887-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 20 06:43:16 2019 Received: (at control) by debbugs.gnu.org; 20 Nov 2019 11:43:16 +0000 Received: from localhost ([127.0.0.1]:49035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXOOC-00005g-4j for submit@debbugs.gnu.org; Wed, 20 Nov 2019 06:43:16 -0500 Received: from mail234c50.megamailservers.eu ([91.136.10.244]:36400 helo=mail37c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXOOA-00005W-Jn for control@debbugs.gnu.org; Wed, 20 Nov 2019 06:43:15 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574250192; bh=+gn1CkqjCpVptpMUVfX67gh6dSec+cHuqbvu4LfoI8M=; h=From:Subject:Date:To:From; b=OlGNvAOFidmW2lQYqwX03nrU4HzcaJivAZOzFgK6zqdnRM+xb0nFTNZywDZhZ7Wy2 qbJ5bSSGj1qW7Myo2EcdtGeMiowKszkkn6ltlGsfcCezJVIX4Ij+UIntexq8qVPcbh unCMJc8W0qe34ldmQnRO7DfLMu98/5o9yOqJDCGI= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-ee54e353.032-75-73746f71.bbcust.telenor.se [83.227.84.238]) (authenticated bits=0) by mail37c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xAKBhALL022956 for ; Wed, 20 Nov 2019 11:43:12 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: tags 38296 Message-Id: <960DADFE-FEC7-416F-8D38-CD1085A946FF@acm.org> Date: Wed, 20 Nov 2019 12:43:10 +0100 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0215.5DD526D0.003E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=eN1tc0h1 c=1 sm=1 tr=0 a=Fmb7hdz85/yTNbhpOvpRKA==:117 a=Fmb7hdz85/yTNbhpOvpRKA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=kiFpHCcIK7-UtwXV5HYA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 38296 patch From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 21 13:40:03 2019 Received: (at 38296) by debbugs.gnu.org; 21 Nov 2019 18:40:03 +0000 Received: from localhost ([127.0.0.1]:53333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrN5-0007V5-67 for submit@debbugs.gnu.org; Thu, 21 Nov 2019 13:40:03 -0500 Received: from mail1458c50.megamailservers.eu ([91.136.14.58]:46090 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrN1-0007UP-1C for 38296@debbugs.gnu.org; Thu, 21 Nov 2019 13:40:01 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574361591; bh=BZcOa85s54hKTsA7yvg/mJDMqojRzidtWf0Hf3akxQw=; h=From:Subject:Date:Cc:To:From; b=XKxBRSLekcYOMr3cMlQDsMcAhulaVWROR2I9F0mrvViAe2/IeqEOjTfugjNJpxqSj elhvDYQjpZLo8vKiAtqSB+GSFlN/+rwTLyAAaxqz7keKTctNHIJcEz9SGfMXuc1Pzj rv0P97sZsu6FQPx1MGt5+pqbii3QffNsj9+HB9xw= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xALIdn3t030365; Thu, 21 Nov 2019 18:39:51 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events Message-Id: Date: Thu, 21 Nov 2019 19:39:49 +0100 To: 38296@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020E.5DD6D9F7.003A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OY7m8SbY c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=XVZFRrqS1Daj4gJS5YcA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: It was pointed out to me that it would be useful to set this behaviour individually for either Option key. This can be accomplished in various ways. For example, ns-alternate-modifier-char-entry could [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 38296 Cc: Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) It was pointed out to me that it would be useful to set this behaviour = individually for either Option key. This can be accomplished in various ways. For example, = ns-alternate-modifier-char-entry could be changed from a boolean into = taking either of the values nil, left, right or both, indicating to = which Option key it applies. Or we could simply use two separate boolean variables. I'd appreciate = advice from the NS maintainers about what practice is best. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 21 16:12:19 2019 Received: (at 38296) by debbugs.gnu.org; 21 Nov 2019 21:12:19 +0000 Received: from localhost ([127.0.0.1]:53392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXtkR-0002te-6k for submit@debbugs.gnu.org; Thu, 21 Nov 2019 16:12:19 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:46785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXtkO-0002tR-TM for 38296@debbugs.gnu.org; Thu, 21 Nov 2019 16:12:17 -0500 Received: by mail-wr1-f49.google.com with SMTP id z7so2745466wrl.13 for <38296@debbugs.gnu.org>; Thu, 21 Nov 2019 13:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Y2VL1DQEi2vwXTwE04JtorGhtgJaskaCBw/jTuAe7PI=; b=ULpGi7Q9wJWLBOE5CFl3OOTkK0LYITwA/J62caMaLMiuOGEJBc+1n86RnUbEM8LXP/ KJf2mTSc/tOxA077Kh6lU+Z/vCYx9d1iR1RxQekoTQxzmS+EMZ7TDafAoe/LHd9vkNcg jQa+EXgLyxrbUz5aRMF/3kSuppNtXMFN2s+UqGQefpVjcmoAgsY9eI70zc8+Po5DorFE oCNhFRSYSz78Lqs/nY2AQQaNiJoQRepcymAz+jEgXxcGWOcZ/lmwo4Urt4ksJuZo8yCn rTJK0MoR64wKJniJPzKEq5W3uncUgAPrH4/qV+P2aI5UWR2t4ViLO5AgLcnFmgDwfwkX cObw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Y2VL1DQEi2vwXTwE04JtorGhtgJaskaCBw/jTuAe7PI=; b=nfNwScuXPz+MEUEv/nSvyib7Pq3rcNmIfUoHzPwbbpWbWSTN/gxzEpYbngyZpMLBdX SKttxAdFpsWtukVoWePpTRHaTZ8PSwIAOdDx5wJSC22j8rKar/lqLV6ILsDhXrcQ0Djq GUR9/9YX7ALSnmp7KlCtnkNrpbEnhajQEAEqqscxEUPO6J9Vr1KuN1bjfoq5P2T7IXGL LN2Hvqp8XKWKwCUEypuEE++SuI9+6/xYtSPTklDecJhLZC+T1IqnXTeunusZSOR/yc0r XA4LLGXe8iroy3UdUsU91K53NRJAPBkIdd8pi0VQ2uSOCBV2BhYT6kQdBhWQfv4EQmuB y1tQ== X-Gm-Message-State: APjAAAWl41sQ+YPT+SydRIIUQYEb7Ni5HXwzKvAfpP1aoPvSBMwfAsW3 ykZNVnL3nRvfpHzOoGo5aLs= X-Google-Smtp-Source: APXvYqy629w9PDjIF4gK0jAl8+0IPW017KKwMsL1ARAEhtVpXS7nZHwlkeYhkYaKg4DbAGHdmzNJyw== X-Received: by 2002:a5d:43c3:: with SMTP id v3mr6674876wrr.324.1574370730753; Thu, 21 Nov 2019 13:12:10 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-1980-cc6a-4f4e-9c42.holly.idiocy.org. [2001:8b0:3f8:8129:1980:cc6a:4f4e:9c42]) by smtp.gmail.com with ESMTPSA id l13sm939403wmh.12.2019.11.21.13.12.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2019 13:12:09 -0800 (PST) Date: Thu, 21 Nov 2019 21:12:07 +0000 From: Alan Third To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events Message-ID: <20191121211207.GA96045@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38296 Cc: 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Nov 21, 2019 at 07:39:49PM +0100, Mattias Engdegård wrote: > It was pointed out to me that it would be useful to set this > behaviour individually for either Option key. This can be > accomplished in various ways. For example, > ns-alternate-modifier-char-entry could be changed from a boolean > into taking either of the values nil, left, right or both, > indicating to which Option key it applies. Or we could simply use > two separate boolean variables. I'd appreciate advice from the NS > maintainers about what practice is best. I was thinking about this and although the patch looks good to me, I don’t find the variable name very descriptive. Perhaps it would be better to go with something like ns-alternate-modifier-function-only? Also probably best to add an ns-option-... alias too. Do you think this functionality will only be required for the alt/option key or will there be a demand to add it for command too? In my experience the characters available via command are rather more obscure, but I’ve little experience with non‐UK keyboards. Anyway, as to your question, I think I prefer the two variable approach. It mirrors the existing modifier variables. Thanks for working on this. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 15:01:30 2019 Received: (at 38296) by debbugs.gnu.org; 22 Nov 2019 20:01:30 +0000 Received: from localhost ([127.0.0.1]:55547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYF7R-0002MI-PJ for submit@debbugs.gnu.org; Fri, 22 Nov 2019 15:01:30 -0500 Received: from mail155c50.megamailservers.eu ([91.136.10.165]:49632 helo=mail51c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYF7K-0002M1-Rc for 38296@debbugs.gnu.org; Fri, 22 Nov 2019 15:01:26 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574452880; bh=6YIzLJZ9UGzYf0P6J75nAcdcCdnsmWtGt4JajAch9/0=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=VE6nywFI9SawUvRKrwa9u6J3HVLlClUGBlkzVALrfEpByuEcmCQW0xLUCq0p2TgaX 0KwVq/xHUKI2wOHIXUSLoYDDaaB+QozWlF4qihslGnPdxIX4am+6To+9m/VTm4H4O8 X/3TlLuHhvecU+61A7fc39qO8AuamQYWi4pG94hM= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xAMK1IeJ005550; Fri, 22 Nov 2019 20:01:19 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_A6DB67D8-4999-43DF-A409-69710546B755" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events Date: Fri, 22 Nov 2019 21:01:17 +0100 In-Reply-To: <20191121211207.GA96045@breton.holly.idiocy.org> To: Alan Third References: <20191121211207.GA96045@breton.holly.idiocy.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0205.5DD83E90.0020, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=LO0Yv6e9 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=hIj89exaAAAA:8 a=xuUGQPaXmpwfWq95fEQA:9 a=QEXdDO2ut3YA:10 a=VsNuRgc8kSGwKk-gQ9oA:9 a=B2y7HmGcmWMA:10 a=lS9wXHQM5UdnNJ4u63Ry:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 38296 Cc: 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_A6DB67D8-4999-43DF-A409-69710546B755 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 21 nov. 2019 kl. 22.12 skrev Alan Third : > I was thinking about this and although the patch looks good to me, I > don=E2=80=99t find the variable name very descriptive. Perhaps it = would be > better to go with something like ns-alternate-modifier-function-only? Right. I wasn't satisfied with the name either, and ended up with = ns-{left,right}-alternate-for-char-entry, which seemed more to the = point. > Also probably best to add an ns-option-... alias too. Done. At first I thought it was just for compatibility and thus = superfluous, but you are right --- the keys have always been Option on = Macs; Alternate (or Alt) are from NeXT. > Do you think this functionality will only be required for the > alt/option key or will there be a demand to add it for command too? In > my experience the characters available via command are rather more > obscure, but I=E2=80=99ve little experience with non=E2=80=90UK = keyboards. I've never seen Command be used to select characters at all. Some = elaborate input methods? > Anyway, as to your question, I think I prefer the two variable > approach. It mirrors the existing modifier variables. Agreed. As noted above, I used symmetric variables for the left and = right option keys, both booleans, instead of a special 'left' value. Thanks for the review; new patch attached. --Apple-Mail=_A6DB67D8-4999-43DF-A409-69710546B755 Content-Disposition: attachment; filename=0001-Add-ns-left-right-alternate-for-char-entry.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-ns-left-right-alternate-for-char-entry.patch" Content-Transfer-Encoding: quoted-printable =46rom=2004a084cebc7ad77a6d11839b524f0441f66f7562=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Tue,=2019=20Nov=202019=2020:54:49=20+0100=0A= Subject:=20[PATCH]=20Add=20ns-{left,right}-alternate-for-char-entry=0A=0A= Allow=20the=20left=20and=20right=20Option=20keys=20to=20be=20used=20for=20= normal=20character=0Aentry=20while=20having=20them=20generate=20Emacs=20= modifiers=20for=20other=20events=20by=0Asetting=20= 'ns-left-alternate-for-char-entry'=20and=0A= 'ns-eight-alternate-for-char-entry',=20respectively,=20to=20non-nil.=0A=0A= The=20variables=20have=20the=20aliases=0A= 'ns-{left,right}-option-for-char-entry',=20following=20other=20= variables.=0A=0A*=20doc/emacs/macos.texi=20(Mac=20/=20GNUstep=20Basics):=20= Document=20the=20variables.=0A*=20lisp/cus-start.el=20(standard):=20= Allow=20customisation.=0A*=20src/nsterm.m=20(ev_modifiers_helper):=20= Simplify.=0A(right_modifier):=20New=20helper=20function.=0A= (EV_MODIFIERS2):=20Add=20arguments,=20use=20helper.=0A(EV_MODIFIERS):=20= Adapt=20EV_MODIFIERS2=20invocation.=0A(ns_get_shifted_character,=20= [EmacsView=20keyDown:]):=20Use=20the=20new=20variables.=0A= (syms_of_nsterm):=20Define=20the=20new=20variables.=0A*=20etc/NEWS:=20= Mention=20the=20new=20variables.=0A*=20lisp/term/ns-win.el:=20Add=20= variables=20aliases.=0A---=0A=20doc/emacs/macos.texi=20|=20=209=20= +++++++=0A=20etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=206=20= +++++=0A=20lisp/cus-start.el=20=20=20=20|=20=202=20++=0A=20= lisp/term/ns-win.el=20=20|=20=208=20++++++-=0A=20src/nsterm.m=20=20=20=20= =20=20=20=20=20|=2057=20+++++++++++++++++++++++++++++++++++---------=0A=20= 5=20files=20changed,=2070=20insertions(+),=2012=20deletions(-)=0A=0Adiff=20= --git=20a/doc/emacs/macos.texi=20b/doc/emacs/macos.texi=0Aindex=20= d9920957ad..ae2b6c0774=20100644=0A---=20a/doc/emacs/macos.texi=0A+++=20= b/doc/emacs/macos.texi=0A@@=20-61,6=20+61,15=20@@=20Mac=20/=20GNUstep=20= Basics=0A=20ignore=20them,=20in=20which=20case=20you=20get=20the=20= default=20behavior=20of=20macOS=0A=20accentuation=20system=20from=20the=20= right=20@key{Option}=20key.=0A=20=0A+@vindex=20= ns-left-alternate-for-char-entry=0A+@vindex=20= ns-right-alternate-for-char-entry=0A+=20=20To=20make=20the=20left=20and=20= right=20@key{Option}=20keys=20retain=20their=20macOS=0A+behaviour=20for=20= entering=20characters=20but=20work=20as=20Emacs=20modifiers=20with=0A= +function=20keys=20and=20mouse=20actions,=20set=20the=0A= +@code{ns-left-alternate-for-char-entry}=20and=0A= +@code{ns-right-alternate-for-char-entry}=20variables,=20respectively,=20= to=20a=0A+non-nil=20value.=0A+=0A=20=20=20@kbd{S-mouse-1}=20adjusts=20= the=20region=20to=20the=20click=20position,=0A=20just=20like=20= @kbd{mouse-3}=20(@code{mouse-save-then-kill});=20it=20does=20not=20pop=0A= =20up=20a=20menu=20for=20changing=20the=20default=20face,=20as=20= @kbd{S-mouse-1}=20normally=0Adiff=20--git=20a/etc/NEWS=20b/etc/NEWS=0A= index=209dd573bd97..4998e7047e=20100644=0A---=20a/etc/NEWS=0A+++=20= b/etc/NEWS=0A@@=20-3229,6=20+3229,12=20@@=20Previously=20it=20was=20= supported=20only=20in=20the=20Cygwin-w32=20build.=0A=20**=20Emacs=20now=20= handles=20key=20combinations=20involving=20the=20macOS=20"command"=0A=20= and=20"option"=20modifier=20keys=20more=20correctly.=0A=20=0A++++=0A+**=20= New=20user=20options=20'ns-{left,right}-option-for-char-entry'.=0A+Set=20= to=20non-nil=20to=20allow=20the=20respective=20macOS=20"option"=20keys=20= to=20be=20used=0A+for=20normal=20character=20entry=20while=20treating=20= them=20as=20Emacs=20modifiers=20for=0A+function=20keys=20and=20mouse=20= events.=0A+=0A=20**=20The=20special=20handling=20of=20= 'frame-title-format'=20on=20NS=20where=20setting=20it=0A=20to=20't'=20= would=20enable=20the=20macOS=20proxy=20icon=20has=20been=20replaced=20= with=20a=0A=20separate=20variable,=20'ns-use-proxy-icon'.=20=20= 'frame-title-format'=20will=20now=0Adiff=20--git=20a/lisp/cus-start.el=20= b/lisp/cus-start.el=0Aindex=20e4b6d8f2d6..81883bf1bd=20100644=0A---=20= a/lisp/cus-start.el=0A+++=20b/lisp/cus-start.el=0A@@=20-470,6=20+470,8=20= @@=20minibuffer-prompt-properties--setter=0A=20=09=09=20=20=20=20=20=20= (const=20control)=20(const=20meta)=0A=20=09=09=20=20=20=20=20=20(const=20= alt)=20(const=20hyper)=0A=20=09=09=20=20=20=20=20=20(const=20super))=20= "23.3")=0A+=09=20=20=20=20=20(ns-left-alternate-for-char-entry=20ns=20= boolean=20"27.1")=0A+=09=20=20=20=20=20= (ns-right-alternate-for-char-entry=20ns=20boolean=20"27.1")=0A=20=09=20=20= =20=20=20(ns-function-modifier=0A=20=09=20=20=20=20=20=20ns=0A=20=09=20=20= =20=20=20=20(choice=20(const=20:tag=20"No=20modifier=20(work=20as=20= function)"=20none)=0Adiff=20--git=20a/lisp/term/ns-win.el=20= b/lisp/term/ns-win.el=0Aindex=201841e679ac..432fa6040d=20100644=0A---=20= a/lisp/term/ns-win.el=0A+++=20b/lisp/term/ns-win.el=0A@@=20-541,11=20= +541,17=20@@=20ns-alternate-modifier=0A=20(defvar=20= ns-right-alternate-modifier)=0A=20(defvar=20ns-right-command-modifier)=0A= =20(defvar=20ns-right-control-modifier)=0A+(defvar=20= ns-left-alternate-for-char-entry)=0A+(defvar=20= ns-right-alternate-for-char-entry)=0A=20=0A=20;;=20You=20say=20tomAYto,=20= I=20say=20tomAHto..=0A=20(with-no-warnings=0A=20=20=20(defvaralias=20= 'ns-option-modifier=20'ns-alternate-modifier)=0A-=20=20(defvaralias=20= 'ns-right-option-modifier=20'ns-right-alternate-modifier))=0A+=20=20= (defvaralias=20'ns-right-option-modifier=20'ns-right-alternate-modifier)=0A= +=20=20(defvaralias=20'ns-left-option-for-char-entry=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20'ns-left-alternate-for-char-entry)=0A+=20=20= (defvaralias=20'ns-right-option-for-char-entry=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20'ns-right-alternate-for-char-entry))=0A=20=0A=20= (defun=20ns-do-hide-emacs=20()=0A=20=20=20(interactive)=0Adiff=20--git=20= a/src/nsterm.m=20b/src/nsterm.m=0Aindex=20e1d745e332..15cd79d97c=20= 100644=0A---=20a/src/nsterm.m=0A+++=20b/src/nsterm.m=0A@@=20-364,8=20= +364,7=20@@=20-=20(NSColor=20*)colorUsingDefaultColorSpace=0A=20=20=20if=20= (flags=20&=20either_mask)=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20BOOL=20= left_key=20=3D=20(flags=20&=20left_mask)=20=3D=3D=20left_mask;=0A-=20=20=20= =20=20=20BOOL=20right_key=20=3D=20(flags=20&=20right_mask)=20=3D=3D=20= right_mask=0A-=20=20=20=20=20=20=20=20&&=20!=20EQ=20(right_modifier,=20= Qleft);=0A+=20=20=20=20=20=20BOOL=20right_key=20=3D=20(flags=20&=20= right_mask)=20=3D=3D=20right_mask;=0A=20=0A=20=20=20=20=20=20=20if=20= (right_key)=0A=20=20=20=20=20=20=20=20=20modifiers=20|=3D=20= parse_solitary_modifier=20(right_modifier);=0A@@=20-380,7=20+379,14=20@@=20= -=20(NSColor=20*)colorUsingDefaultColorSpace=0A=20=20=20return=20= modifiers;=0A=20}=0A=20=0A-#define=20EV_MODIFIERS2(flags)=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+/*=20Effective=20right=20= modifier,=20since=20RIGHT_MOD=20can=20be=20`left'.=20=20*/=0A+static=20= Lisp_Object=0A+right_modifier=20(Lisp_Object=20left_mod,=20Lisp_Object=20= right_mod)=0A+{=0A+=20=20return=20EQ=20(right_mod,=20Qleft)=20?=20= left_mod=20:=20right_mod;=0A+}=0A+=0A+#define=20EV_MODIFIERS2(flags,=20= left_alt,=20right_alt)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A=20=20=20(((flags=20&=20NSEventModifierFlagHelp)=20= ?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20hyper_modifier=20:=200)=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20|=20((flags=20&=20NSEventModifierFlagShift)=20?=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A@@=20-391,19=20+397,24=20@@=20-=20(NSColor=20= *)colorUsingDefaultColorSpace=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20NSRightControlKeyMask,=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= NSEventModifierFlagControl,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20ns_control_modifier,=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_control_modifier)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20right_modifier=20(ns_control_modifier,=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_control_modifier))=20=20=20\=0A=20=20=20=20|=20= ev_modifiers_helper=20(flags,=20NSLeftCommandKeyMask,=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20NSRightCommandKeyMask,=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20NSEventModifierFlagCommand,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20ns_command_modifier,=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_command_modifier)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20right_modifier=20(ns_command_modifier,=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_command_modifier))=20=20=20\=0A=20=20=20=20|=20= ev_modifiers_helper=20(flags,=20NSLeftAlternateKeyMask,=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20NSRightAlternateKeyMask,=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= NSEventModifierFlagOption,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20ns_alternate_modifier,=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_alternate_modifier))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20left_alt=20?=20ns_alternate_modifier=20= :=20Qnil,=20=20=20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(right_alt=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20?=20right_modifier=20(ns_alternate_modifier,=20=20=20=20= =20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_alternate_modifier)=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20:=20Qnil)))=0A=20=0A-#define=20= EV_MODIFIERS(e)=20EV_MODIFIERS2=20([e=20modifierFlags])=0A+#define=20= EV_MODIFIERS(e)=20EV_MODIFIERS2=20([e=20modifierFlags],=20true,=20true)=0A= =20=0A=20#define=20EV_UDMODIFIERS(e)=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20=20=20=20=20((([e=20type]=20=3D=3D=20NSEventTypeLeftMouseDown)=20= ?=20down_modifier=20:=200)=20=20=20=20=20=20=20\=0A@@=20-2630,13=20= +2641,15=20@@=20so=20some=20key=20presses=20(TAB)=20are=20swallowed=20by=20= the=20system.=20=20*/=0A=20=20=20NSTRACE=20("ns_get_shifted_character");=0A= =20=0A=20=20=20if=20((flags=20&=20NSRightAlternateKeyMask)=20=3D=3D=20= NSRightAlternateKeyMask=0A-=20=20=20=20=20=20&&=20(EQ=20= (ns_right_alternate_modifier,=20Qnone)=0A+=20=20=20=20=20=20&&=20= (ns_right_alternate_for_char_entry=0A+=20=20=20=20=20=20=20=20=20=20||=20= EQ=20(ns_right_alternate_modifier,=20Qnone)=0A=20=20=20=20=20=20=20=20=20= =20=20||=20(EQ=20(ns_right_alternate_modifier,=20Qleft)=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20&&=20EQ=20(ns_alternate_modifier,=20= Qnone))))=0A=20=20=20=20=20modifiers=20|=3D=20rightOptionKey;=0A=20=0A=20= =20=20if=20((flags=20&=20NSLeftAlternateKeyMask)=20=3D=3D=20= NSLeftAlternateKeyMask=0A-=20=20=20=20=20=20&&=20EQ=20= (ns_alternate_modifier,=20Qnone))=0A+=20=20=20=20=20=20&&=20= (ns_left_alternate_for_char_entry=0A+=20=20=20=20=20=20=20=20=20=20||=20= EQ=20(ns_alternate_modifier,=20Qnone)))=0A=20=20=20=20=20modifiers=20|=3D=20= optionKey;=0A=20=0A=20=20=20if=20((flags=20&=20NSRightCommandKeyMask)=20= =3D=3D=20NSRightCommandKeyMask=0A@@=20-6287,7=20+6300,9=20@@=20In=20that=20= case=20we=20use=20UCKeyTranslate=20(ns_get_shifted_character)=0A=20=20=20= =20=20=20=20=20=20=20modifier=20keys,=20which=20returns=200=20for=20= shift-like=20modifiers.=0A=20=20=20=20=20=20=20=20=20=20Therefore=20its=20= return=20value=20is=20the=20set=20of=20control-like=0A=20=20=20=20=20=20=20= =20=20=20modifiers.=20=20*/=0A-=20=20=20=20=20=20emacs_event->modifiers=20= =3D=20EV_MODIFIERS2=20(flags);=0A+=20=20=20=20=20=20bool=20left_alt=20=3D=20= fnKeysym=20||=20!ns_left_alternate_for_char_entry;=0A+=20=20=20=20=20=20= bool=20right_alt=20=3D=20fnKeysym=20||=20= !ns_right_alternate_for_char_entry;=0A+=20=20=20=20=20=20= emacs_event->modifiers=20=3D=20EV_MODIFIERS2=20(flags,=20left_alt,=20= right_alt);=0A=20=0A=20=20=20=20=20=20=20/*=20Function=20keys=20(such=20= as=20the=20F-keys,=20arrow=20keys,=20etc.)=20set=0A=20=20=20=20=20=20=20=20= =20=20modifiers=20as=20though=20the=20fn=20key=20has=20been=20pressed=20= when=20it=0A@@=20-9414,6=20+9429,26=20@@=20Convert=20an=20X=20font=20= name=20(XLFD)=20to=20an=20NS=20font=20name.=0A=20at=20all,=20allowing=20= it=20to=20be=20used=20at=20a=20lower=20level=20for=20accented=20= character=20entry.");=0A=20=20=20ns_right_alternate_modifier=20=3D=20= Qleft;=0A=20=0A+=20=20DEFVAR_BOOL=20("ns-left-alternate-for-char-entry",=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_left_alternate_for_char_entry,=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"Whether=20the=20left=20option=20or=20alternate=20key=20is=20= used=20for=20character=20entry.\n\=0A+When=20non-nil,=20the=20left=20= alternate=20/=20option=20key=20works=20as=20an=20Emacs=20modifier=20= for\n\=0A+function=20keys=20and=20mouse=20actions=20but=20not=20with=20= character-generating=20keys.\n\=0A+When=20nil,=20the=20key=20is=20= interpreted=20by=20Emacs=20for=20all=20events.\n\=0A+In=20either=20case,=20= `ns-alternate-modifier'=20describes=20what=20Emacs=20modifier\n\=0A+is=20= being=20generated.");=0A+=20=20ns_left_alternate_for_char_entry=20=3D=20= false;=0A+=0A+=20=20DEFVAR_BOOL=20("ns-right-alternate-for-char-entry",=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_alternate_for_char_entry,=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"Whether=20the=20right=20option=20or=20alternate=20key=20is=20= used=20for=20character=20entry.\n\=0A+When=20non-nil,=20the=20right=20= alternate=20/=20option=20key=20works=20as=20an=20Emacs=20modifier=20= for\n\=0A+function=20keys=20and=20mouse=20actions=20but=20not=20with=20= character-generating=20keys.\n\=0A+When=20nil,=20the=20key=20is=20= interpreted=20by=20Emacs=20for=20all=20events.\n\=0A+In=20either=20case,=20= `ns-right-alternate-modifier'=20describes=20what=20Emacs=20modifier\n\=0A= +is=20being=20generated.");=0A+=20=20ns_right_alternate_for_char_entry=20= =3D=20false;=0A+=0A=20=20=20DEFVAR_LISP=20("ns-command-modifier",=20= ns_command_modifier,=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "This=20variable=20describes=20the=20behavior=20of=20the=20command=20= key.\n\=0A=20Set=20to=20the=20symbol=20control,=20meta,=20alt,=20super,=20= or=20hyper=20means=20it=20is=20taken=20to=20be\n\=0A--=20=0A2.21.0=20= (Apple=20Git-122)=0A=0A= --Apple-Mail=_A6DB67D8-4999-43DF-A409-69710546B755-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 25 14:15:39 2019 Received: (at 38296) by debbugs.gnu.org; 25 Nov 2019 19:15:39 +0000 Received: from localhost ([127.0.0.1]:49696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZJpj-0007OQ-6K for submit@debbugs.gnu.org; Mon, 25 Nov 2019 14:15:39 -0500 Received: from mail83c50.megamailservers.eu ([91.136.10.93]:34028 helo=mail18c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZJpg-0007OB-6z for 38296@debbugs.gnu.org; Mon, 25 Nov 2019 14:15:37 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574709334; bh=0/JFrR2zUU8yLwEloiUB+kCpuNNuWzA5k7gRpxLcXsQ=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=aJlFl8wnjEvKopMZKzFhcCI8+wNbOr8Nl2wFh1lBsmRJobsOKp9CRUg/4K/q4MvGS URcoCrchrXfGjB08K5/M0EgmmX3ub/JKXevjqrQ5qa8/ZSg5iTkwgF1DxDIuoo/Ce2 87CE6tL+uMqP5FJjW/wb99oFKQlcB8xzmo2tWU20= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-3d4ce655.032-75-73746f71.bbcust.telenor.se [85.230.76.61]) (authenticated bits=0) by mail18c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xAPJFV5T010607; Mon, 25 Nov 2019 19:15:33 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_B99C4720-7396-41CE-B779-E4E7890D816A" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events Date: Mon, 25 Nov 2019 20:15:31 +0100 In-Reply-To: <20191121211207.GA96045@breton.holly.idiocy.org> To: Alan Third References: <20191121211207.GA96045@breton.holly.idiocy.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0214.5DDC2856.0019, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=dfr+Ikfe c=1 sm=1 tr=0 a=2CSmQ8xxRPzqj0RSDwU2Pw==:117 a=2CSmQ8xxRPzqj0RSDwU2Pw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=hIj89exaAAAA:8 a=xuUGQPaXmpwfWq95fEQA:9 a=QEXdDO2ut3YA:10 a=auBn0QlOYkRXG7X9N1UA:9 a=B2y7HmGcmWMA:10 a=lS9wXHQM5UdnNJ4u63Ry:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 38296 Cc: 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_B99C4720-7396-41CE-B779-E4E7890D816A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 21 nov. 2019 kl. 22.12 skrev Alan Third : > Do you think this functionality will only be required for the > alt/option key or will there be a demand to add it for command too? In > my experience the characters available via command are rather more > obscure, but I=E2=80=99ve little experience with non=E2=80=90UK = keyboards. Looking at Mitsuharu Yamamoto's Mac port made me change my mind: it = solves the problem by allowing the variables to have values on the form = (:ordinary SYMBOL :function SYMBOL :mouse SYMBOL), defining each = modifier key separately for ordinary keys, function keys and mouse = events. This is more flexible, and turned out to be rather simple to implement, = so I think this is better than adding variables. I did it for all = ns-KEY-modifier and ns-right-KEY-modifier variables (KEY being control, = command, alternate and function), since it seemed silly not to. The = relevant macOS-specific documentation was improved as well. Doing so also reduces gratuitous incompatibility with the Mac port. Here is the new patch. Maybe we can get it done before Eli branches off = Emacs 27. --Apple-Mail=_B99C4720-7396-41CE-B779-E4E7890D816A Content-Disposition: attachment; filename=0001-Fine-grained-NS-modifier-key-settings-bug-38296.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Fine-grained-NS-modifier-key-settings-bug-38296.patch" Content-Transfer-Encoding: quoted-printable =46rom=20a430631efdfdb1a668f1b0ffd6f6f857e0df3466=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=2025=20Nov=202019=2018:54:20=20+0100=0A= Subject:=20[PATCH]=20Fine-grained=20NS=20modifier=20key=20settings=20= (bug#38296)=0A=0AFor=20the=20ns-MOD-modifier=20and=20= ns-right-MOD-modifier=20variables,=20MOD=0Abeing=20'control',=20= 'command',=20'alternate'=20and=20'function',=20allow=0Avalues=20on=20the=20= form=20(:ordinary=20SYMBOL=20:function=20:SYMBOL=20:mouse=20SYMBOL),=0A= so=20that=20the=20key=20can=20be=20used=20for=20different=20modifiers=20= (or=20none)=20in=0Adifferent=20contexts.=20=20This=20is=20particularly=20= useful=20for=20using=20the=20macOS=0AOption=20key=20for=20extended=20= character=20entry=20while=20still=20using=20it=20as=20an=0AEmacs=20= modifier=20for=20function=20keys=20and=20mouse=20clicks.=0A=0A*=20= src/nsterm.m=20(mod_of_kind,=20right_mod,=20nil_or_none):=20Helper=20= functions.=0A(EV_MODIFIERS2):=20Add=20KIND=20argument.=0A(EV_MODIFIERS):=20= Adapt=20call=20to=20EV_MODIFIERS2.=0A(ns_get_shifted_character):=20Use=20= correct=20event=20kind=20for=20modifiers.=0A(ns-alternate-modifier,=20= ns-right-alternate-modifier)=0A(ns-command-modifier,=20= ns-right-command-modifier)=0A(ns-control-modifier,=20= ns-right-control-modifier)=0A(ns-function-modifier):=20Rewrite=20doc=20= strings=20for=20new=20data=20format.=0A(QCordinary,=20QCfunction,=20= QCmouse):=20Define=20symbols.=0A*=20lisp/cus-start.el:=20Conform=20to=20= new=20data=20types.=0A*=20doc/emacs/macos.texi=20(Mac=20/=20GNUstep=20= Basics)=0A(Mac=20/=20GNUstep=20Customization):=20Improved=20= documentation.=0A*=20etc/NEWS:=20Mention=20the=20change.=0A---=0A=20= doc/emacs/macos.texi=20|=20=2060=20+++++++++++++----=0A=20etc/NEWS=20=20=20= =20=20=20=20=20=20=20=20=20=20|=20=20=206=20++=0A=20lisp/cus-start.el=20=20= =20=20|=20=2097=20++++++++++++++++++++++++----=0A=20src/nsterm.m=20=20=20= =20=20=20=20=20=20|=20150=20+++++++++++++++++++++++++++++--------------=0A= =204=20files=20changed,=20241=20insertions(+),=2072=20deletions(-)=0A=0A= diff=20--git=20a/doc/emacs/macos.texi=20b/doc/emacs/macos.texi=0Aindex=20= d9920957ad..fe944e411d=20100644=0A---=20a/doc/emacs/macos.texi=0A+++=20= b/doc/emacs/macos.texi=0A@@=20-48,18=20+48,8=20@@=20Mac=20/=20GNUstep=20= Basics=0A=20Emacs=20provides=20a=20set=20of=20key=20bindings=20using=20= this=20modifier=20key=20that=20mimic=0A=20other=20Mac=20/=20GNUstep=20= applications=20(@pxref{Mac=20/=20GNUstep=20Events}).=20=20You=0A=20can=20= change=20these=20bindings=20in=20the=20usual=20way=20(@pxref{Key=20= Bindings}).=0A-=0A-@vindex=20ns-alternate-modifier=0A-@vindex=20= ns-right-alternate-modifier=0A-=20=20The=20variable=20= @code{ns-right-alternate-modifier}=20controls=20the=0A-behavior=20of=20= the=20right=20@key{Alt}=20and=20@key{Option}=20keys.=20=20These=20keys=0A= -behave=20like=20the=20left-hand=20keys=20if=20the=20value=20is=20= @code{left}=20(the=0A-default).=20=20A=20value=20of=20@code{control},=20= @code{meta},=20@code{alt},=0A-@code{super},=20or=20@code{hyper}=20makes=20= them=20behave=20like=20the=20corresponding=0A-modifier=20keys;=20a=20= value=20of=20@code{left}=20means=20be=20the=20same=20key=20as=0A= -@code{ns-alternate-modifier};=20a=20value=20of=20@code{none}=20tells=20= Emacs=20to=0A-ignore=20them,=20in=20which=20case=20you=20get=20the=20= default=20behavior=20of=20macOS=0A-accentuation=20system=20from=20the=20= right=20@key{Option}=20key.=0A+The=20modifiers=20themselves=20can=20be=20= customised;=0A+@pxref{Mac=20/=20GNUstep=20Customization}.=0A=20=0A=20=20=20= @kbd{S-mouse-1}=20adjusts=20the=20region=20to=20the=20click=20position,=0A= =20just=20like=20@kbd{mouse-3}=20(@code{mouse-save-then-kill});=20it=20= does=20not=20pop=0A@@=20-107,6=20+97,52=20@@=20Mac=20/=20GNUstep=20= Customization=0A=20keys=20and=20the=20fullscreen=20behavior.=20=20To=20= see=20all=20such=20options,=20use=0A=20@kbd{M-x=20customize-group=20= @key{RET}=20ns=20@key{RET}}.=0A=20=0A+@subsection=20Modifier=20keys=0A+=0A= +The=20following=20variables=20control=20the=20behaviour=20of=20the=20= actual=20modifier=0A+keys:=0A+=0A+@table=20@code=0A+@vindex=20= ns-alternate-modifier=0A+@vindex=20ns-right-alternate-modifier=0A+@item=20= ns-alternate-modifier=0A+@itemx=20ns-right-alternate-modifier=0A+The=20= left=20and=20right=20@key{Option}=20or=20@key{Alt}=20keys.=0A+=0A= +@vindex=20ns-command-modifier=0A+@vindex=20ns-right-command-modifier=0A= +@item=20ns-command-modifier=0A+@itemx=20ns-right-command-modifier=0A= +The=20left=20and=20right=20@key{Command}=20keys.=0A+=0A+@vindex=20= ns-control-modifier=0A+@vindex=20ns-right-control-modifier=0A+@item=20= ns-control-modifier=0A+@itemx=20ns-right-control-modifier=0A+The=20left=20= and=20right=20@key{Control}=20keys.=0A+=0A+@vindex=20= ns-function-modifier=0A+@item=20ns-function-modifier=0A+The=20= @key{Function}=20(fn)=20key.=0A+@end=20table=0A+=0A+The=20value=20of=20= each=20variable=20is=20either=20a=20symbol,=20describing=20the=20key=20= for=0A+any=20purpose,=20or=20a=20list=20on=20the=20form=0A= +@code{(:ordinary=20@var{symbol}=20:function=20@var{symbol}=20:mouse=20= @var{symbol})},=0A+which=20describes=20the=20modifier=20when=20used=20= with=20ordinary=20keys,=20function=20keys=0A+(that=20do=20not=20produce=20= a=20character,=20such=20as=20arrow=20keys),=20and=20mouse=20clicks.=0A+=0A= +If=20the=20@var{symbol}=20is=20one=20of=20@code{control},=20= @code{meta},=20@code{alt},=0A+@code{super}=20or=20@code{hyper},=20this=20= describes=20the=20Emacs=20modifier=20it=0A+represents.=20=20If=20= @var{symbol}=20is=20@code{none},=20Emacs=20does=20not=20use=20the=0A= +key,=20which=20retains=20its=20standard=20behaviour.=20=20For=20= instance,=20the=0A+@key{Option}=20key=20in=20macOS=20is=20normally=20= used=20for=20composing=20additional=0A+characters.=0A+=0A+The=20= variables=20for=20right-hand=20keys,=20like=20= @code{ns-right-alternate-modifier},=0A+may=20also=20be=20set=20to=20= @code{left},=20which=20means=20to=20use=20the=20same=20behaviour=20as=0A= +the=20corresponding=20left-hand=20key.=0A+=0A=20@subsection=20Font=20= Panel=0A=20=0A=20@findex=20ns-popup-font-panel=0Adiff=20--git=20= a/etc/NEWS=20b/etc/NEWS=0Aindex=20edd536f2f0..7056b99878=20100644=0A---=20= a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-3241,6=20+3241,12=20@@=20= Previously=20it=20was=20supported=20only=20in=20the=20Cygwin-w32=20= build.=0A=20**=20Emacs=20now=20handles=20key=20combinations=20involving=20= the=20macOS=20"command"=0A=20and=20"option"=20modifier=20keys=20more=20= correctly.=0A=20=0A+**=20MacOS=20modifier=20key=20behaviour=20is=20now=20= more=20adjustable.=0A+The=20behaviour=20of=20the=20macOS=20"Option",=20= "Command",=20"Control"=20and=0A+"Function"=20keys=20can=20now=20be=20= specified=20separately=20for=20use=20with=0A+ordinary=20keys,=20function=20= keys=20and=20mouse=20clicks.=20=20This=20allows=20using=20them=0A+in=20= their=20standard=20macOS=20way=20for=20composing=20characters.=0A+=0A=20= **=20The=20special=20handling=20of=20'frame-title-format'=20on=20NS=20= where=20setting=20it=0A=20to=20't'=20would=20enable=20the=20macOS=20= proxy=20icon=20has=20been=20replaced=20with=20a=0A=20separate=20= variable,=20'ns-use-proxy-icon'.=20=20'frame-title-format'=20will=20now=0A= diff=20--git=20a/lisp/cus-start.el=20b/lisp/cus-start.el=0Aindex=20= e4b6d8f2d6..1c497ee5ae=20100644=0A---=20a/lisp/cus-start.el=0A+++=20= b/lisp/cus-start.el=0A@@=20-424,16=20+424,23=20@@=20= minibuffer-prompt-properties--setter=0A=20=09=20=20=20=20=20;;=20msdos.c=0A= =20=09=20=20=20=20=20(dos-unsupported-char-glyph=20display=20integer)=0A=20= =09=20=20=20=20=20;;=20nsterm.m=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= ;;=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20FIXME:=20Why=20does=20= =E2=8C=83=20use=20nil=20instead=20of=20none?=20=20Also=20the=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20;;=20description=20is=20confusing;=20= setting=20it=20to=20nil=20disables=20=E2=8C=83=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20entirely.=0A=20=09=20=20=20=20=20= (ns-control-modifier=0A=20=09=20=20=20=20=20=20ns=0A-=09=20=20=20=20=20=20= (choice=20(const=20:tag=20"No=20modifier"=20nil)=0A+=09=20=20=20=20=20=20= (choice=20(const=20:tag=20"No=20modifier"=20none)=0A=20=09=09=20=20=20=20= =20=20(const=20control)=20(const=20meta)=0A=20=09=09=20=20=20=20=20=20= (const=20alt)=20(const=20hyper)=0A-=09=09=20=20=20=20=20=20(const=20= super))=20"23.1")=0A+=09=09=20=20=20=20=20=20(const=20super)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(plist=20= :key-type=20(choice=20(const=20:ordinary)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(const=20:function)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:mouse))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20:value-type=20(choice=20(const=20control)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20meta)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= alt)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(const=20hyper)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(const=20super)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:tag=20"No=20= modifier"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20none))))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20"23.1")=0A=20=09=20=20=20=20=20(ns-right-control-modifier=0A=20= =09=20=20=20=20=20=20ns=0A=20=09=20=20=20=20=20=20(choice=20(const=20= :tag=20"No=20modifier=20(work=20as=20control)"=20none)=0A@@=20-441,13=20= +448,35=20@@=20minibuffer-prompt-properties--setter=0A=20=09=09=09=20=20=20= =20=20left)=0A=20=09=09=20=20=20=20=20=20(const=20control)=20(const=20= meta)=0A=20=09=09=20=20=20=20=20=20(const=20alt)=20(const=20hyper)=0A-=09= =09=20=20=20=20=20=20(const=20super))=20"24.1")=0A+=09=09=20=20=20=20=20=20= (const=20super)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(plist=20:key-type=20(choice=20(const=20:ordinary)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= :function)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(const=20:mouse))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20:value-type=20(choice=20(const=20= control)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(const=20meta)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(const=20alt)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(const=20hyper)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20super)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (const=20:tag=20"No=20modifier"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20none))))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20"24.1")=0A=20=09=20=20=20=20=20= (ns-command-modifier=0A=20=09=20=20=20=20=20=20ns=0A=20=09=20=20=20=20=20= =20(choice=20(const=20:tag=20"No=20modifier=20(work=20as=20layout=20= switch)"=20none)=0A=20=09=09=20=20=20=20=20=20(const=20control)=20(const=20= meta)=0A=20=09=09=20=20=20=20=20=20(const=20alt)=20(const=20hyper)=0A-=09= =09=20=20=20=20=20=20(const=20super))=20"23.1")=0A+=09=09=20=20=20=20=20=20= (const=20super)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(plist=20:key-type=20(choice=20(const=20:ordinary)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= :function)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(const=20:mouse))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20:value-type=20(choice=20(const=20= control)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(const=20meta)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(const=20alt)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(const=20hyper)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20super)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (const=20:tag=20"No=20modifier"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20none))))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20"23.1")=0A=20=09=20=20=20=20=20= (ns-right-command-modifier=0A=20=09=20=20=20=20=20=20ns=0A=20=09=20=20=20= =20=20=20(choice=20(const=20:tag=20"No=20modifier=20(work=20as=20layout=20= switch)"=20none)=0A@@=20-455,13=20+484,35=20@@=20= minibuffer-prompt-properties--setter=0A=20=09=09=09=20=20=20=20=20left)=0A= =20=09=09=20=20=20=20=20=20(const=20control)=20(const=20meta)=0A=20=09=09= =20=20=20=20=20=20(const=20alt)=20(const=20hyper)=0A-=09=09=20=20=20=20=20= =20(const=20super))=20"24.1")=0A+=09=09=20=20=20=20=20=20(const=20super)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (plist=20:key-type=20(choice=20(const=20:ordinary)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:function)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= :mouse))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20:value-type=20(choice=20(const=20control)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= meta)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(const=20alt)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(const=20hyper)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(const=20super)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:tag=20= "No=20modifier"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20none))))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20"24.1")=0A=20=09=20=20=20=20=20(ns-alternate-modifier=0A= =20=09=20=20=20=20=20=20ns=0A=20=09=20=20=20=20=20=20(choice=20(const=20= :tag=20"No=20modifier=20(work=20as=20alternate/option)"=20none)=0A=20=09=09= =20=20=20=20=20=20(const=20control)=20(const=20meta)=0A=20=09=09=20=20=20= =20=20=20(const=20alt)=20(const=20hyper)=0A-=09=09=20=20=20=20=20=20= (const=20super))=20"23.1")=0A+=09=09=20=20=20=20=20=20(const=20super)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (plist=20:key-type=20(choice=20(const=20:ordinary)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:function)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= :mouse))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20:value-type=20(choice=20(const=20control)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= meta)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(const=20alt)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(const=20hyper)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(const=20super)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:tag=20= "No=20modifier"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20none))))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20"23.1")=0A=20=09=20=20=20=20=20= (ns-right-alternate-modifier=0A=20=09=20=20=20=20=20=20ns=0A=20=09=20=20=20= =20=20=20(choice=20(const=20:tag=20"No=20modifier=20(work=20as=20= alternate/option)"=20none)=0A@@=20-469,13=20+520,35=20@@=20= minibuffer-prompt-properties--setter=0A=20=09=09=09=20=20=20=20=20left)=0A= =20=09=09=20=20=20=20=20=20(const=20control)=20(const=20meta)=0A=20=09=09= =20=20=20=20=20=20(const=20alt)=20(const=20hyper)=0A-=09=09=20=20=20=20=20= =20(const=20super))=20"23.3")=0A+=09=09=20=20=20=20=20=20(const=20super)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (plist=20:key-type=20(choice=20(const=20:ordinary)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:function)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= :mouse))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20:value-type=20(choice=20(const=20control)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= meta)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(const=20alt)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(const=20hyper)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(const=20super)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:tag=20= "No=20modifier"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20none))))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20"23.3")=0A=20=09=20=20=20=20=20(ns-function-modifier=0A= =20=09=20=20=20=20=20=20ns=0A=20=09=20=20=20=20=20=20(choice=20(const=20= :tag=20"No=20modifier=20(work=20as=20function)"=20none)=0A=20=09=09=20=20= =20=20=20=20(const=20control)=20(const=20meta)=0A=20=09=09=20=20=20=20=20= =20(const=20alt)=20(const=20hyper)=0A-=09=09=20=20=20=20=20=20(const=20= super))=20"23.1")=0A+=09=09=20=20=20=20=20=20(const=20super)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(plist=20= :key-type=20(choice=20(const=20:ordinary)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(const=20:function)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:mouse))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20:value-type=20(choice=20(const=20control)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20meta)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20= alt)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(const=20hyper)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(const=20super)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(const=20:tag=20"No=20= modifier"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20none))))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20"23.1")=0A=20=09=20=20=20=20=20(ns-antialias-text=20ns=20= boolean=20"23.1")=0A=20=09=20=20=20=20=20(ns-auto-hide-menu-bar=20ns=20= boolean=20"24.1")=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (ns-confirm-quit=20ns=20boolean=20"25.1")=0Adiff=20--git=20= a/src/nsterm.m=20b/src/nsterm.m=0Aindex=20e1d745e332..52a9830be8=20= 100644=0A---=20a/src/nsterm.m=0A+++=20b/src/nsterm.m=0A@@=20-354,6=20= +354,19=20@@=20-=20(NSColor=20*)colorUsingDefaultColorSpace=0A=20#define=20= NSLeftAlternateKeyMask=20=20(0x000020=20|=20NSEventModifierFlagOption)=0A= =20#define=20NSRightAlternateKeyMask=20(0x000040=20|=20= NSEventModifierFlagOption)=0A=20=0A+/*=20MODIFIER=20if=20a=20symbol;=20= otherwise=20its=20property=20KIND,=20if=20a=20symbol.=20=20*/=0A+static=20= Lisp_Object=0A+mod_of_kind=20(Lisp_Object=20modifier,=20Lisp_Object=20= kind)=0A+{=0A+=20=20if=20(SYMBOLP=20(modifier))=0A+=20=20=20=20return=20= modifier;=0A+=20=20else=0A+=20=20=20=20{=0A+=20=20=20=20=20=20= Lisp_Object=20val=20=3D=20Fplist_get=20(modifier,=20kind);=0A+=20=20=20=20= =20=20return=20SYMBOLP=20(val)=20?=20val=20:=20Qnil;=0A+=20=20=20=20}=0A= +}=0A+=0A=20static=20unsigned=20int=0A=20ev_modifiers_helper=20(unsigned=20= int=20flags,=20unsigned=20int=20left_mask,=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20unsigned=20int=20right_mask,=20= unsigned=20int=20either_mask,=0A@@=20-380,30=20+393,35=20@@=20-=20= (NSColor=20*)colorUsingDefaultColorSpace=0A=20=20=20return=20modifiers;=0A= =20}=0A=20=0A-#define=20EV_MODIFIERS2(flags)=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A+#define=20EV_MODIFIERS2(flags,=20kind)=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20(((flags=20&=20= NSEventModifierFlagHelp)=20?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= hyper_modifier=20:=200)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20|=20((flags=20&=20= NSEventModifierFlagShift)=20?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20= shift_modifier=20:=200)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A-=20=20=20|=20((flags=20&=20NS_FUNCTION_KEY_MASK)=20?=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20parse_solitary_modifier=20= (ns_function_modifier)=20:=200)=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A+=20=20=20|=20((flags=20&=20NS_FUNCTION_KEY_MASK)=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20=20=20?=20parse_solitary_modifier=20= (mod_of_kind=20(ns_function_modifier,=20=20=20=20=20\=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20kind))=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A+=20=20=20=20=20=20:=200)=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20=20=20=20|=20ev_modifiers_helper=20= (flags,=20NSLeftControlKeyMask,=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20NSRightControlKeyMask,=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= NSEventModifierFlagControl,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20\=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20ns_control_modifier,=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_right_control_modifier)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20mod_of_kind=20(ns_control_modifier,=20kind),=20=20=20= =20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20mod_of_kind=20(ns_right_control_modifier,=20=20=20=20=20= =20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20kind))=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20|=20ev_modifiers_helper=20(flags,=20NSLeftCommandKeyMask,=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= NSRightCommandKeyMask,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20NSEventModifierFlagCommand,=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20ns_command_modifier,=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20ns_right_command_modifier)=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20mod_of_kind=20(ns_command_modifier,=20= kind),=20=20=20=20=20=20\=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20mod_of_kind=20= (ns_right_command_modifier,=20=20=20=20=20=20=20\=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20kind))=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20|=20ev_modifiers_helper=20= (flags,=20NSLeftAlternateKeyMask,=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20NSRightAlternateKeyMask,=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20NSEventModifierFlagOption,=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ns_alternate_modifier,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20ns_right_alternate_modifier))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= mod_of_kind=20(ns_alternate_modifier,=20kind),=20=20=20=20\=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= mod_of_kind=20(ns_right_alternate_modifier,=20=20=20=20=20\=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20kind)))=0A=20=0A-#define=20EV_MODIFIERS(e)=20= EV_MODIFIERS2=20([e=20modifierFlags])=0A+#define=20EV_MODIFIERS(e)=20= EV_MODIFIERS2=20([e=20modifierFlags],=20QCmouse)=0A=20=0A=20#define=20= EV_UDMODIFIERS(e)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20= =20((([e=20type]=20=3D=3D=20NSEventTypeLeftMouseDown)=20?=20= down_modifier=20:=200)=20=20=20=20=20=20=20\=0A@@=20-2599,6=20+2617,18=20= @@=20so=20some=20key=20presses=20(TAB)=20are=20swallowed=20by=20the=20= system.=20=20*/=0A=20}=0A=20=0A=20#ifdef=20NS_IMPL_COCOA=0A+static=20= Lisp_Object=0A+right_mod=20(Lisp_Object=20left,=20Lisp_Object=20right)=0A= +{=0A+=20=20return=20EQ=20(right,=20Qleft)=20?=20left=20:=20right;=0A+}=0A= +=0A+static=20bool=0A+nil_or_none=20(Lisp_Object=20val)=0A+{=0A+=20=20= return=20NILP=20(val)=20||=20EQ=20(val,=20Qnone);=0A+}=0A+=0A=20static=20= UniChar=0A=20ns_get_shifted_character=20(NSEvent=20*event)=0A=20/*=20= Look=20up=20the=20character=20corresponding=20to=20the=20key=20pressed=20= on=20the=0A@@=20-2630,25=20+2660,25=20@@=20so=20some=20key=20presses=20= (TAB)=20are=20swallowed=20by=20the=20system.=20=20*/=0A=20=20=20NSTRACE=20= ("ns_get_shifted_character");=0A=20=0A=20=20=20if=20((flags=20&=20= NSRightAlternateKeyMask)=20=3D=3D=20NSRightAlternateKeyMask=0A-=20=20=20=20= =20=20&&=20(EQ=20(ns_right_alternate_modifier,=20Qnone)=0A-=20=20=20=20=20= =20=20=20=20=20||=20(EQ=20(ns_right_alternate_modifier,=20Qleft)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20&&=20EQ=20(ns_alternate_modifier,=20= Qnone))))=0A+=20=20=20=20=20=20&&=20nil_or_none=20(mod_of_kind=20= (right_mod=20(ns_alternate_modifier,=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20ns_right_alternate_modifier),=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20QCordinary)))=0A=20=20=20=20=20modifiers=20|=3D=20= rightOptionKey;=0A=20=0A=20=20=20if=20((flags=20&=20= NSLeftAlternateKeyMask)=20=3D=3D=20NSLeftAlternateKeyMask=0A-=20=20=20=20= =20=20&&=20EQ=20(ns_alternate_modifier,=20Qnone))=0A+=20=20=20=20=20=20= &&=20nil_or_none=20(mod_of_kind=20(ns_alternate_modifier,=20= QCordinary)))=0A=20=20=20=20=20modifiers=20|=3D=20optionKey;=0A=20=0A=20=20= =20if=20((flags=20&=20NSRightCommandKeyMask)=20=3D=3D=20= NSRightCommandKeyMask=0A-=20=20=20=20=20=20&&=20(EQ=20= (ns_right_command_modifier,=20Qnone)=0A-=20=20=20=20=20=20=20=20=20=20||=20= (EQ=20(ns_right_command_modifier,=20Qleft)=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20&&=20EQ=20(ns_command_modifier,=20Qnone))))=0A+=20=20=20=20= =20=20&&=20nil_or_none=20(mod_of_kind=20(right_mod=20= (ns_command_modifier,=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20ns_right_command_modifier),=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20QCordinary)))=0A=20=20=20=20=20/*=20Carbon=20doesn't=20differentiate=20= between=20left=20and=20right=20command=0A=20=20=20=20=20=20=20=20keys.=20= =20*/=0A=20=20=20=20=20modifiers=20|=3D=20cmdKey;=0A=20=0A=20=20=20if=20= ((flags=20&=20NSLeftCommandKeyMask)=20=3D=3D=20NSLeftCommandKeyMask=0A-=20= =20=20=20=20=20&&=20EQ=20(ns_command_modifier,=20Qnone))=0A+=20=20=20=20=20= =20&&=20nil_or_none=20(mod_of_kind=20(ns_command_modifier,=20= QCordinary)))=0A=20=20=20=20=20modifiers=20|=3D=20cmdKey;=0A=20=0A=20=20=20= result=20=3D=20UCKeyTranslate=20(layout,=20[event=20keyCode],=20= kUCKeyActionDown,=0A@@=20-6287,7=20+6317,8=20@@=20In=20that=20case=20we=20= use=20UCKeyTranslate=20(ns_get_shifted_character)=0A=20=20=20=20=20=20=20= =20=20=20modifier=20keys,=20which=20returns=200=20for=20shift-like=20= modifiers.=0A=20=20=20=20=20=20=20=20=20=20Therefore=20its=20return=20= value=20is=20the=20set=20of=20control-like=0A=20=20=20=20=20=20=20=20=20=20= modifiers.=20=20*/=0A-=20=20=20=20=20=20emacs_event->modifiers=20=3D=20= EV_MODIFIERS2=20(flags);=0A+=20=20=20=20=20=20Lisp_Object=20kind=20=3D=20= fnKeysym=20?=20QCfunction=20:=20QCordinary;=0A+=20=20=20=20=20=20= emacs_event->modifiers=20=3D=20EV_MODIFIERS2=20(flags,=20kind);=0A=20=0A=20= =20=20=20=20=20=20/*=20Function=20keys=20(such=20as=20the=20F-keys,=20= arrow=20keys,=20etc.)=20set=0A=20=20=20=20=20=20=20=20=20=20modifiers=20= as=20though=20the=20fn=20key=20has=20been=20pressed=20when=20it=0A@@=20= -6296,7=20+6327,9=20@@=20In=20that=20case=20we=20use=20UCKeyTranslate=20= (ns_get_shifted_character)=0A=20=20=20=20=20=20=20=20=20=20).=20=20= We=20need=20to=20unset=20the=20fn=20modifier=20in=20these=20cases.=0A=20=20= =20=20=20=20=20=20=20=20FIXME:=20Can=20we=20avoid=20setting=20it=20in=20= the=20first=20place?=20=20*/=0A=20=20=20=20=20=20=20if=20(fnKeysym=20&&=20= (flags=20&=20NS_FUNCTION_KEY_MASK))=0A-=20=20=20=20=20=20=20=20= emacs_event->modifiers=20^=3D=20parse_solitary_modifier=20= (ns_function_modifier);=0A+=20=20=20=20=20=20=20=20= emacs_event->modifiers=0A+=20=20=20=20=20=20=20=20=20=20^=3D=20= parse_solitary_modifier=20(mod_of_kind=20(ns_function_modifier,=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= QCfunction));=0A=20=0A=20=20=20=20=20=20=20if=20(NS_KEYLOG)=0A=20=20=20=20= =20=20=20=20=20fprintf=20(stderr,=20"keyDown:=20code=20=3D%x\tfnKey=20= =3D%x\tflags=20=3D=20%x\tmods=20=3D=20%x\n",=0A@@=20-9399,57=20+9432,75=20= @@=20Convert=20an=20X=20font=20name=20(XLFD)=20to=20an=20NS=20font=20= name.=0A=20=0A=20=20=20DEFVAR_LISP=20("ns-alternate-modifier",=20= ns_alternate_modifier,=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "This=20variable=20describes=20the=20behavior=20of=20the=20alternate=20= or=20option=20key.\n\=0A-Set=20to=20the=20symbol=20control,=20meta,=20= alt,=20super,=20or=20hyper=20means=20it=20is=20taken=20to=20be\n\=0A= -that=20key.\n\=0A-Set=20to=20none=20means=20that=20the=20alternate=20/=20= option=20key=20is=20not=20interpreted=20by=20Emacs\n\=0A-at=20all,=20= allowing=20it=20to=20be=20used=20at=20a=20lower=20level=20for=20accented=20= character=20entry.");=0A+Either=20SYMBOL,=20describing=20the=20behaviour=20= for=20any=20event,\n\=0A+or=20(:ordinary=20SYMBOL=20:function=20SYMBOL=20= :mouse=20SYMBOL),=20describing=20behaviour\n\=0A+separately=20for=20= ordinary=20keys,=20function=20keys,=20and=20mouse=20events.\n\=0A+\n\=0A= +Each=20SYMBOL=20is=20`control',=20`meta',=20`alt',=20`super',=20`hyper'=20= or=20`none'.\n\=0A+If=20`none',=20the=20key=20is=20ignored=20by=20Emacs=20= and=20retains=20its=20standard=20meaning.");=0A=20=20=20= ns_alternate_modifier=20=3D=20Qmeta;=0A=20=0A=20=20=20DEFVAR_LISP=20= ("ns-right-alternate-modifier",=20ns_right_alternate_modifier,=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20"This=20variable=20describes=20= the=20behavior=20of=20the=20right=20alternate=20or=20option=20key.\n\=0A= -Set=20to=20the=20symbol=20control,=20meta,=20alt,=20super,=20or=20hyper=20= means=20it=20is=20taken=20to=20be\n\=0A-that=20key.\n\=0A-Set=20to=20= left=20means=20be=20the=20same=20key=20as=20`ns-alternate-modifier'.\n\=0A= -Set=20to=20none=20means=20that=20the=20alternate=20/=20option=20key=20= is=20not=20interpreted=20by=20Emacs\n\=0A-at=20all,=20allowing=20it=20to=20= be=20used=20at=20a=20lower=20level=20for=20accented=20character=20= entry.");=0A+Either=20SYMBOL,=20describing=20the=20behaviour=20for=20any=20= event,\n\=0A+or=20(:ordinary=20SYMBOL=20:function=20SYMBOL=20:mouse=20= SYMBOL),=20describing=20behaviour\n\=0A+separately=20for=20ordinary=20= keys,=20function=20keys,=20and=20mouse=20events.\n\=0A+It=20can=20also=20= be=20`left'=20to=20use=20the=20value=20of=20`ns-alternate-modifier'=20= instead.\n\=0A+\n\=0A+Each=20SYMBOL=20is=20`control',=20`meta',=20`alt',=20= `super',=20`hyper'=20or=20`none'.\n\=0A+If=20`none',=20the=20key=20is=20= ignored=20by=20Emacs=20and=20retains=20its=20standard=20meaning.");=0A=20= =20=20ns_right_alternate_modifier=20=3D=20Qleft;=0A=20=0A=20=20=20= DEFVAR_LISP=20("ns-command-modifier",=20ns_command_modifier,=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20"This=20variable=20describes=20the=20= behavior=20of=20the=20command=20key.\n\=0A-Set=20to=20the=20symbol=20= control,=20meta,=20alt,=20super,=20or=20hyper=20means=20it=20is=20taken=20= to=20be\n\=0A-that=20key.");=0A+Either=20SYMBOL,=20describing=20the=20= behaviour=20for=20any=20event,\n\=0A+or=20(:ordinary=20SYMBOL=20= :function=20SYMBOL=20:mouse=20SYMBOL),=20describing=20behaviour\n\=0A= +separately=20for=20ordinary=20keys,=20function=20keys,=20and=20mouse=20= events.\n\=0A+\n\=0A+Each=20SYMBOL=20is=20`control',=20`meta',=20`alt',=20= `super',=20`hyper'=20or=20`none'.\n\=0A+If=20`none',=20the=20key=20is=20= ignored=20by=20Emacs=20and=20retains=20its=20standard=20meaning.");=0A=20= =20=20ns_command_modifier=20=3D=20Qsuper;=0A=20=0A=20=20=20DEFVAR_LISP=20= ("ns-right-command-modifier",=20ns_right_command_modifier,=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20"This=20variable=20describes=20the=20= behavior=20of=20the=20right=20command=20key.\n\=0A-Set=20to=20the=20= symbol=20control,=20meta,=20alt,=20super,=20or=20hyper=20means=20it=20is=20= taken=20to=20be\n\=0A-that=20key.\n\=0A-Set=20to=20left=20means=20be=20= the=20same=20key=20as=20`ns-command-modifier'.\n\=0A-Set=20to=20none=20= means=20that=20the=20command=20/=20option=20key=20is=20not=20interpreted=20= by=20Emacs\n\=0A-at=20all,=20allowing=20it=20to=20be=20used=20at=20a=20= lower=20level=20for=20accented=20character=20entry.");=0A+Either=20= SYMBOL,=20describing=20the=20behaviour=20for=20any=20event,\n\=0A+or=20= (:ordinary=20SYMBOL=20:function=20SYMBOL=20:mouse=20SYMBOL),=20= describing=20behaviour\n\=0A+separately=20for=20ordinary=20keys,=20= function=20keys,=20and=20mouse=20events.\n\=0A+It=20can=20also=20be=20= `left'=20to=20use=20the=20value=20of=20`ns-command-modifier'=20= instead.\n\=0A+\n\=0A+Each=20SYMBOL=20is=20`control',=20`meta',=20`alt',=20= `super',=20`hyper'=20or=20`none'.\n\=0A+If=20`none',=20the=20key=20is=20= ignored=20by=20Emacs=20and=20retains=20its=20standard=20meaning.");=0A=20= =20=20ns_right_command_modifier=20=3D=20Qleft;=0A=20=0A=20=20=20= DEFVAR_LISP=20("ns-control-modifier",=20ns_control_modifier,=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20"This=20variable=20describes=20the=20= behavior=20of=20the=20control=20key.\n\=0A-Set=20to=20the=20symbol=20= control,=20meta,=20alt,=20super,=20or=20hyper=20means=20it=20is=20taken=20= to=20be\n\=0A-that=20key.");=0A+Either=20SYMBOL,=20describing=20the=20= behaviour=20for=20any=20event,\n\=0A+or=20(:ordinary=20SYMBOL=20= :function=20SYMBOL=20:mouse=20SYMBOL),=20describing=20behaviour\n\=0A= +separately=20for=20ordinary=20keys,=20function=20keys,=20and=20mouse=20= events.\n\=0A+\n\=0A+Each=20SYMBOL=20is=20`control',=20`meta',=20`alt',=20= `super',=20`hyper'=20or=20`none'.\n\=0A+If=20`none',=20the=20key=20is=20= ignored=20by=20Emacs=20and=20retains=20its=20standard=20meaning.");=0A=20= =20=20ns_control_modifier=20=3D=20Qcontrol;=0A=20=0A=20=20=20DEFVAR_LISP=20= ("ns-right-control-modifier",=20ns_right_control_modifier,=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20"This=20variable=20describes=20the=20= behavior=20of=20the=20right=20control=20key.\n\=0A-Set=20to=20the=20= symbol=20control,=20meta,=20alt,=20super,=20or=20hyper=20means=20it=20is=20= taken=20to=20be\n\=0A-that=20key.\n\=0A-Set=20to=20left=20means=20be=20= the=20same=20key=20as=20`ns-control-modifier'.\n\=0A-Set=20to=20none=20= means=20that=20the=20control=20/=20option=20key=20is=20not=20interpreted=20= by=20Emacs\n\=0A-at=20all,=20allowing=20it=20to=20be=20used=20at=20a=20= lower=20level=20for=20accented=20character=20entry.");=0A+Either=20= SYMBOL,=20describing=20the=20behaviour=20for=20any=20event,\n\=0A+or=20= (:ordinary=20SYMBOL=20:function=20SYMBOL=20:mouse=20SYMBOL),=20= describing=20behaviour\n\=0A+separately=20for=20ordinary=20keys,=20= function=20keys,=20and=20mouse=20events.\n\=0A+It=20can=20also=20be=20= `left'=20to=20use=20the=20value=20of=20`ns-control-modifier'=20= instead.\n\=0A+\n\=0A+Each=20SYMBOL=20is=20`control',=20`meta',=20`alt',=20= `super',=20`hyper'=20or=20`none'.\n\=0A+If=20`none',=20the=20key=20is=20= ignored=20by=20Emacs=20and=20retains=20its=20standard=20meaning.");=0A=20= =20=20ns_right_control_modifier=20=3D=20Qleft;=0A=20=0A=20=20=20= DEFVAR_LISP=20("ns-function-modifier",=20ns_function_modifier,=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20"This=20variable=20describes=20the=20= behavior=20of=20the=20function=20key=20(on=20laptops).\n\=0A-Set=20to=20= the=20symbol=20control,=20meta,=20alt,=20super,=20or=20hyper=20means=20= it=20is=20taken=20to=20be\n\=0A-that=20key.\n\=0A-Set=20to=20none=20= means=20that=20the=20function=20key=20is=20not=20interpreted=20by=20= Emacs=20at=20all,\n\=0A-allowing=20it=20to=20be=20used=20at=20a=20lower=20= level=20for=20accented=20character=20entry.");=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20"This=20variable=20describes=20the=20behavior=20of=20= the=20function=20(fn)=20key.\n\=0A+Either=20SYMBOL,=20describing=20the=20= behaviour=20for=20any=20event,\n\=0A+or=20(:ordinary=20SYMBOL=20= :function=20SYMBOL=20:mouse=20SYMBOL),=20describing=20behaviour\n\=0A= +separately=20for=20ordinary=20keys,=20function=20keys,=20and=20mouse=20= events.\n\=0A+\n\=0A+Each=20SYMBOL=20is=20`control',=20`meta',=20`alt',=20= `super',=20`hyper'=20or=20`none'.\n\=0A+If=20`none',=20the=20key=20is=20= ignored=20by=20Emacs=20and=20retains=20its=20standard=20meaning.");=0A=20= =20=20ns_function_modifier=20=3D=20Qnone;=0A=20=0A=20=20=20DEFVAR_LISP=20= ("ns-antialias-text",=20ns_antialias_text,=0A@@=20-9529,6=20+9580,9=20@@=20= Nil=20means=20use=20fullscreen=20the=20old=20(<=2010.7)=20way.=20=20The=20= old=20way=20works=20better=20with=0A=20=0A=20=20=20DEFSYM=20(Qcocoa,=20= "cocoa");=0A=20=20=20DEFSYM=20(Qgnustep,=20"gnustep");=0A+=20=20DEFSYM=20= (QCordinary,=20":ordinary");=0A+=20=20DEFSYM=20(QCfunction,=20= ":function");=0A+=20=20DEFSYM=20(QCmouse,=20":mouse");=0A=20=0A=20#ifdef=20= NS_IMPL_COCOA=0A=20=20=20Fprovide=20(Qcocoa,=20Qnil);=0A--=20=0A2.21.0=20= (Apple=20Git-122.2)=0A=0A= --Apple-Mail=_B99C4720-7396-41CE-B779-E4E7890D816A-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 15:33:37 2019 Received: (at 38296) by debbugs.gnu.org; 26 Nov 2019 20:33:37 +0000 Received: from localhost ([127.0.0.1]:53043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZhWj-0003qR-4O for submit@debbugs.gnu.org; Tue, 26 Nov 2019 15:33:37 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:37176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZhWg-0003qD-Ji for 38296@debbugs.gnu.org; Tue, 26 Nov 2019 15:33:35 -0500 Received: by mail-wm1-f53.google.com with SMTP id f129so4903534wmf.2 for <38296@debbugs.gnu.org>; Tue, 26 Nov 2019 12:33:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vHTnhQRBwKrTIwx8cy4g6cmcwTOPxTXQG4ZYa3YlXMU=; b=tPtW4fi38nexUJam3aaETKJQERUZCGNJ4kaYX4UYLO+u2xo0NdHZKLFtoRyb3nhH2G hPugi4c9r+SxfGM5ptw+af8ME7lokjdmmUGlmX6JdpMTOSLpKkUYbwAi6Qa6zyy1tIWL uUokJJQm90sPnm89BtwS9fBSHEIIs6Yn8RVeYPo1IseN0ZizYwvRmrkO7RONkplEcPPK M8vFvk75m5PyF5Ewf6uETQybF5P7m2NWTOZN6Q7GAlkPheCvdH4FJyqG+eJkyaOq+0ED ljjnMMPLjgg6GW7NX7dkLiVO71SOo2wS/VYYtIpYQMN7Xu2+NEuCXoxOQBD6zKUBjGP9 54iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=vHTnhQRBwKrTIwx8cy4g6cmcwTOPxTXQG4ZYa3YlXMU=; b=eGh8yuGDACMsdNY7g2XoGl+uJ16AiftpRKu/fTYcZpSR70e0/z8XIDaWM5Vyl9GOeQ Fx1KU0yLqV/CjTcl+/Ubx4DwUC/+gbbzPJsSLbfdziXVyERwkqBALSkm99lHHX6yMY+n qdPzX/P3f6b9CTmJ5aazOAL53ZI68aMtiQ6f7m6TSVbMcdZpi3TNDgEvTsqghCCM6wFG 6hL1H10ujbtRhFj8Kiv5OrVrIFWctqnDYS4avVVpaH/tuHK/aT4yyMZZeJ8SeNgdsoo6 RTo9uQ/z8kpa2uETHtsEMs3OqIOH98Xlp81hvNVLFZ0uvQsc0OrP3sbzu9aAphxmc3Ja G+bA== X-Gm-Message-State: APjAAAWb+gbvyBJ9qaAX3/YGsHF+FmiiaykTsYjhuJe3jQ0bylHH0Uat emDn7qlZAnwJW/znA450jMI= X-Google-Smtp-Source: APXvYqxgu/mvYU2HzLkYhAGJEJABt07ja+4a2HgZDFRRaJYqR5RN6sxWesEhDK7d92WRq5sOIV9lAQ== X-Received: by 2002:a7b:c5d2:: with SMTP id n18mr807802wmk.37.1574800408247; Tue, 26 Nov 2019 12:33:28 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-d485-68d2-2174-d65b.holly.idiocy.org. [2001:8b0:3f8:8129:d485:68d2:2174:d65b]) by smtp.gmail.com with ESMTPSA id o1sm1261405wrn.84.2019.11.26.12.33.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Nov 2019 12:33:27 -0800 (PST) Date: Tue, 26 Nov 2019 20:33:24 +0000 From: Alan Third To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events Message-ID: <20191126203324.GA7891@breton.holly.idiocy.org> References: <20191121211207.GA96045@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38296 Cc: 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Mon, Nov 25, 2019 at 08:15:31PM +0100, Mattias Engdegård wrote: > 21 nov. 2019 kl. 22.12 skrev Alan Third : > > > Do you think this functionality will only be required for the > > alt/option key or will there be a demand to add it for command too? In > > my experience the characters available via command are rather more > > obscure, but I’ve little experience with non‐UK keyboards. > > Looking at Mitsuharu Yamamoto's Mac port made me change my mind: it > solves the problem by allowing the variables to have values on the > form (:ordinary SYMBOL :function SYMBOL :mouse SYMBOL), defining > each modifier key separately for ordinary keys, function keys and > mouse events. I had wondered about doing something like this, but not as flexible. Is this the exact interface used by the Mac port? I’m not keen on the word ‘ordinary’, but there’s no use in us doing something different. > This is more flexible, and turned out to be rather simple to > implement, so I think this is better than adding variables. I did it > for all ns-KEY-modifier and ns-right-KEY-modifier variables (KEY > being control, command, alternate and function), since it seemed > silly not to. The relevant macOS-specific documentation was improved > as well. Thanks, it looks good to me. I’ve got a few nitpicks re. the documentation: +The modifiers themselves can be customised; I think that should be a colon at the end, not a semi‐colon, although my grasp of semi‐colon use is tenuous at best. +The value of each variable is either a symbol, describing the key for +any purpose, or a list on the form ^ of +@key{Option} key in macOS is normally used for composing additional I would remove the word ‘normally’. I think it’s redundant since we’re already talking about ‘standard behaviour’. Unless anyone else has objections I don’t see any reason not to push this. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 16:36:40 2019 Received: (at 38296) by debbugs.gnu.org; 26 Nov 2019 21:36:40 +0000 Received: from localhost ([127.0.0.1]:53101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZiVk-0005d7-Ed for submit@debbugs.gnu.org; Tue, 26 Nov 2019 16:36:40 -0500 Received: from mail178c50.megamailservers.eu ([91.136.10.188]:50350 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZiVh-0005cx-Ge for 38296@debbugs.gnu.org; Tue, 26 Nov 2019 16:36:38 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574804195; bh=EUdv7YZvZmxYohCMUsnVLDH40+2to/cKA6EkeLAaFok=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=TW1z67reXrvxCLzmJnTffK8NUbTlI8HYhZ7ZUGe2FqFdLUB8KDIXORmRcf8EznWJT qK4BPEUEgp7nvWQlEKxMigZ4XLyqQYLYADfj7as6TAdG9UT22EhuavrpHu5rZipLBV bp8PcTpUmsFAoFafMYlgxE+FEl2GD+OB8pOsuJas= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-3d4ce655.032-75-73746f71.bbcust.telenor.se [85.230.76.61]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xAQLaXSw021160; Tue, 26 Nov 2019 21:36:34 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <20191126203324.GA7891@breton.holly.idiocy.org> Date: Tue, 26 Nov 2019 22:36:32 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <576F8E92-AC86-4CBA-9F59-99071A55F775@acm.org> References: <20191121211207.GA96045@breton.holly.idiocy.org> <20191126203324.GA7891@breton.holly.idiocy.org> To: Alan Third X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0214.5DDD9AE3.0022, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=c6bVvi1l c=1 sm=1 tr=0 a=2CSmQ8xxRPzqj0RSDwU2Pw==:117 a=2CSmQ8xxRPzqj0RSDwU2Pw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=hIj89exaAAAA:8 a=tj_05d-W_oVTqGAcMA8A:9 a=QEXdDO2ut3YA:10 a=lS9wXHQM5UdnNJ4u63Ry:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 38296 Cc: 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 26 nov. 2019 kl. 21.33 skrev Alan Third : > I had wondered about doing something like this, but not as flexible. > Is this the exact interface used by the Mac port? I=E2=80=99m not keen = on the > word =E2=80=98ordinary=E2=80=99, but there=E2=80=99s no use in us = doing something different. Yes, it's the exact interface, except that the Mac port also allows an = optional :button property for emulating multi-button mice. I didn't = bother including that, but nothing prevents adding it later on. > Thanks, it looks good to me. I=E2=80=99ve got a few nitpicks re. the > documentation: Those are always welcome! > +The modifiers themselves can be customised; >=20 > I think that should be a colon at the end, not a semi=E2=80=90colon, = although > my grasp of semi=E2=80=90colon use is tenuous at best. A @pxref command immediately follows, so the entire sentence would come = out as The modifiers themselves can be customised; see Mac / GNUstep = Customization. Wouldn't the semicolon be more appropriate there? It does not really = precede an elaboration, just another main clause. I'm no native English speaker, though. > +The value of each variable is either a symbol, describing the key for > +any purpose, or a list on the form > ^ > of I'm torn here. What about 'having' instead? > +@key{Option} key in macOS is normally used for composing additional >=20 > I would remove the word =E2=80=98normally=E2=80=99. I think it=E2=80=99s= redundant since we=E2=80=99re > already talking about =E2=80=98standard behaviour=E2=80=99. Yes, but the phrase is then conditional on the symbol actually being = 'none'. Perhaps replacing 'normally' with 'then' would do? > Unless anyone else has objections I don=E2=80=99t see any reason not = to push > this. Thank you very much for the review! From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 17:03:18 2019 Received: (at 38296) by debbugs.gnu.org; 26 Nov 2019 22:03:18 +0000 Received: from localhost ([127.0.0.1]:53120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZivW-0006Jj-AS for submit@debbugs.gnu.org; Tue, 26 Nov 2019 17:03:18 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:38848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZivU-0006JU-VK for 38296@debbugs.gnu.org; Tue, 26 Nov 2019 17:03:17 -0500 Received: by mail-wr1-f54.google.com with SMTP id i12so24386994wro.5 for <38296@debbugs.gnu.org>; Tue, 26 Nov 2019 14:03:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=/TcHhL7Bs24tMK3r+aNwrMc6cB+6f7zWOwljcE+jV/E=; b=Wp0uyg1oW+jBHHsHEDn61BA35Sfim8fp20mtKGRXX71t3+lhty/ikCQX9xbHjN2uKB FDkfwZzFL+gveqR2UuOqebIzp17AU6cTBigU8vcu0lv/QZM78daflloriIxyol5wFY80 VcrAauUk4vwEJD7IrqvbrJPU6Y+yS5dT95UaSFs6LtW2ApmeKgmFctptPTHjrrLMcTud +f9G/8J0bWY6vmYNB/vKZpeoda/asknr4YAA26+cIeJBPnlXFIZYNdQuQzl3IOAsJOIY E30sgPxtMOloGXbMtzVKraM+a1XMFixS/Hr/ndF27KJjcLDRp5xPmPAX5JOpAPOQBIJI okHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=/TcHhL7Bs24tMK3r+aNwrMc6cB+6f7zWOwljcE+jV/E=; b=ShSe/nzvtRCfb6812P28SwbzVNwgs3nnw4ZhgP+t2XLZkrrl01Dk7JLsW0RGXcrqtR ilcEZ9GVBLkEi+GP9VvWVPeDq5jtCkQl0rit/gElK++C+uMZXQUj5sP1WJR8WNk0R0Up 3fBan0IdRkx/8pn6bQtMobFu2fqNidzLfhacw74pefHo3Vz0fKQtJLdw4u57Wzz2pY7G bj3wuqcJsi4+1YVv8NhmpCHdoeeh8LHPQz5b8LG/CJGnHQQGVxCaRCkW8eL0pQ6w38w8 OdrM5nqtqXZmuKwvf7DM7zlKf6PM/pNxS3r2YtdfgC9c/sRfvVGsWKpvAeRYuqvdPgtp jvOg== X-Gm-Message-State: APjAAAVaDbFa7wlXXJ3E5nFob6thvdh2iK9tTX66FJGC8g84+CYoBHsM OCAJOrKxmILvaAKP6bcmkOw= X-Google-Smtp-Source: APXvYqwywoQk6ITtwjn53u6gSexFZba169SxF2i3bKxz8z8W6B3PPlro5VNRVgjZkho21E9FBpe69w== X-Received: by 2002:adf:f34c:: with SMTP id e12mr24322416wrp.184.1574805790399; Tue, 26 Nov 2019 14:03:10 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-d485-68d2-2174-d65b.holly.idiocy.org. [2001:8b0:3f8:8129:d485:68d2:2174:d65b]) by smtp.gmail.com with ESMTPSA id n9sm2168120wrt.93.2019.11.26.14.03.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Nov 2019 14:03:09 -0800 (PST) Date: Tue, 26 Nov 2019 22:03:07 +0000 From: Alan Third To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events Message-ID: <20191126220307.GA16725@breton.holly.idiocy.org> References: <20191121211207.GA96045@breton.holly.idiocy.org> <20191126203324.GA7891@breton.holly.idiocy.org> <576F8E92-AC86-4CBA-9F59-99071A55F775@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <576F8E92-AC86-4CBA-9F59-99071A55F775@acm.org> User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38296 Cc: 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Tue, Nov 26, 2019 at 10:36:32PM +0100, Mattias Engdegård wrote: > 26 nov. 2019 kl. 21.33 skrev Alan Third : > > > I had wondered about doing something like this, but not as flexible. > > Is this the exact interface used by the Mac port? I’m not keen on the > > word ‘ordinary’, but there’s no use in us doing something different. > > Yes, it's the exact interface, except that the Mac port also allows > an optional :button property for emulating multi-button mice. I > didn't bother including that, but nothing prevents adding it later > on. I’m happy with that then. > > +The modifiers themselves can be customised; > > > > I think that should be a colon at the end, not a semi‐colon, although > > my grasp of semi‐colon use is tenuous at best. > > A @pxref command immediately follows, so the entire sentence would come out as > > The modifiers themselves can be customised; see Mac / GNUstep Customization. > > Wouldn't the semicolon be more appropriate there? It does not really precede an elaboration, just another main clause. > I'm no native English speaker, though. I’m always suspicious of semi-colons because there are two types of English speakers: those who don’t know how they’re used and therefore don’t use them, and those who don’t know how they’re used and therefore use them everywhere. ;) I’ve had a quick look through the Emacs documentation and I found at least one other example of using the semi‐colon like this, so I’m happy leaving it. > > +The value of each variable is either a symbol, describing the key for > > +any purpose, or a list on the form > > ^ > > of > > I'm torn here. What about 'having' instead? Having works, but the phrase is ‘of the form’. https://en.wikipedia.org/wiki/Of_the_form I actually just assumed it was a typo. :) > > +@key{Option} key in macOS is normally used for composing additional > > > > I would remove the word ‘normally’. I think it’s redundant since we’re > > already talking about ‘standard behaviour’. > > Yes, but the phrase is then conditional on the symbol actually being 'none'. > Perhaps replacing 'normally' with 'then' would do? Yes, sounds good. Oh, and thank you for actually documenting this. It was on my todo list for the Emacs 27 release. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 23:51:32 2019 Received: (at 38296) by debbugs.gnu.org; 27 Nov 2019 04:51:32 +0000 Received: from localhost ([127.0.0.1]:53298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZpIa-0003r8-07 for submit@debbugs.gnu.org; Tue, 26 Nov 2019 23:51:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZpIY-0003qw-5s for 38296@debbugs.gnu.org; Tue, 26 Nov 2019 23:51:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iZpIS-0003Sb-7Y; Tue, 26 Nov 2019 23:51:24 -0500 Received: from [176.228.60.248] (port=1521 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iZpIR-0002pu-J8; Tue, 26 Nov 2019 23:51:24 -0500 Date: Wed, 27 Nov 2019 06:51:31 +0200 Message-Id: <83r21trkfg.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <576F8E92-AC86-4CBA-9F59-99071A55F775@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Tue, 26 Nov 2019 22:36:32 +0100) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events References: <20191121211207.GA96045@breton.holly.idiocy.org> <20191126203324.GA7891@breton.holly.idiocy.org> <576F8E92-AC86-4CBA-9F59-99071A55F775@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38296 Cc: alan@idiocy.org, 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Tue, 26 Nov 2019 22:36:32 +0100 > Cc: 38296@debbugs.gnu.org > > The modifiers themselves can be customised; see Mac / GNUstep Customization. Btw, "customised" is not the US English spelling; please fix before pushing. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 01:40:58 2019 Received: (at 38296) by debbugs.gnu.org; 27 Nov 2019 06:40:58 +0000 Received: from localhost ([127.0.0.1]:53351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZr0T-0006u7-VG for submit@debbugs.gnu.org; Wed, 27 Nov 2019 01:40:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZr0R-0006tt-Rk for 38296@debbugs.gnu.org; Wed, 27 Nov 2019 01:40:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iZr0M-00062e-Kt; Wed, 27 Nov 2019 01:40:50 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1iZr0L-0007X9-7S; Wed, 27 Nov 2019 01:40:49 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Mattias =?iso-8859-1?Q?Engdeg=C3=A5rd?= In-Reply-To: (message from Mattias =?iso-8859-1?Q?Engdeg=C3=A5rd?= on Mon, 25 Nov 2019 20:15:31 +0100) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events References: <20191121211207.GA96045@breton.holly.idiocy.org> Message-Id: Date: Wed, 27 Nov 2019 01:40:49 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38296 Cc: alan@idiocy.org, 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Looking at Mitsuharu Yamamoto's Mac port made me change my mind: it solves the problem by allowing the variables to have values on the form (:ordinary SYMBOL :function SYMBOL :mouse SYMBOL), defining each modifier key separately for ordinary keys, function keys and mouse events. I'd like to understand what that feature does, but I can't tell from that text. Does it come with any documentation? If so, coulod you please show it? Also, are you proposing we implement this for ALL platforms (that would be clean and simple, in principle)? Or just SOME platforms? -- Dr Richard Stallman Founder, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 05:45:54 2019 Received: (at 38296) by debbugs.gnu.org; 27 Nov 2019 10:45:54 +0000 Received: from localhost ([127.0.0.1]:53479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZupW-00054N-5v for submit@debbugs.gnu.org; Wed, 27 Nov 2019 05:45:54 -0500 Received: from mail221c50.megamailservers.eu ([91.136.10.231]:46678 helo=mail33c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZupT-00054C-Sm for 38296@debbugs.gnu.org; Wed, 27 Nov 2019 05:45:53 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574851550; bh=F7JOsH/8ONn7mUrkxRrOXCgzzPpiq4epAXoM/uQ/zcs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=eBMjz0yxr+TaPwyZtjoda2mENCypJJd+cf2MNoq27FZPf5TM6HEGg624T0ZZGtxeM Y0hmEAzdYeg4QTq4mK1vuOS4o/NiOIpbG4jqhyWRSEDWo5ZsBxskHCJnzr91SZAm6C 32Dw/QYId0XxCpstTwAJKgSZE0crroQdhcfZ2eNM= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-3d4ce655.032-75-73746f71.bbcust.telenor.se [85.230.76.61]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xARAjlZb002927; Wed, 27 Nov 2019 10:45:49 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Wed, 27 Nov 2019 11:45:46 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <188C6BFE-0314-4EBD-BCFF-8D7E4E35F78A@acm.org> References: <20191121211207.GA96045@breton.holly.idiocy.org> To: Richard Stallman X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0210.5DDE53DE.0009, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=ccisUULM c=1 sm=1 tr=0 a=2CSmQ8xxRPzqj0RSDwU2Pw==:117 a=2CSmQ8xxRPzqj0RSDwU2Pw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=e6dF-QS_kUisb_Gfim8A:9 a=TTmfj8GasnOmnJUR:21 a=E988qKVXeHDMEihe:21 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 38296 Cc: alan@idiocy.org, 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 27 nov. 2019 kl. 07.40 skrev Richard Stallman : > I'd like to understand what that feature does, but I can't tell from > that text. Does it come with any documentation? If so, coulod you > please show it? This text is part of the documentation of the mac-KEY-modifier variables = in the Mac port: --- The property list form can include the `:button' property for button number mapping, which becomes active when the value of `mac-emulate-three-button-mouse' is nil. The `:button' property can be either a positive integer specifying the destination of the primary button only, or a list (VALUE-FOR-PRIMARY-BUTTON VALUE-FOR-MOUSE-2 VALUE-FOR-MOUSE-3 ...) of positive integers specifying the destinations of multiple buttons in order. Note that the secondary button and the button 3 (usually the wheel button) correspond to mouse-3 and mouse-2 respectively if the value of `mac-wheel-button-is-mouse-2' is non-nil (default), and mouse-2 and mouse-3 respectively otherwise. If a button is mapped to the same number as its source, then it behaves as if the button were not mapped so the `:mouse' property becomes in effect instead. --- > Also, are you proposing we implement this for ALL platforms (that > would be clean and simple, in principle)? Or just SOME platforms? The variables generalised by the patch are specific to the NS port. = Whether something like this would be useful for other platforms isn't = anything I have contemplated, but it is not inconceivable --- it would = make keys like AltGr free to use as modifiers for mouse gestures and = non-character keys. (Like the Option key on Macs, the AltGr key is used = for entering even plain ASCII characters such as $@[]{}|\ on many = keyboards, making those keys essential for almost any task.) From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 05:50:25 2019 Received: (at 38296-done) by debbugs.gnu.org; 27 Nov 2019 10:50:25 +0000 Received: from localhost ([127.0.0.1]:53486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZutt-0005CX-0E for submit@debbugs.gnu.org; Wed, 27 Nov 2019 05:50:25 -0500 Received: from mail155c50.megamailservers.eu ([91.136.10.165]:10335 helo=mail51c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZutr-0005CO-E4 for 38296-done@debbugs.gnu.org; Wed, 27 Nov 2019 05:50:24 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1574851821; bh=UoEhINQoxTjAnKGwvX4MksnV34MiACGmOTePJlI+6sA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=WA+7TTpDrFpvBuFA/ijIxzIgRYeH8KH7IzKOwE8Km1Leb72RiCQbS9Zs4kxbWEBJW V4wEosh5OOiR0hUxOWPRKDJ606PNpLl2598JUtHeYDqt9i/iyngA532Wy05fGM1FfL bFfQRaPQB7avRcmD9VOMRtPDJ+OuVqK6G3GfpefU= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-3d4ce655.032-75-73746f71.bbcust.telenor.se [85.230.76.61]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xARAoKL7029608; Wed, 27 Nov 2019 10:50:21 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <20191126220307.GA16725@breton.holly.idiocy.org> Date: Wed, 27 Nov 2019 11:50:19 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <3F6A749B-37F0-4216-B6E2-7757CEE20678@acm.org> References: <20191121211207.GA96045@breton.holly.idiocy.org> <20191126203324.GA7891@breton.holly.idiocy.org> <576F8E92-AC86-4CBA-9F59-99071A55F775@acm.org> <20191126220307.GA16725@breton.holly.idiocy.org> To: Alan Third , Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5DDE54ED.0043, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=LO0Yv6e9 c=1 sm=1 tr=0 a=2CSmQ8xxRPzqj0RSDwU2Pw==:117 a=2CSmQ8xxRPzqj0RSDwU2Pw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=hIj89exaAAAA:8 a=mDV3o1hIAAAA:8 a=EBNzZAA6fr9LtTpQR3QA:9 a=QEXdDO2ut3YA:10 a=lS9wXHQM5UdnNJ4u63Ry:22 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 38296-done Cc: 38296-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 26 nov. 2019 kl. 23.03 skrev Alan Third : > Having works, but the phrase is =E2=80=98of the form=E2=80=99. Right you are, 'of' it is then. 27 nov. 2019 kl. 05.51 skrev Eli Zaretskii : > Btw, "customised" is not the US English spelling; please fix before > pushing. Thank you, fixed. I'm not used to writing in that dialect. Pushed to master. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 23:17:11 2019 Received: (at 38296) by debbugs.gnu.org; 28 Nov 2019 04:17:11 +0000 Received: from localhost ([127.0.0.1]:56488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaBEs-00034l-SB for submit@debbugs.gnu.org; Wed, 27 Nov 2019 23:17:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaBEr-00034X-28 for 38296@debbugs.gnu.org; Wed, 27 Nov 2019 23:17:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iaBEl-0004a0-II; Wed, 27 Nov 2019 23:17:03 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1iaBEj-00020N-LP; Wed, 27 Nov 2019 23:17:02 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Mattias =?iso-8859-1?Q?Engdeg=C3=A5rd?= In-Reply-To: <188C6BFE-0314-4EBD-BCFF-8D7E4E35F78A@acm.org> (message from Mattias =?iso-8859-1?Q?Engdeg=C3=A5rd?= on Wed, 27 Nov 2019 11:45:46 +0100) Subject: Re: bug#38296: Allow Option key to be modifier for non-char key and mouse events References: <20191121211207.GA96045@breton.holly.idiocy.org> <188C6BFE-0314-4EBD-BCFF-8D7E4E35F78A@acm.org> Message-Id: Date: Wed, 27 Nov 2019 23:17:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: 38296 Cc: alan@idiocy.org, 38296@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] It sounds like this could be useful on all platforms -- so let's do it that way. Can people please work on extending it to all platforms, rather than to NS alone? I think it would be correct to change the variable names so that they don't say "mac-". -- Dr Richard Stallman Founder, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Thu Aug 14 20:52:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 Dec 2019 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator