From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUJYM-0006G0-Qj for qemu-devel@nongnu.org; Mon, 22 Apr 2013 12:25:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUJYL-0007zW-9u for qemu-devel@nongnu.org; Mon, 22 Apr 2013 12:25:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUJYL-0007zC-1M for qemu-devel@nongnu.org; Mon, 22 Apr 2013 12:25:17 -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 r3MGPFNn014226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 12:25:15 -0400 Message-ID: <51756468.2060400@redhat.com> Date: Mon, 22 Apr 2013 10:25:12 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366346658-4680-1-git-send-email-akong@redhat.com> <5172BD04.2050504@redhat.com> <20130422073252.GC1938@t430s.nay.redhat.com> In-Reply-To: <20130422073252.GC1938@t430s.nay.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2ESELPTLAADXUNIQSCJPN" 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: Amos Kong Cc: kraxel@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ESELPTLAADXUNIQSCJPN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/22/2013 01:32 AM, Amos Kong wrote: > 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. >=20 >> When you hold a key for a long time on bare metal, >> there is only one down and one up event; >=20 > Really? I do check events by 'showkey', the output of showkey is not th= e > events sent from keyboard? I didn't know that there is some bare metal hardware that sends more than one event. As long as you are matching bare metal behavior, then I will be happy; but I still wonder if hard-coding repeat rates instead of making it configurable is the best choice. >=20 > # 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. >=20 > In the real host / vnc guest/ sdl guest, hold one key, many down > events can be checked by showkey. Nice tool that I had not used before. Thanks for pointing it out to me. >=20 >=20 > http://msdn.microsoft.com/en-us/library/windows/desktop/gg153546(v=3Dvs= =2E85).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. """ >=20 > key-down messages =3D=3D key-down events? >=20 >> if the console displays >> multiple copies of the character being typed, it is because the consol= e >> does the repeats itself. >=20 >> If the user wants multiple down and up events, >> they should send multiple events, not rely on one command to send >> multiple presses. So now that I have more information, I'm okay with sending multiple down events and one up event for a long hold time (if we are emulating hardware that does the same), and still making the user call send-key multiple times if they want multiple up events. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2ESELPTLAADXUNIQSCJPN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRdWRoAAoJEKeha0olJ0NqaHUIAJr4SAgsMtmvdZ4DNBCNV1N8 fgoyA+wX8G35oJTcAV8JlOEeVYFUSK5WQI9vqc87r3oJy0wOxVLI+SH/Iyz2VED4 /H/pB18+Z5w18BFo/EboXb3ouUMB+BQeMmVSXdfmIGGFkSqvNy1RvrLrw8lK4Kvh utCdZEa12WOOhVZkPl1Z4SrmcH1NesBwrmDtMH5dlDpktcyT/LvIBh4lgzS2KFMM KG9YGqN6+GLtjoiIkTCguPnCmKh3or82YQBDmB7oDTh4AjDkzhu7L98bl2/7cpU+ oYy9OP6aF6iDEMwlxaVPoMvzROSGR4HdBlJrLG793XraK/HZASQgrhUxYtFU4Dg= =TDZP -----END PGP SIGNATURE----- ------enig2ESELPTLAADXUNIQSCJPN--