From d6b6dea77e1e27b4644e71e0b9cc6009d56198d0 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Fri, 18 Mar 2022 00:29:49 +0900 Subject: [PATCH] ui/cocoa: Respect left-command-key option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Akihiko Odaki Fixes: 4797adce5f ("ui/cocoa: add option to swap Option and Command") Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220317152949.68666-1-akihiko.odaki@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index cb6e7c41dc..c4e5468f9e 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -923,7 +923,8 @@ static CGEventRef handleTapEvent(CGEventTapProxy proxy, CGEventType type, CGEven /* Don't pass command key changes to guest unless mouse is grabbed */ case kVK_Command: if (isMouseGrabbed && - !!(modifiers & NSEventModifierFlagCommand)) { + !!(modifiers & NSEventModifierFlagCommand) && + left_command_key_enabled) { if (swap_opt_cmd) { [self toggleKey:Q_KEY_CODE_ALT]; } else {