qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Xulei (Stone)" <stone.xulei@huawei.com>
Cc: "Wulizhen (Pss)" <pss.wulizhen@huawei.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kraxel@redhat.com" <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [Question]Ctrl_R or Alt_R Key Can Not Be Released through noVNC connection
Date: Tue, 29 Mar 2016 11:36:42 +0100	[thread overview]
Message-ID: <20160329103642.GG29697@redhat.com> (raw)
In-Reply-To: <8E78D212B8C25246BE4CE7EA0E645FE533B8C5@SZXEMI504-MBS.china.huawei.com>

On Tue, Mar 29, 2016 at 10:20:46AM +0000, Xulei (Stone) wrote:
> Is there anyone can give me some information? I would be very grateful.
> 
> I have met several times that the right ctrl key or right alt key is in a pressed status and 
> never released until I inject a sendkey qmp command.
> I use noVNC, a web-based vnc, as my vnc client. What confused me is that, noVNC client
> seems automatically convert the right ctrl/alt to the left ctrl/alt which means noVNC will
> not be possible to send right ctrl/alt key to Qemu vnc sever. What's more, I have never 
> pressed any ctrl or alt key. This may happen even as soon as I use vnc to connect my VM
> which is now in the login interface. So I'm not sure it is a Qemu bug or noVNC bug.

The VNC protocol doesn't handle modifier keys explicitly, so clients have to
do extra hacks to deal with it. The problem typically arises when the VNC
client sends a Ctrl-press event, then the user switches focus to another
application before releasing the Ctrl key. The VNC client thus never sends
a Ctrl-release event and so the server thinks the Ctrl key is forever pressed.
Clients have to hack around this by tracking the state of all modifier keys
and explicitly sending fake release events when loosing keyboard focus. So
in summary I would expect the problem to be in the noVNC client


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2016-03-29 10:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 10:20 [Qemu-devel] [Question]Ctrl_R or Alt_R Key Can Not Be Released through noVNC connection Xulei (Stone)
2016-03-29 10:36 ` Daniel P. Berrange [this message]
2016-03-30  1:44   ` Xulei (Stone)

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=20160329103642.GG29697@redhat.com \
    --to=berrange@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=kraxel@redhat.com \
    --cc=pss.wulizhen@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stone.xulei@huawei.com \
    /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).