From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani
=
On 2016.3.29, at 20:44, Philipp Stephani <p.stephani2@gmail.com> wrote:
>
>
> Adrian Robert <adrian.b.robert@gmail.com> schrieb am Di., 29. M=C3=A4rz= 2016 um 19:19 Uhr:
>
> 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: 19977@debbugs.gnu.org
> >>
> >> If I comment out the if block below the comment
> >>
> >> /* if super (default), take input manager's word so thing= s like
> >> dvorak / qwerty layout work */
> >>
> >> in nsterm.m, everything works. Unless somebody can explain wh= y that if block exists at all (i.e. why
> >> [theEvent characters] instead of [theEvent charactersIgnoring= Modifiers] 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.<= br> >
>
> 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 under 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 of those layouts was in use.=C2=A0 I think users were expecting the let= ter reported for the cmd shortcut to either agree with or disagree with the= dvorak layout.=C2=A0 Using [theEvent characters] caused it to use what the= y were expecting.
>
> It sounds like either this wasn=E2=80=99t the right solution, or user = expectations vary.=C2=A0 In either case I would agree with simplifying the = code and removing the part you suggest.
>
>
> Yes, I can see what the problem is, thanks for the pointer. Basically = in a couple of layouts (there are others, e.g. "Gujarati - QUERTY"= ;), Command acts as shift-like character, like Option and Shift, selecting = a different character, and not as a control-like character. For Option, Ema= cs allows switching between shift-like and control-like behavior using the = `ns-alternate-modifier' option. The same should be implemented for Comm= and.
> However, the code for `ns-alternate-modifier' is also somewhat bro= ken. If it's set to 'none, C-M-<letter> doesn't work any = more. This needs a bit more thought. What exactly is supposed to happen if = both a shift-like and a control-like modifier are pressed at the same time?= Emacs is inconsistent here: C-S-a remains C-S-a, but M-S-a gets translated= to M-A.
I would say the correct behavior is to combine the modifier and the =E2=80= =9Cshift=E2=80=9Ded result.=C2=A0 C-S-a should be C-A.=C2=A0 But my memory = is fuzzy as to whether nsterm should do this or it happens in emacs generic= code.=C2=A0 And if ns-alternate-modifier is =E2=80=98none=E2=80=99, then t= here is no such thing as C-M-letter, just C-letter, where the identify of = =E2=80=98letter' is determined by what comes from opt-<original-key&= gt;.