Skip to content

Commit

Permalink
don't forward physical keyboard events to emulated machine when prese…
Browse files Browse the repository at this point in the history
…nting another view controller
  • Loading branch information
zydeco committed Jun 6, 2016
1 parent b2194bf commit 4e268e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mini vMac/MNVMApplication.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ - (void)handleKeyUIEvent:(UIEvent *)event {
handleKeyboardEvents = NO;
}
});
if ([event isKindOfClass:keyboardEventClass] && handleKeyboardEvents) {
BOOL emulatorIsFrontmost = [AppDelegate sharedEmulator].running && [AppDelegate sharedInstance].window.rootViewController.presentedViewController == nil;
if ([event isKindOfClass:keyboardEventClass] && handleKeyboardEvents && emulatorIsFrontmost) {
[self handleKeyboardEvent:(UIPhysicalKeyboardEvent*)event];
}
}
Expand Down

0 comments on commit 4e268e1

Please sign in to comment.