changeset 111703:cb2bf4b8dd70

nsterm.m (keyDown): Compare Left key masks exactly (Bug#7458).
author Jan D. <jan.h.d@swipnet.se>
date Wed, 24 Nov 2010 15:52:14 +0100
parents 087bcfbfa5ef
children 31c8556ccad8
files src/ChangeLog src/nsterm.m
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Nov 24 12:56:50 2010 +0000
+++ b/src/ChangeLog	Wed Nov 24 15:52:14 2010 +0100
@@ -2,7 +2,8 @@
 
 	* nsterm.m (NSLeftControlKeyMask, NSLeftCommandKeyMask)
 	(NSLeftAlternateKeyMask): New defines.
-	(keyDown): Parse left and right keys separatly (Bug#7458).
+	(keyDown): Parse left and right keys separately (Bug#7458).
+	Compare Left key masks exactly (Bug#7458).
 
 2010-11-23  Eli Zaretskii  <eliz@gnu.org>
 
--- a/src/nsterm.m	Wed Nov 24 12:56:50 2010 +0000
+++ b/src/nsterm.m	Wed Nov 24 15:52:14 2010 +0100
@@ -4451,7 +4451,7 @@
            ? ns_command_modifier
            : ns_right_command_modifier);
 
-      if (flags & NSLeftCommandKeyMask)
+      if ((flags & NSLeftCommandKeyMask) == NSLeftCommandKeyMask)
         {
           emacs_event->modifiers |= parse_solitary_modifier
             (ns_command_modifier);
@@ -4494,7 +4494,7 @@
                ? ns_control_modifier
                : ns_right_control_modifier);
 
-      if (flags & NSLeftControlKeyMask)
+      if ((flags & NSLeftControlKeyMask) == NSLeftControlKeyMask)
         emacs_event->modifiers |= parse_solitary_modifier
           (ns_control_modifier);
 
@@ -4521,7 +4521,7 @@
                : ns_right_alternate_modifier);
         }
 
-      if (flags & NSLeftAlternateKeyMask) /* default = meta */
+      if ((flags & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask) /* default = meta */
         {
           if ((NILP (ns_alternate_modifier)
                || EQ (ns_alternate_modifier, Qnone))