all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mikhail Gusarov <dottedmag@dottedmag.net>
To: 21330@debbugs.gnu.org
Subject: bug#21330: [PATCH] Fix handling Command-Control-<letter> combination under OS X
Date: Sun, 23 Aug 2015 18:49:47 +0200	[thread overview]
Message-ID: <1440348587.1744498.363702897.1F50E889@webmail.messagingengine.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 32 bytes --]

Please find the patch attached.

[-- Attachment #2: 0001-Fix-handling-Command-Control-letter-combination-unde.patch --]
[-- Type: application/octet-stream, Size: 1936 bytes --]

From a9d54fbeccba6e467f310a34c63b631b1c7a90d2 Mon Sep 17 00:00:00 2001
From: Mikhail Gusarov <dottedmag@dottedmag.net>
Date: Sun, 23 Aug 2015 18:42:33 +0200
Subject: [PATCH] Fix handling Command-Control-<letter> combination under OS X

Do not use [theEvent characters] for getting key if Command is supplied,
this causes Command-Control-A and similar key combinations to be
interpreted as control characters (^A), which breaks key processing
later on. The code which produces wrong keycode claims to handle Dvorak,
but Dvorak keyboard is handled fine without it.
* src/nsterm.m (keyDown): Disable code consulting input manager, not needed.

Copyright-paperwork-exempt: yes
---
 src/nsterm.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 2806f31..79f97db 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5385,6 +5385,7 @@ not_in_argv (NSString *arg)
           emacs_event->modifiers |= parse_solitary_modifier
             (ns_command_modifier);
 
+#if 0
           /* if super (default), take input manager's word so things like
              dvorak / qwerty layout work */
           if (EQ (ns_command_modifier, Qsuper)
@@ -5395,7 +5396,6 @@ not_in_argv (NSString *arg)
                  a shift modifier, must convert ourselves */
               if (!(flags & NSShiftKeyMask))
                 code = [[theEvent characters] characterAtIndex: 0];
-#if 0
               /* this is ugly and also requires linking w/Carbon framework
                  (for LMGetKbdType) so for now leave this rare (?) case
                  undealt with.. in future look into CGEvent methods */
@@ -5413,8 +5413,8 @@ not_in_argv (NSString *arg)
                                  &dummy, 1, &dummy, &code);
                   code &= 0xFF;
                 }
-#endif
             }
+#endif
         }
 
       is_right_key = (flags & NSRightControlKeyMask) == NSRightControlKeyMask;
-- 
2.5.0


             reply	other threads:[~2015-08-23 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-23 16:49 Mikhail Gusarov [this message]
     [not found] ` <handler.21330.B.144034859519108.ack@debbugs.gnu.org>
2015-08-23 16:51   ` bug#21330: Acknowledgement ([PATCH] Fix handling Command-Control-<letter> combination under OS X) Mikhail Gusarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440348587.1744498.363702897.1F50E889@webmail.messagingengine.com \
    --to=dottedmag@dottedmag.net \
    --cc=21330@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.