From b43335e2e95be4036812049f4bd23b461b2285ab Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 2 Jun 1999 19:28:33 +0000 Subject: [PATCH] Do key equivalents git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4339 72102866-910b-0410-8b05-ffd578937521 --- Source/NSApplication.m | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Source/NSApplication.m b/Source/NSApplication.m index e991f354f..eb9bb3191 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -544,7 +544,22 @@ NSApplication *NSApp = nil; case NSKeyDown: { NSDebugLog(@"send key down event\n"); - [[theEvent window] sendEvent: theEvent]; + if ([theEvent modifierFlags] & NSCommandKeyMask) + { + NSArray *window_list = [self windows]; + unsigned i; + unsigned count = [window_list count]; + + for (i = 0; i < count; i++) + { + NSWindow *window = [window_list objectAtIndex: i]; + + if ([window performKeyEquivalent: theEvent] == YES) + break; + } + } + else + [[theEvent window] sendEvent: theEvent]; break; }