src/macosx/native/sun/osxapp/NSApplicationAWT.m

Print this page

        

@@ -339,10 +339,14 @@
 - (void)sendEvent:(NSEvent *)event
 {
     if ([event type] == NSApplicationDefined && TS_EQUAL([event timestamp], dummyEventTimestamp)) {
         [seenDummyEventLock lockWhenCondition:NO];
         [seenDummyEventLock unlockWithCondition:YES];
+    } else if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask)) {
+        // Cocoa won't send us key up event when releasing a key while Cmd is down,
+        // so we have to do it ourselves.
+        [[self keyWindow] sendEvent:event];
     } else {
         [super sendEvent:event];
     }
 }