From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwtdy-0006b9-HV for qemu-devel@nongnu.org; Tue, 17 Jun 2014 09:41:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwtdr-0000Wi-1m for qemu-devel@nongnu.org; Tue, 17 Jun 2014 09:41:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwtdq-0000Wb-OJ for qemu-devel@nongnu.org; Tue, 17 Jun 2014 09:41:38 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5HDfbiq015242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 17 Jun 2014 09:41:37 -0400 Date: Tue, 17 Jun 2014 10:41:23 -0300 From: Marcelo Tosatti Message-ID: <20140617134123.GA16748@amt.cnet> References: <20140616231509.GA24935@amt.cnet> <1402995735.1614.8.camel@nilsson.home.kraxel.org> <53A02C7B.2010901@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53A02C7B.2010901@redhat.com> Subject: Re: [Qemu-devel] [PATCH] add input-send-event command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Luiz Capitulino , Gerd Hoffmann , qemu-devel On Tue, Jun 17, 2014 at 05:54:35AM -0600, Eric Blake wrote: > On 06/17/2014 03:02 AM, Gerd Hoffmann wrote: > > On Mo, 2014-06-16 at 20:15 -0300, Marcelo Tosatti wrote: > >> Which allows specification of absolute/relative, > >> up/down and console parameters. > > > > Looks good overall, only minor nits. Will wait for acks from qmp guys > > before picking into input branch. > > > >> Suggested by Gerd Hoffman. > > > > Huh? Signed-off missing ... > > > >> +Press left mouse button. > >> + > >> +-> { "execute": "input-send-event", > >> + "arguments": { "console": 0, > >> + "events": [ { "type": "btn", > >> + "data" : { "down": true, "button": "Left" } }, > >> + { "type": "btn", > >> + "data" : { "down": false, "button": "Left" } } ] } } > >> +<- { "return": {} } > > > > Bad example. Down + up should go as separate commands (so you have a > > sync inbetween), otherwise it might happen that the guest doesn't see > > the button event at all. > > Would it be worth adding a command to the union of possible events that > adds a pause? As in: > > -> { "execute": "input-send-event", > "arguments": { "console": 0, > "events": [ > { "type": "btn", > "data" : { "down": true, "button": "Left" } }, > { "type": "pause", "data": { "duration": 10 } }, > { "type": "btn", > "data" : { "down": false, "button": "Left" } } ] } } > > that sticks a 10 ms delay between the other two events? Would rather have the user wait 10 ms in between QMP commands.