Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 76bc68d5bfe..0be26e594f1 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -939,12 +939,18 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
// get keyDown events delivered to the view because they are
// special hotkeys to switch between views, so override directly
- if([event type] == NSKeyDown &&
+ if ([event type] == NSKeyDown &&
[event keyCode] == kVK_Tab &&
([event modifierFlags] & NSControlKeyMask)) {
handleKeyEvent(event);
}
else {
+ // For some reason NSApp is swallowing the key up events when command
+ // key is pressed, even if there seems to be no apparent reason to do
+ // so, as a workaround we always handle these up events.
+ if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
+ handleKeyEvent(event);
+
[NSApp sendEvent:event];
}