From unknown Fri Aug 15 15:29:40 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#19977 <19977@debbugs.gnu.org> To: bug#19977 <19977@debbugs.gnu.org> Subject: Status: 24.4; Incorrect translation of Super modifier with Ctrl or Meta on OS X Reply-To: bug#19977 <19977@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:29:40 +0000 retitle 19977 24.4; Incorrect translation of Super modifier with Ctrl or Me= ta on OS X reassign 19977 emacs submitter 19977 Philipp Stephani
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Tue, 29 Mar 2016 10:17:42 +0000
>
>=C2=A0 After pressing M-s-a, I get the message:
>=C2=A0 M-s-=C3=A5 is undefined
>=C2=A0 Expected: M-s-a (being defined or undefined)
>
>=C2=A0 Tested running Emacs as a Carbon app on OS X:
>=C2=A0 open -W -n -a /Applications/Emacs.app --args -Q
>
>=C2=A0 After pressing C-s-a, I get the message:
>=C2=A0 <C-s-268632065> is undefined
>=C2=A0 Expected: C-s-a (being defined or undefined)
>
>=C2=A0 Seems to happen for all keys, not just a. For C-s-<letter>= , the
>=C2=A0 character produced is 0x1002ffa0 + <letter> instead of <= ;letter>; for
>=C2=A0 M-s-<letter> the character produced is whatever OS X maps = to
>=C2=A0 Option+<letter>. This happens only if Super is pressed as = well. More
>=C2=A0 discussion at
>=C2=A0 http://lists.gnu.or= g/archive/html/help-gnu-emacs/2015-02/msg00503.html.
>
> Unfortunately this is still happening with 25.0.92.1.
What is the evidence that this is an Emacs problem?
What do you get if you type s-a?
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Tue, 29 Mar 2016 15:45:13 +0000
> Cc: 19977@d= ebbugs.gnu.org
>
> Some more debugging output, using NS_KEYLOG =3D 1. The input sequence = is a, C-a, M-a, s-a, C-S-a, M-S-a,
> s-S-a, C-s-a, M-s-a. As you can see, 'code' is correct (A or a= ), except for the last two cases.
I guess someone who understand how keyboard input works on OS X will
have to look into this.
> From: Philipp Steph= ani <p.stepha= ni2@gmail.com>
> Date: Tue, 29 Mar 2016 15:45:13 +0000
> Cc: 19977@d= ebbugs.gnu.org
>
> Some more debugging output, using NS_KEYLOG =3D 1. The input sequence = is a, C-a, M-a, s-a, C-S-a, M-S-a,
> s-S-a, C-s-a, M-s-a. As you can see, 'code' is correct (A or a= ), except for the last two cases.
I guess someone who understand how keyboard input works on OS X will
have to look into this.
On 2016.3.29, at 19:57, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Philipp Stephani <p.stephani2@gmail.com>
>> Date: Tue, 29 Mar 2016 16:38:52 +0000
>> Cc: 199= 77@debbugs.gnu.org
>>
>> If I comment out the if block below the comment
>>
>> /* if super (default), take input manager's word so things lik= e
>> dvorak / qwerty layout work */
>>
>> in nsterm.m, everything works. Unless somebody can explain why tha= t if block exists at all (i.e. why
>> [theEvent characters] instead of [theEvent charactersIgnoringModif= iers] is used), then I'd suggest to
>> remove the block completely.
>>
>> Attached a patch to remove this code.
>
> Adrian, any comments?=C2=A0 It's your code from 7 years ago.
Heh, well of the top of my head=E2=80=A6 ;-)
Did you try testing Dvorak / Qwerty layout?=C2=A0 If not, that=E2=80=99s un= der System Preferences, Keyboard, add new, English, select Dvorak or Dvorak= / Qwerty.
>From what I remember, the issue had to do with cmd-key shortcuts when one o= f those layouts was in use.=C2=A0 I think users were expecting the letter r= eported for the cmd shortcut to either agree with or disagree with the dvor= ak layout.=C2=A0 Using [theEvent characters] caused it to use what they wer= e expecting.
It sounds like either this wasn=E2=80=99t the right solution, or user expec= tations vary.=C2=A0 In either case I would agree with simplifying the code = and removing the part you suggest.