qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] cocoa: keyboard quality of life
@ 2021-04-30 21:38 gustavo
  2021-04-30 21:38 ` [PATCH v2 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed gustavo
  2021-04-30 21:38 ` [PATCH v2 2/2] ui/cocoa: add option to swap Option and Command, enable by default gustavo
  0 siblings, 2 replies; 6+ messages in thread
From: gustavo @ 2021-04-30 21:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: 'Peter Maydell ', 'Markus Armbruster ',
	'Gerd Hoffmann '

From: Gustavo Noronha Silva <gustavo@noronha.eti.br>

v2 fixes QAPI issues pointed out by Markus and comes with his
Acked-By. 

I tried also applying Gerd's suggestion of flipping the flags
on modifiers, but turns out it is more intricate than that,
as we then also need to flip the keyCode that is used on the
switch, but we can only do that if we are handling a key event,
so things get hairy fairly quickly.

After looking at the resulting code I decided to leave the more
localized checks in place rather than going through with the
alternative.

This series adds two new options to the cocoa display:

 - full-grab causes it to use a global tap to steal system combos
   away from Mac OS X, so they can be handled by the VM

 - swap-option-command does what it says on the tin; while that is
   something you can do at the Mac OS X level or even supported by
   some keyboards, it is much more convenient to have qemu put
   Meta/Super and Alt where they belong if you are running a
   non-Mac VM

I propose to enable swap-option-command by default and leave full-grab
off because unfortunately it needs accessibility permissions for input
grabbing, so it requires more deliberate action by the user anyway.

Gustavo Noronha Silva (2):
  ui/cocoa: capture all keys and combos when mouse is grabbed
  ui/cocoa: add option to swap Option and Command, enable by default

 qapi/ui.json    |  22 ++++++++
 qemu-options.hx |   4 ++
 ui/cocoa.m      | 137 ++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 153 insertions(+), 10 deletions(-)

-- 
2.24.3 (Apple Git-128)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-04  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-30 21:38 [PATCH v2 0/2] cocoa: keyboard quality of life gustavo
2021-04-30 21:38 ` [PATCH v2 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed gustavo
2021-04-30 21:38 ` [PATCH v2 2/2] ui/cocoa: add option to swap Option and Command, enable by default gustavo
2021-05-01  9:39   ` BALATON Zoltan
2021-05-01 10:47     ` Gustavo Noronha Silva
2021-05-04  9:20       ` 'Gerd Hoffmann '

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).