[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 3/4] ui/cocoa: Respect left-command-key option
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 3/4] ui/cocoa: Respect left-command-key option |
Date: |
Tue, 29 Mar 2022 00:40:11 +0200 |
From: Akihiko Odaki <akihiko.odaki@gmail.com>
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Fixes: 4797adce5f ("ui/cocoa: add option to swap Option and Command")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220317152949.68666-1-akihiko.odaki@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
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 @@ - (bool) handleEventLocked:(NSEvent *)event
/* 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 {
--
2.35.1
- [PULL 0/4] Darwin patches for 2022-03-29, Philippe Mathieu-Daudé, 2022/03/28
- [PULL 1/4] gitattributes: Cover Objective-C source files, Philippe Mathieu-Daudé, 2022/03/28
- [PULL 2/4] qemu/main-loop: Disable block backend global state assertion on Cocoa, Philippe Mathieu-Daudé, 2022/03/28
- [PULL 3/4] ui/cocoa: Respect left-command-key option,
Philippe Mathieu-Daudé <=
- [PULL 4/4] ui/console: Check console before emitting GL event, Philippe Mathieu-Daudé, 2022/03/28
- Re: [PULL 0/4] Darwin patches for 2022-03-29, Philippe Mathieu-Daudé, 2022/03/29
- Re: [PULL 0/4] Darwin patches for 2022-03-29, Peter Maydell, 2022/03/29