From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#19977: 24.4; Incorrect translation of Super modifier with Ctrl or Meta on OS X Date: Tue, 29 Mar 2016 17:44:20 +0000 Message-ID: References: <83r3etwc9j.fsf@gnu.org> <83lh51w9z8.fsf@gnu.org> <83d1qdw7bt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11407f1eccdbde052f339442 X-Trace: ger.gmane.org 1459273557 24566 80.91.229.3 (29 Mar 2016 17:45:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2016 17:45:57 +0000 (UTC) Cc: 19977@debbugs.gnu.org To: Adrian Robert , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 29 19:45:47 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1akxi4-0000pV-7k for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 19:45:44 +0200 Original-Received: from localhost ([::1]:49010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akxi3-0002WJ-Cs for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 13:45:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akxhS-0001oo-7w for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 13:45:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akxhO-0007vQ-2h for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 13:45:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akxhO-0007vM-0c for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 13:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1akxhN-0006Wg-PJ for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 13:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Mar 2016 17:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19977 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19977-submit@debbugs.gnu.org id=B19977.145927347825039 (code B ref 19977); Tue, 29 Mar 2016 17:45:01 +0000 Original-Received: (at 19977) by debbugs.gnu.org; 29 Mar 2016 17:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:44071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akxgz-0006Vn-Jt for submit@debbugs.gnu.org; Tue, 29 Mar 2016 13:44:37 -0400 Original-Received: from mail-lf0-f48.google.com ([209.85.215.48]:34792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akxgx-0006Vb-KG for 19977@debbugs.gnu.org; Tue, 29 Mar 2016 13:44:36 -0400 Original-Received: by mail-lf0-f48.google.com with SMTP id c62so17927449lfc.1 for <19977@debbugs.gnu.org>; Tue, 29 Mar 2016 10:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=spBaEjpWYJIPupLYVrDtMVvqHgAlytqTQ1wXe6euMmo=; b=yeeE34Yp/PrcgLKNQXCsQUiUpXKfQC1S6aRaRbHdV/jGkCJjzAQPD6Z5XVxgDuH9qw bkBQcUECwICoyQQ0PWfssO5+DsRmMvUN/Zd9QL1jHzIW1VeyJuwit11uPL2n+D/BEd3T rXFPcDJ3QuMkbQuyF3JY7P66Paf67Z3SNCrEvJsuXEUZUcJnTD7I+KPAA+3a0FW94erk PYrrrzNXnNEQrcKF/76nuOErdDg7BM445zKKBv4UMjASeJGzcwkip1I88JJXhugtTUpA ZDowGy2gq0yRLWckVnUx4rJiHBcwr6V0Vy57Nb6GXPJlyWKRF+1uHDnMYkQ3mwm3lhhH zTaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=spBaEjpWYJIPupLYVrDtMVvqHgAlytqTQ1wXe6euMmo=; b=nA5xqDYE13rWhkCJgzduWdKWx8WpDR4vvFYgpy5K8NnIQ1oQlKxnvZkd0pAVQ5fNif jJvLrPntlB6vY78L/gWTB3iPP/aZeFSCHPsTsgA1mtHuVy0U0+Jpu2U+QgvzIM9nR3Yh Y+GNsY26TMDH9SwlHFz3NrO9GK7z1G3MauKmmfbyz9i8NaU6fFa+7Lc708XSkt5mE/Ea Q0lKgkUm150dgLbrF7yP0g2F8gCk0fOtbv1DXt0kS8/ItyjNsB8E5RorsWnfuCtLS+p/ 4tUOfESgOndjgT9SIegMjRg6CJliLndijXaVH//ow73E0FyoC/2hbXa5KnUMccaypWyq az7w== X-Gm-Message-State: AD7BkJKK/Pa8z8+CFhitcmYiA5A/afo+PMX2bLC6Hrq57x6oEdZ3d5L7N82WPZED4JjfOXSNCcCwyU2sI3kn5w== X-Received: by 10.25.18.211 with SMTP id 80mr1784243lfs.127.1459273469842; Tue, 29 Mar 2016 10:44:29 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115730 Archived-At: --001a11407f1eccdbde052f339442 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Adrian Robert schrieb am Di., 29. M=C3=A4rz 201= 6 um 19:19 Uhr: > > On 2016.3.29, at 19:57, Eli Zaretskii wrote: > > >> From: Philipp Stephani > >> 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 things like > >> dvorak / qwerty layout work */ > >> > >> in nsterm.m, everything works. Unless somebody can explain why that if > block exists at all (i.e. why > >> [theEvent characters] instead of [theEvent charactersIgnoringModifiers= ] > is used), then I'd suggest to > >> remove the block completely. > >> > >> Attached a patch to remove this code. > > > > Adrian, any comments? 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? 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. I think users were expecting the letter > reported for the cmd shortcut to either agree with or disagree with the > dvorak layout. Using [theEvent characters] caused it to use what they we= re > expecting. > > It sounds like either this wasn=E2=80=99t the right solution, or user exp= ectations > vary. In either case I would agree with simplifying the code and removin= g > 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, Emacs allows switching between shift-like and control-like behavior using the `ns-alternate-modifier' option. The same should be implemented for Command. However, the code for `ns-alternate-modifier' is also somewhat broken. If it's set to 'none, C-M- 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. --001a11407f1eccdbde052f339442 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Adrian= Robert <adrian.b.robert@gm= ail.com> schrieb am Di., 29. M=C3=A4rz 2016 um 19:19=C2=A0Uhr:

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.


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-lik= e character. For Option, Emacs allows switching between shift-like and cont= rol-like behavior using the `ns-alternate-modifier' option. The same sh= ould be implemented for Command.
However, the code for `ns-altern= ate-modifier' is also somewhat broken. 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 re= mains C-S-a, but M-S-a gets translated to M-A.
--001a11407f1eccdbde052f339442--