All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Ian McKellar <ianloic@google.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Improve Cocoa modifier key handling
Date: Mon, 29 May 2017 14:17:02 +0200	[thread overview]
Message-ID: <1496060222.5201.0.camel@redhat.com> (raw)
In-Reply-To: <20170526233816.47627-1-ianloic@google.com>

On Fri, 2017-05-26 at 16:38 -0700, Ian McKellar wrote:
> I had two problems with QEMU on macOS:
>  1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key
>     was pressed so I'd get 'aaaaaaaaa....'.
>  2) Using Sikuli to programatically send keys to the QEMU window text
>     like "foo_bar" would come out as "fooa-bar".
> 
> They looked similar and after much digging the problem turned out to
> be
> the same. When QEMU's ui/cocoa.m received an NSFlagsChanged NSEvent
> it
> looked at the keyCode to determine what modifier key changed. This
> usually works fine but sometimes the keyCode is 0 and the app should
> instead be looking at the modifierFlags bitmask. Key code 0 is the
> 'a'
> key.
> 
> I added code that handles keyCode == 0 differently. It checks the
> modifierFlags and if they differ from QEMU's idea of which modifier
> keys are currently pressed it toggles those changed keys.
> 
> This fixes my problems and seems work fine.

Added to ui queue.

thanks,
  Gerd

  reply	other threads:[~2017-05-29 12:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 23:38 [Qemu-devel] [PATCH] Improve Cocoa modifier key handling Ian McKellar
2017-05-29 12:17 ` Gerd Hoffmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-06-23 20:05 Programmingkid
2017-06-24 12:14 ` Peter Maydell
2017-06-24 12:37   ` G 3

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496060222.5201.0.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=ianloic@google.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.