Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Support system-wide keyboard shortcuts on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgod committed May 25, 2009
1 parent 1d7b4fd commit e9cb391
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video/cocoa/SDL_cocoaevents.m
Expand Up @@ -193,6 +193,10 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
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];
Expand Down

0 comments on commit e9cb391

Please sign in to comment.