In OS X, cmd-q is used to quit application,
this patch adds that feature.
Change-Id: I898370f4e0c5d518603fc29f3c6e7e72a51d9485
case NSKeyDown:
{
Ecore_Event_Key *ev;
+ NSUInteger flags = [event modifierFlags];
+
+ if (flags & NSCommandKeyMask)
+ {
+ NSString *keychar = [event charactersIgnoringModifiers];
+ if ([keychar characterAtIndex:0] == 'q')
+ {
+ [NSApp performSelector:@selector(terminate:)
+ withObject:nil afterDelay:0.0];
+ return EINA_TRUE;
+ }
+ }
ev = _ecore_cocoa_event_key(event, NSKeyDown, time);
if (ev == NULL) return EINA_TRUE;