From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrMLU-0002gb-55 for qemu-devel@nongnu.org; Mon, 02 Jun 2014 03:07:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrMLN-0006Bu-SS for qemu-devel@nongnu.org; Mon, 02 Jun 2014 03:07:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrMLN-0006Bo-J4 for qemu-devel@nongnu.org; Mon, 02 Jun 2014 03:07:41 -0400 Message-ID: <1401692854.22391.3.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Mon, 02 Jun 2014 09:07:34 +0200 In-Reply-To: <20140531160354.GI13640@beta.private.mielke.cc> References: <1401280016-20851-1-git-send-email-kraxel@redhat.com> <20140531160354.GI13640@beta.private.mielke.cc> Content-Type: multipart/mixed; boundary="=-sTyDOuFrSARUCp1evUBP" Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/3] input: add support for kbd delays List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dave Mielke Cc: qemu-devel@nongnu.org --=-sTyDOuFrSARUCp1evUBP Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 --=-sTyDOuFrSARUCp1evUBP Content-Disposition: attachment; filename*0=0001-curses-add-kbd-delay-between-keydown-and-keyup-event.pat; filename*1=ch Content-Type: text/x-patch; name="0001-curses-add-kbd-delay-between-keydown-and-keyup-event.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit >>From 29f48811c69c9e734ce22894e93852af9c9f9de6 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann 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 --=-sTyDOuFrSARUCp1evUBP--