mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
cocoa: Prevent eating keyUp when switching to FS from macOS' FS
This commit is contained in:
parent
c7bcec1ff5
commit
e2fb2d1241
@ -16,11 +16,11 @@
|
|||||||
|
|
||||||
@implementation CocoaPandaApp
|
@implementation CocoaPandaApp
|
||||||
- (void) sendEvent: (NSEvent *) event {
|
- (void) sendEvent: (NSEvent *) event {
|
||||||
// This is a hack that allows us to receive cmd-key-up events correctly.
|
// This is a hack that allows us to receive cmd-key-up events correctly, as
|
||||||
// Also prevent it from eating the inserthelp key.
|
// well as key-up events during a full-screen transition.
|
||||||
if (([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
|
// Also prevent it from eating the insert/help key.
|
||||||
||([event type] == NSKeyDown && [event keyCode] == 0x72)) {
|
if ([event type] == NSKeyUp ||
|
||||||
|
([event type] == NSKeyDown && [event keyCode] == 0x72)) {
|
||||||
[[self keyWindow] sendEvent: event];
|
[[self keyWindow] sendEvent: event];
|
||||||
} else {
|
} else {
|
||||||
[super sendEvent: event];
|
[super sendEvent: event];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user