From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UejGm-0001HV-E4 for qemu-devel@nongnu.org; Tue, 21 May 2013 05:54:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UejGl-00089d-6C for qemu-devel@nongnu.org; Tue, 21 May 2013 05:54:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UejGk-00089S-Tt for qemu-devel@nongnu.org; Tue, 21 May 2013 05:54:11 -0400 Message-ID: <519B4438.2090305@redhat.com> Date: Tue, 21 May 2013 11:54:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <51948969.5050604@linux.vnet.ibm.com> <20130516073521.GE3785@t430s.nay.redhat.com> <5194A2DF.9010608@linux.vnet.ibm.com> <20130516203703.GB3045@t430s.nay.redhat.com> <5194F6C7.3020106@redhat.com> <5194F945.8040601@redhat.com> <20130521083356.GE3915@t430s.nay.redhat.com> <519B3268.2060300@redhat.com> <20130521090430.GA26282@t430s.nay.redhat.com> <20130521095154.GB26282@t430s.nay.redhat.com> In-Reply-To: <20130521095154.GB26282@t430s.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ps2: add support of auto-repeat List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: Peter Maydell , aliguori@us.ibm.com, Lei Li , qemu-devel@nongnu.org, lcapitulino@redhat.com, kraxel@redhat.com, lersek@redhat.com Il 21/05/2013 11:51, Amos Kong ha scritto: > On Tue, May 21, 2013 at 05:04:30PM +0800, Amos Kong wrote: >> On Tue, May 21, 2013 at 10:38:00AM +0200, Paolo Bonzini wrote: >>>> Please correct me if something is wrong, thanks. >>>> >>>> When we use VNC/SPICE/SDL, vm Window will captured the key events, >>>> then qemu process the events and transfer to guest through emulated PS2 >>>> device. >>>> >>>> When we hold the key in keyboard of host, real keyboard or host OS will >>>> do auto-repeat. vm Window will transfer repeated events to guest. >>>> In this case, it seems the auto-repeat of emulated PS2 device doesn't >>>> needed. >>> >>> If you can make emulated autorepeat work also with VNC/SDL/SPICE, it >>> would be much better, because then the guest can choose to enable or >>> disable the autorepeat as desired. >>> >>> That's why I mentioned testing with FreeDOS, which does no emulation. >>> You can find DOS programs to change the typematic rate. >> >> Yes, if we don't process events from host, the rate set in guest >> doesn't work for SDL/VNC/SPICE/.. >> >> I have fixed it by ignoring continual/repated(same keycode) press >> events. It works now :) > > When I test with linux guest, set rate by 'kbdrate -r ..', > emulated PS2 device can get a keyboard_write (cmd: 0xf3), rate will > be set, auto-repeat rate can be controlled. > > I also tested by Win7, set rate by 'mode con rate=2',emulated PS2 > device can get a keyboard_write (cmd: 0xf3), rate will > be set, auto-repeat rate can be controlled. > > Is it enough to prove the auto-repeat implemented in ps2 is ok? > >> I just tested by Linux guest (set rate by 'kbdrate -s ..'), >> will test with FreeDOS. > > In FreeDOS, I set rate by 'mode con rate=2', got a success prompt. > but emulated PS2 device can't get a keyboard_write (cmd: 0xf3) in init > stage & when I execute mode command. Auto-repeat always use default > rate in qemu-ps2 code. > > FreeDOS bug? Probably. Testing Windows is enough, I didn't think of it. Which backends did you test among SDL/VNC/SPICE/GTK+? Paolo