mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2024-06-08 11:32:36 +00:00
don't forward physical keyboard events to emulated machine when presenting another view controller
This commit is contained in:
parent
b2194bfcc5
commit
4e268e144d
|
@ -110,7 +110,8 @@ static int8_t usb_to_adb_scancode[] = {
|
||||||
handleKeyboardEvents = NO;
|
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];
|
[self handleKeyboardEvent:(UIPhysicalKeyboardEvent*)event];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user