changeset 3128:05d83835f41b gsoc2009_IME

Support system-wide keyboard shortcuts on Mac
author Jiang Jiang <gzjjgod@gmail.com>
date Mon, 25 May 2009 11:09:29 +0000
parents da6cbfa5b5f2
children e42873b9c6f1
files src/video/cocoa/SDL_cocoaevents.m
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoaevents.m	Mon May 25 02:42:45 2009 +0000
+++ b/src/video/cocoa/SDL_cocoaevents.m	Mon May 25 11:09:29 2009 +0000
@@ -193,6 +193,10 @@
             Cocoa_HandleKeyEvent(_this, event);
             /* Fall through to pass event to NSApp; er, nevermind... */
             /* FIXME: Find a way to stop the beeping, using delegate */
+
+            /* Add to support system-wide keyboard shortcuts like CMD+Space */
+            if ([event modifierFlags] & NSCommandKeyMask)
+               [NSApp sendEvent: event];
             break;
         default:
             [NSApp sendEvent:event];