From: Gerd Hoffmann <kraxel@redhat.com>
To: Dave Mielke <dave@mielke.cc>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/3] input: add support for kbd delays
Date: Mon, 02 Jun 2014 09:07:34 +0200 [thread overview]
Message-ID: <1401692854.22391.3.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <20140531160354.GI13640@beta.private.mielke.cc>
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
Hi,
> This approach doesn't work, although the problem is different. Input is now
> recognized, but unwanted key repeats creep in. For example, I typed "exit" and
> got "exiitt". I tested this several times while typing as accurately and
> quickly as I could.
>
> My theory is that the key releases aren't being detected by the application
> until the next key press/release delay, thus effectively leaving the keys
> pressed.
Sounds plausible. Then adding a delay after queuing the release events
should fix it. Can you try the attached patch (as incremental fix on
top of the other three patches)?
thanks,
Gerd
[-- Attachment #2: 0001-curses-add-kbd-delay-between-keydown-and-keyup-event.patch --]
[-- Type: text/x-patch, Size: 747 bytes --]
>From 29f48811c69c9e734ce22894e93852af9c9f9de6 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 2 Jun 2014 09:03:21 +0200
Subject: [PATCH] curses: add kbd delay between keydown and keyup events
[fixup]
---
ui/curses.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/curses.c b/ui/curses.c
index ff143cf..d8dea9f 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -304,6 +304,7 @@ static void curses_refresh(DisplayChangeListener *dcl)
if (keycode & SHIFT) {
qemu_input_event_send_key_number(NULL, SHIFT_CODE, false);
}
+ qemu_input_event_send_key_delay(100);
} else {
keysym = curses2qemu[chr];
if (keysym == -1)
--
1.8.3.1
next parent reply other threads:[~2014-06-02 7:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1401280016-20851-1-git-send-email-kraxel@redhat.com>
[not found] ` <20140531160354.GI13640@beta.private.mielke.cc>
2014-06-02 7:07 ` Gerd Hoffmann [this message]
2014-06-02 8:50 ` [Qemu-devel] [PATCH 0/3] input: add support for kbd delays Dave Mielke
2014-06-02 9:31 ` Gerd Hoffmann
2014-06-02 10:43 ` Dave Mielke
2014-06-02 9:00 ` Dave Mielke
2014-06-02 9:29 ` Gerd Hoffmann
2014-06-02 10:40 ` Dave Mielke
2014-06-02 11:28 ` 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=1401692854.22391.3.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=dave@mielke.cc \
--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).