From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUBFD-0000cY-8L for qemu-devel@nongnu.org; Mon, 22 Apr 2013 03:33:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUBFA-0004lf-MX for qemu-devel@nongnu.org; Mon, 22 Apr 2013 03:32:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUBFA-0004l4-Er for qemu-devel@nongnu.org; Mon, 22 Apr 2013 03:32:56 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3M7WsNA002518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 03:32:55 -0400 Date: Mon, 22 Apr 2013 15:32:52 +0800 From: Amos Kong Message-ID: <20130422073252.GC1938@t430s.nay.redhat.com> References: <1366346658-4680-1-git-send-email-akong@redhat.com> <5172BD04.2050504@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5172BD04.2050504@redhat.com> Subject: Re: [Qemu-devel] [PATCH] monitor: intervally send down events to guest in hold time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kraxel@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com On Sat, Apr 20, 2013 at 10:06:28AM -0600, Eric Blake wrote: > On 04/18/2013 10:44 PM, Amos Kong wrote: > > (qemu) sendkey a 1000 > > > > Current design is that qemu only send one down event to guest, > > and delay sometime, then send one up event. In this case, only > > key can be identified by guest. > > > > This patch changed qemu to intervally send down events to guest > > in the hold time, the interval is 100ms. > > I don't like this. > When you hold a key for a long time on bare metal, > there is only one down and one up event; Really? I do check events by 'showkey', the output of showkey is not the events sent from keyboard? # showkey -s (show keys' scancode) I can always see many down scancodes, and one up scancode. It's same when I disable / enable auto-repeat mode in system. In the real host / vnc guest/ sdl guest, hold one key, many down events can be checked by showkey. http://msdn.microsoft.com/en-us/library/windows/desktop/gg153546(v=vs.85).aspx """ If you hold down a key long enough to start the keyboard's repeat feature, the system sends multiple key-down messages, followed by a single key-up message. """ key-down messages == key-down events? > if the console displays > multiple copies of the character being typed, it is because the console > does the repeats itself. > If the user wants multiple down and up events, > they should send multiple events, not rely on one command to send > multiple presses. Amos.