aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2017-07-15 20:22:59 -0600
committerRuss Cox <rsc@swtch.com>2017-07-16 02:24:34 +0000
commit00b50225c203e06a4f23e1d2eb41e84116933e53 (patch)
tree909944ea6b33a8acdfcef230b5c5a1a8532f058f /src/cmd/devdraw
parent711336c348ac9b98cd22464496e6b7e9a109c3a9 (diff)
downloadplan9port-00b50225c203e06a4f23e1d2eb41e84116933e53.tar.gz
plan9port-00b50225c203e06a4f23e1d2eb41e84116933e53.tar.bz2
plan9port-00b50225c203e06a4f23e1d2eb41e84116933e53.zip
devdraw: fix Mac Kcmd+Shift
Change-Id: Ide32a9397701085b17fbd42f0866eb3de11e4190 Reviewed-on: https://plan9port-review.googlesource.com/2940 Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/cocoa-screen.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
index 7aebae21..6a3f70f0 100644
--- a/src/cmd/devdraw/cocoa-screen.m
+++ b/src/cmd/devdraw/cocoa-screen.m
@@ -30,6 +30,7 @@
// Use non-deprecated names.
#define NSKeyDown NSEventTypeKeyDown
+#define NSShiftKeyMask NSEventModifierFlagShift
#define NSAlternateKeyMask NSEventModifierFlagOption
#define NSCommandKeyMask NSEventModifierFlagCommand
#define NSResizableWindowMask NSWindowStyleMaskResizable
@@ -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;