[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] ui/cocoa: add option to swap Option and Command
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 2/2] ui/cocoa: add option to swap Option and Command |
Date: |
Mon, 07 Mar 2022 08:17:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
BALATON Zoltan <balaton@eik.bme.hu> writes:
> On Sun, 6 Mar 2022, Akihiko Odaki wrote:
>> From: Gustavo Noronha Silva <gustavo@noronha.dev.br>
>>
>> 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>
>> ---
>> qapi/ui.json | 8 ++++++-
>> qemu-options.hx | 3 ++-
>> ui/cocoa.m | 64 ++++++++++++++++++++++++++++++++++++++++++-------
>> 3 files changed, 65 insertions(+), 10 deletions(-)
>>
>> diff --git a/qapi/ui.json b/qapi/ui.json
>> index 1e9893419fe..b082e1a7dee 100644
>> --- a/qapi/ui.json
>> +++ b/qapi/ui.json
>> @@ -1270,10 +1270,16 @@
>> # a global grab on key events. (default: off)
>> # See https://support.apple.com/en-in/guide/mac-help/mh32356/mac
>> #
>> +# @swap-option-command: 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: 6.1
>> ##
>> { 'struct' : 'DisplayCocoa',
>> - 'data' : { '*full-grab' : 'bool' } }
>> + 'data' : { '*full-grab' : 'bool',
>> + '*swap-option-command' : 'bool' } }
>
> This option name is too long to type. Could we abbreviate it somehow?
We've largely avoided abbreviations in the QAPI schema, for better or
worse.
> Like swap-opt-cmd or swap-alt-meta?
We should stick to how the keys are generally called on this platform.
I can't say (I'm not using it).