Support system-wide keyboard shortcuts on Mac gsoc2009_IME
authorJiang Jiang
Mon, 25 May 2009 11:09:29 +0000
branchgsoc2009_IME
changeset 312805d83835f41b
parent 3127 da6cbfa5b5f2
child 3129 e42873b9c6f1
Support system-wide keyboard shortcuts on Mac
src/video/cocoa/SDL_cocoaevents.m
     1.1 --- a/src/video/cocoa/SDL_cocoaevents.m	Mon May 25 02:42:45 2009 +0000
     1.2 +++ b/src/video/cocoa/SDL_cocoaevents.m	Mon May 25 11:09:29 2009 +0000
     1.3 @@ -193,6 +193,10 @@
     1.4              Cocoa_HandleKeyEvent(_this, event);
     1.5              /* Fall through to pass event to NSApp; er, nevermind... */
     1.6              /* FIXME: Find a way to stop the beeping, using delegate */
     1.7 +
     1.8 +            /* Add to support system-wide keyboard shortcuts like CMD+Space */
     1.9 +            if ([event modifierFlags] & NSCommandKeyMask)
    1.10 +               [NSApp sendEvent: event];
    1.11              break;
    1.12          default:
    1.13              [NSApp sendEvent:event];