aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gustavo@noronha.dev.br>2022-03-06 21:11:19 +0900
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-03-15 13:36:33 +0100
commit4797adce5f0b7542c5aa4a83bdce7f0e63d6deae (patch)
tree5e45ae3d28530cc56d29d974836f6a27a7a1245f /qapi
parentf844cdb997144a3fd83d7d18e32365fc6a1a8a1f (diff)
ui/cocoa: add option to swap Option and Command
On Mac OS X the Option key maps to Alt and Command to Super/Meta. This change swaps them around so that Alt is the key closer to the space bar and Meta/Super is between Control and Alt, like on non-Mac keyboards. It is a cocoa display option, disabled by default. Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gustavo Noronha Silva <gustavo@noronha.dev.br> Message-Id: <20210713213200.2547-3-gustavo@noronha.dev.br> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220306121119.45631-3-akihiko.odaki@gmail.com> Reviewed-by: Will Cohen <wwcohen@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/ui.json7
1 files changed, 6 insertions, 1 deletions
diff --git a/qapi/ui.json b/qapi/ui.json
index 1d60d5fc78..664da9e462 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -1275,12 +1275,17 @@
# a global grab on key events. (default: off)
# See https://support.apple.com/en-in/guide/mac-help/mh32356/mac
#
+# @swap-opt-cmd: Swap the Option and Command keys so that their key codes match
+# their position on non-Mac keyboards and you can use Meta/Super
+# and Alt where you expect them. (default: off)
+#
# Since: 7.0
##
{ 'struct': 'DisplayCocoa',
'data': {
'*left-command-key': 'bool',
- '*full-grab': 'bool'
+ '*full-grab': 'bool',
+ '*swap-opt-cmd': 'bool'
} }
##