From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXXFM-0003Xe-Ap for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:15:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXXFD-0005x4-T4 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:15:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXXFD-0005wN-MP for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:15:39 -0400 Date: Fri, 26 Sep 2014 12:15:17 -0300 From: Marcelo Tosatti Message-ID: <20140926151517.GA16088@amt.cnet> References: <1411726999-26513-1-git-send-email-akong@redhat.com> <1411727810.865.6.camel@nilsson.home.kraxel.org> <20140926105320.GA11893@air.nay.redhat.com> <1411730645.865.8.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1411730645.865.8.camel@nilsson.home.kraxel.org> 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: Gerd Hoffmann Cc: Amos Kong , qemu-devel@nongnu.org, aliguori@amazon.com, lcapitulino@redhat.com On Fri, Sep 26, 2014 at 01:24:05PM +0200, Gerd Hoffmann wrote: > On Fr, 2014-09-26 at 18:53 +0800, 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 ... > > > > > > Before this patch, If 'sendkey r-o-o-t', only 'rot' can be inputted. > > To type 'root' you should use > > sendkey r > sendkey o > sendkey o > sendkey t > > Multiple keys in sendkey is meant for multiple keys pressed at the same > time, i.e. ctrl-alt-del, not for sending key sequences and typing words. > > > People want to panic windows by sending Ctrl-Scrool-Scrool > > http://msdn.microsoft.com/en-us/library/windows/hardware/ff545499(v=vs.85).aspx > > But current events order doesn't work. > > sendkey Ctrl-Scroll > sendkey Ctrl-Scroll > > > In physical keyboard. We can prese Ctrl first, then press & release > > Scroll twice, then release Ctrl. It's very common behavior. > > In most cases it doesn't matter whenever you release the modifier key or > not. The windows panic hotkey might be the exception from the rule > though. > > > 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) > > sendkey doesn't cover that use case indeed. > > /me wonders what happened to the input-send-event patch from marcelo, > see http://patchwork.ozlabs.org/patch/360649/ > > According to patchwork I've picked it up. But it is neither upstream > nor in my local input branch. And I can't remember what happened :( > Marcelo, any clue? Maybe I should just re-queue it ... I was wondering the same... just requeue please. Let me know if it fails to apply and i'll rebase/resend. > The input-send-event gives you fine-grained control about the exact > input event sequence and it can handle your use case without problems. > > cheers, > Gerd