From 71b5c8332a19da6aa4ee313e84ca43c20832e64a Mon Sep 17 00:00:00 2001 From: Max Katz Date: Thu, 14 Apr 2022 21:14:34 -0400 Subject: [PATCH] Merge pull request #7191 from ltetak/osx_handle_cmd_key_up OSX handle CMD+key up combinations in Avalonia --- native/Avalonia.Native/src/OSX/app.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/native/Avalonia.Native/src/OSX/app.mm b/native/Avalonia.Native/src/OSX/app.mm index 79175d9ff1d..05b129baca1 100644 --- a/native/Avalonia.Native/src/OSX/app.mm +++ b/native/Avalonia.Native/src/OSX/app.mm @@ -73,6 +73,11 @@ - (void)sendEvent:(NSEvent *)event _isHandlingSendEvent = true; @try { [super sendEvent: event]; + if ([event type] == NSEventTypeKeyUp && ([event modifierFlags] & NSEventModifierFlagCommand)) + { + [[self keyWindow] sendEvent:event]; + } + } @finally { _isHandlingSendEvent = oldHandling; }