Received: from eggs.gnu.org ([2001:4830:134:3::10]:53763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XU9Il-0006GG-Sw for qemu-devel@nongnu.org; Wed, 17 Sep 2014 03:05:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XU9Ii-0006mO-2C for qemu-devel@nongnu.org; Wed, 17 Sep 2014 03:05:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XU9Ih-0006mF-R6 for qemu-devel@nongnu.org; Wed, 17 Sep 2014 03:05:15 -0400 From: Markus Armbruster References: <1409886863-6124-1-git-send-email-cyliu@suse.com> <540EE5CD020000660005EE1D@soto.provo.novell.com> <87tx4girg6.fsf@blackfin.pond.sub.org> <5410369B020000660005F9FC@soto.provo.novell.com> Date: Wed, 17 Sep 2014 09:04:57 +0200 In-Reply-To: (Anthony Liguori's message of "Tue, 9 Sep 2014 20:47:56 -0700") Message-ID: <87lhpiu3qe.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] vnc: add additional key up event before repeated key down List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Stefano Stabellini , "xen-devel@lists.xen.org" , Chun Yan Liu , qemu-devel Anthony Liguori writes: > On Tue, Sep 9, 2014 at 8:31 PM, Chun Yan Liu wrote: >> >> >>>>> On 9/10/2014 at 02:23 AM, in message >>>>> <87tx4girg6.fsf@blackfin.pond.sub.org>, >> Markus Armbruster wrote: >>> "Chun Yan Liu" writes: >>> >>>>>>> On 9/6/2014 at 05:23 AM, in message >>> > , Stefano >>> > Stabellini wrote: >>> >> On Fri, 5 Sep 2014, Chunyan Liu wrote: >>> >> > Using xen tools 'xl vncviewer' with tigervnc (default on SLE-12), >>> >> > found that: the display of the guest is unexpected while keep >>> >> > pressing a key. We expect the same character multiple times, but >>> >> > it prints only one time. This happens on a PV guest in text mode. >>> >> > >>> >> > After debugging, found that tigervnc sends repeated key down events >>> >> > in this case, to differentiate from user pressing the same key many >>> >> > times. Vnc server only prints the character when it finally receives >>> >> > key up event. >>> >> >>> >> Is this actually how a vnc client should behave? >>> >> How do the vnc client and server from realvnc behave in this regard >>> >> (they are the reference implementation)? >>> > >>> > VNC protocol doesn't specify how to handle key repetition. Tightvnc >>> > sends key-down&key-up repeatedly, but some example like RealVNC for >>> > Windows does the same thing - it sends only repeated key-down. >>> > >>> > Generally the VNC keyboard handling gives lot of space for interpretation >>> > and so the implementations differ. >>> >>> If implementations differ, and QEMU already behaves like some of them, >>> then why change it? >> >> To change qemu side because we could not expect each VNC client behaves >> the same when holding key down, some sending key-down, key-up, key-down, >> key-up; but some sending key-down, key-down, key-down .... Without change, >> client only sending key-down, key-up, key-down,key-up ... can get correct >> display. > > The VNC keyboard handling is pretty straight forward. The keys sent > are symbolic and correspond to input events (as interpreted by an > application). Whether you get repeat events depends on a lot of > client side configuration. > >>> What exactly gets fixed and what gets broken by the >>> proposed change? >> >> Holding the key down, only one character is printed, but repeated characters >> are expected. Happens on some vnc client. Either vnc client or vnc server >> should change some to match. > > You should fix TigerVNC. It's broken if it isn't sending repeat events. It *is* sending repeat events. The commit message says so, and I tested it to confirm. Key repeat works just fine for me in the guest, both in Grub and in Linux. It obviously doesn't for Chunyan Liu "on a PV guest in text mode." I suspect that PV guest's handling of key repeat is what needs fixing.