qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Rainer Müller" <raimue@codingfarm.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] input-linux: Delay grab toggle if keys are pressed
Date: Sun, 9 May 2021 13:43:38 +0200	[thread overview]
Message-ID: <2f01eb6a-7c69-e7a9-8340-b671b0b6c643@codingfarm.de> (raw)
In-Reply-To: <20210504091438.p7kk3heyowpduyzq@sirius.home.kraxel.org>

On 04/05/2021 11.14, Gerd Hoffmann wrote:
> On Sat, May 01, 2021 at 09:06:21PM +0200, Rainer Müller wrote:
>> When multiple keyboards are passed to the guest with input-linux, there
>> could still be keys pressed on the other keyboard when toggling grab.
>> Delay toggling grab on the other keyboard until all keys are released,
>> otherwise keys could be stuck on host without a key up event.
> 
> Hmm, if you have two keyboards plugged into your machine, why would you
> assign both to a virtual machine?  Instead of simply using one for the
> host and one for the guest?

Fair enough. I only noticed the possibility during testing. I plugged in
a second keyboard for development to avoid locking myself out and passed
only one. Then I became confident to pass them both, but mostly because
I already had them connected. I agree it does not seem like a typical
setup...

This was the only code path that did not check !il->keycount before
calling input_linux_toggle_grab(), so I added it here as well. Maybe it
would make sense to move the condition into the function?

Rainer


  reply	other threads:[~2021-05-09 11:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 19:06 [PATCH 0/2] input-linux: Allow to toggle grab from QMP Rainer Müller
2021-05-01 19:06 ` [PATCH 1/2] input-linux: Delay grab toggle if keys are pressed Rainer Müller
2021-05-04  9:14   ` Gerd Hoffmann
2021-05-09 11:43     ` Rainer Müller [this message]
2021-05-10  7:30       ` Gerd Hoffmann
2021-05-01 19:06 ` [PATCH 2/2] input-linux: Allow to toggle grab from QMP Rainer Müller
2021-05-04  9:17   ` Gerd Hoffmann

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=2f01eb6a-7c69-e7a9-8340-b671b0b6c643@codingfarm.de \
    --to=raimue@codingfarm.de \
    --cc=kraxel@redhat.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 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).