aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@gmail.com>2022-03-18 00:29:49 +0900
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-03-29 00:41:50 +0200
commitd6b6dea77e1e27b4644e71e0b9cc6009d56198d0 (patch)
tree882ee786aeb984b152b1242ec23646ac102a1d0f /ui
parent47281859f66bdab1974fb122cab2cbb4a1c9af7f (diff)
downloadqemu-d6b6dea77e1e27b4644e71e0b9cc6009d56198d0.zip
qemu-d6b6dea77e1e27b4644e71e0b9cc6009d56198d0.tar.gz
qemu-d6b6dea77e1e27b4644e71e0b9cc6009d56198d0.tar.bz2
ui/cocoa: Respect left-command-key option
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>
Diffstat (limited to 'ui')
-rw-r--r--ui/cocoa.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index cb6e7c4..c4e5468 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 {