mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Do key equivalents
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4339 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
58512c20c4
commit
076f49846e
1 changed files with 16 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue