| 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(-)
--- |
| 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; |