From: Peter Maydell <peter.maydell@linaro.org>
To: Liang Yan <lyan@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Anthony PERARD <anthony.perard@citrix.com>,
"open list:X86" <xen-devel@lists.xenproject.org>,
QEMU Developers <qemu-devel@nongnu.org>,
QEMU Trivial <qemu-trivial@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2] hw/display/xenfb: Simulate auto-repeat key events
Date: Thu, 2 Nov 2017 17:26:50 +0000 [thread overview]
Message-ID: <CAFEAcA8JDVKBE1pFssTwFTybT=Kamc+_ra8qRF-DGSpb7=7QZA@mail.gmail.com> (raw)
In-Reply-To: <20171102171846.21445-1-lyan@suse.com>
On 2 November 2017 at 17:18, Liang Yan <lyan@suse.com> wrote:
> New tigervnc changes the way to send long pressed key,
> from "down up down up ..." to "down down ... up", it only
> affects xen pv console mode. I send a patch to latest
> kernel side, but it may have a fix in qemu backend for
> back compatible becase guest VMs may use very old kernel.
> This patch inserts an up event after each regular key down
> event to simulate an auto-repeat key event for xen keyboard
> frontend driver.
>
> Signed-off-by: Liang Yan <lyan@suse.com>
> ---
> v2:
> - exclude extended key
> - change log comment
>
> hw/display/xenfb.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
> index 8e2547ac05..1bc5b41ab7 100644
> --- a/hw/display/xenfb.c
> +++ b/hw/display/xenfb.c
> @@ -292,6 +292,11 @@ static void xenfb_key_event(void *opaque, int scancode)
> }
> trace_xenfb_key_event(opaque, scancode2linux[scancode], down);
> xenfb_send_key(xenfb, down, scancode2linux[scancode]);
> +
> + /* insert an up event for regular down key event */
> + if (down && !xenfb->extended) {
> + xenfb_send_key(xenfb, 0, scancode2linux[scancode]);
> + }
> }
This doesn't look to me like the right place to fix this bug.
The xenfb key event handler is just one QEMU keyboard backend
(in a setup where there are many possible sources of keyboard
events: vnc, gtk, SDL, cocoa UI frontends; and many possible
sinks: xenfb's key handling, ps2 keyboard emulator, etc etc).
We need to be clear in our definition of generic QEMU key
events how key repeat is supposed to be handled, and then
every consumer and every producer needs to follow that.
In the specific case of the vnc UI frontend, we need to
also look at what the VNC protocol specifies for key repeat.
That then tells us whether the bug to be fixed is in QEMU,
or in a particular VNC client.
thanks
-- PMM
next prev parent reply other threads:[~2017-11-02 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 17:18 [Qemu-devel] [PATCH v2] hw/display/xenfb: Simulate auto-repeat key events Liang Yan
2017-11-02 17:26 ` Peter Maydell [this message]
2017-11-02 17:40 ` Daniel P. Berrange
2017-11-02 18:09 ` Liang Yan
2017-11-03 1:12 ` Liang Yan
2017-11-02 17:56 ` Liang Yan
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='CAFEAcA8JDVKBE1pFssTwFTybT=Kamc+_ra8qRF-DGSpb7=7QZA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=anthony.perard@citrix.com \
--cc=lyan@suse.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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).