diff options
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r-- | src/lib/ecore_cocoa/ecore_cocoa.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m b/src/lib/ecore_cocoa/ecore_cocoa.m index ee1188d6be..2cf1739e0c 100644 --- a/src/lib/ecore_cocoa/ecore_cocoa.m +++ b/src/lib/ecore_cocoa/ecore_cocoa.m | |||
@@ -202,6 +202,18 @@ _ecore_cocoa_feed_events(void *anEvent) | |||
202 | case NSKeyDown: | 202 | case NSKeyDown: |
203 | { | 203 | { |
204 | Ecore_Event_Key *ev; | 204 | Ecore_Event_Key *ev; |
205 | NSUInteger flags = [event modifierFlags]; | ||
206 | |||
207 | if (flags & NSCommandKeyMask) | ||
208 | { | ||
209 | NSString *keychar = [event charactersIgnoringModifiers]; | ||
210 | if ([keychar characterAtIndex:0] == 'q') | ||
211 | { | ||
212 | [NSApp performSelector:@selector(terminate:) | ||
213 | withObject:nil afterDelay:0.0]; | ||
214 | return EINA_TRUE; | ||
215 | } | ||
216 | } | ||
205 | 217 | ||
206 | ev = _ecore_cocoa_event_key(event, NSKeyDown, time); | 218 | ev = _ecore_cocoa_event_key(event, NSKeyDown, time); |
207 | if (ev == NULL) return EINA_TRUE; | 219 | if (ev == NULL) return EINA_TRUE; |