tdevdraw: fix Mac Kcmd+Shift - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 00b50225c203e06a4f23e1d2eb41e84116933e53
parent 711336c348ac9b98cd22464496e6b7e9a109c3a9
Author: Russ Cox 
Date:   Sat, 15 Jul 2017 20:22:59 -0600

devdraw: fix Mac Kcmd+Shift

Change-Id: Ide32a9397701085b17fbd42f0866eb3de11e4190
Reviewed-on: https://plan9port-review.googlesource.com/2940
Reviewed-by: Russ Cox 

Diffstat:
  M src/cmd/devdraw/cocoa-screen.m      |       3 +++

1 file changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
t@@ -30,6 +30,7 @@
 
 // Use non-deprecated names.
 #define NSKeyDown NSEventTypeKeyDown
+#define NSShiftKeyMask NSEventModifierFlagShift
 #define NSAlternateKeyMask NSEventModifierFlagOption
 #define NSCommandKeyMask NSEventModifierFlagCommand
 #define NSResizableWindowMask NSWindowStyleMaskResizable
t@@ -903,6 +904,8 @@ getkeyboard(NSEvent *e)
                 interpretdeadkey(e);
 
                 if(m & NSCommandKeyMask){
+                        if((m & NSShiftKeyMask) && 'a' <= c && c <= 'z')
+                                c += 'A' - 'a';
                         if(' '<=c && c<='~')
                                 keystroke(Kcmd+c);
                         break;