comparison src/video/cocoa/SDL_cocoaevents.m @ 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 1282a042d530
children e42873b9c6f1
comparison
equal deleted inserted replaced
3127:da6cbfa5b5f2 3128:05d83835f41b
191 case NSKeyUp: 191 case NSKeyUp:
192 case NSFlagsChanged: 192 case NSFlagsChanged:
193 Cocoa_HandleKeyEvent(_this, event); 193 Cocoa_HandleKeyEvent(_this, event);
194 /* Fall through to pass event to NSApp; er, nevermind... */ 194 /* Fall through to pass event to NSApp; er, nevermind... */
195 /* FIXME: Find a way to stop the beeping, using delegate */ 195 /* FIXME: Find a way to stop the beeping, using delegate */
196
197 /* Add to support system-wide keyboard shortcuts like CMD+Space */
198 if ([event modifierFlags] & NSCommandKeyMask)
199 [NSApp sendEvent: event];
196 break; 200 break;
197 default: 201 default:
198 [NSApp sendEvent:event]; 202 [NSApp sendEvent:event];
199 break; 203 break;
200 } 204 }