From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXW8r-00033L-8J for qemu-devel@nongnu.org; Fri, 26 Sep 2014 10:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXW8l-0000iz-Ai for qemu-devel@nongnu.org; Fri, 26 Sep 2014 10:05:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXW8l-0000hQ-3r for qemu-devel@nongnu.org; Fri, 26 Sep 2014 10:04:55 -0400 Message-ID: <5425727D.40108@redhat.com> Date: Fri, 26 Sep 2014 08:04:45 -0600 From: Eric Blake MIME-Version: 1.0 References: <1411726999-26513-1-git-send-email-akong@redhat.com> <1411727810.865.6.camel@nilsson.home.kraxel.org> <20140926105320.GA11893@air.nay.redhat.com> In-Reply-To: <20140926105320.GA11893@air.nay.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GTXheoaO2teAskVe1UjXeoatiKQ30HpxD" Subject: Re: [Qemu-devel] [PATCH v2] ui/input: fix event emitting of repeated combined keys List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong , Gerd Hoffmann Cc: qemu-devel@nongnu.org, aliguori@amazon.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GTXheoaO2teAskVe1UjXeoatiKQ30HpxD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/26/2014 04:53 AM, Amos Kong wrote: > On Fri, Sep 26, 2014 at 12:36:50PM +0200, Gerd Hoffmann wrote: >> On Fr, 2014-09-26 at 18:23 +0800, Amos Kong wrote: >>> Currently we emit press events of combined keys first, then emit >>> release events by reverse order. But it doesn't match with physical >>> keyboard if the keys contain continued & repeated keys. >>> >>> For example, (qemu) sendkey a-b-b >> >> Hmm, somehow I don't feel like building too much magic into this. >> If you want send Ctrl-somekey twice just use two sendkey commands ... >=20 >=20 > Before this patch, If 'sendkey r-o-o-t', only 'rot' can be inputted. sendkey with multiple keys is designed for shift modifiers, NOT for repeated keys. 'sendkey r-o-o-t' makes no sense; it is the equivalent of mashing down the 'r', 'o', and 't' keys at once. To send four separate key events, you need to do 'sendkey r; sendkey o; sendkey o; sendkey t'. (Or libvirt should learn some syntactic sugar so you could do 'sendkey r -- o -- o -- t' and sequence it automatically). I don't think this patch is worth the effort. >=20 > People want to panic windows by sending Ctrl-Scrool-Scrool s/Scrool/Scroll/ > http://msdn.microsoft.com/en-us/library/windows/hardware/ff545499(v=3Dv= s.85).aspx > But current events order doesn't work. >=20 > In physical keyboard. We can prese Ctrl first, then press & release > Scroll twice, then release Ctrl. It's very common behavior. >=20 Hmm. This almost argues that we need a way to send a press without a release, or a release without a press, rather than trying to make 'sendkey Ctrl-Scroll-Scroll' emulate double scroll pushes all while ctrl is still held down. But this example is MUCH more realistic than 'r-o-o-t', so maybe there is merit to your patch after all. > So this fix just reference the physical implement, if you want to > input same key twice, you have to release it before second pressing. > (here we ignore the auto-repeat feature) >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GTXheoaO2teAskVe1UjXeoatiKQ30HpxD 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUJXJ9AAoJEKeha0olJ0NqjdMH/jqDYBIBjrT1I0QNEgkHRbW3 QQ+xK0uc1IB+Vr4sCOuYRh6WF43RHPP5/yZViqVr6etnyLm8xxtncFe4Ic+omKD5 j0Sc4ilMqmYdYrLB42JUQXyl16jnvUCliuwFbA2H4kkpcC+bsUIUMqAzJWxrGof9 GJTgeXjRLPCrRU2fu0B9xXeCiTGFoXHtpNlRrJt17v10p0wVFgNhqJXnwGtXZxW1 2jFXhRwVgdzB6MmIChXUg3RHtnZ3SOPHJcs5EtjLoLboG5oDz5GxwV/nYJKt01hm Y98ZqAJpSdfEmV1sPIIJVcczVDw/dlRhF6XefkyHBV7F8rOyzOyc0n/iRLrLoYM= =npFU -----END PGP SIGNATURE----- --GTXheoaO2teAskVe1UjXeoatiKQ30HpxD--