[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ps2: add support of auto-repeat

From: Amos Kong
Subject: Re: [Qemu-devel] [PATCH] ps2: add support of auto-repeat
Date: Tue, 21 May 2013 16:33:56 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, May 16, 2013 at 05:20:37PM +0200, Paolo Bonzini wrote:
> Il 16/05/2013 17:17, Peter Maydell ha scritto:
> > On 16 May 2013 16:09, Paolo Bonzini <address@hidden> wrote:
> >> ...  In XWindows, you get a KeyRelease for every KeyPress Event. In X,
> >> it looks something like this:
> >>
> > 
> > Shouldn't we be abstracting this platform difference
> > out in the ui layer, rather than having to deal with it
> > in the ps2 device model? That is, we should define what
> > our key-repeat model is for the QEMU keyboard-event-handler
> > API, and then make sure all our UI frontends (gtk, sdl,
> > cocoa, etc) do what we require...
> Yes, I am asking Amos to check which of our frontends comply.
> It needs to be checked in the host, because Linux guests emulate
> autorepeat anyway.  Or you can test with FreeDOS.

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

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

But when keyboard/host os doesn't support auto-repeat, or we directly
send event from monitor by 'sendkey'. held key could not be repeated
without auto-repeat support of emulated PS2 device.

When I use (Lenovo t430s & Fedoar 18 host), when I hold the real key,
qemu will get PPPPPPPR style events queue from host.

Guest (RHEL6/Win7/WinXp) & (SDL & VNC & SPICE) works well.

1. I read the keyboard driver in linux kernel, soft_auto-repeat was
   implemented in linux ps2 driver is PPPPPPPR style.

2. PPPPPPPPR style is described in freescale hardware manual:
     1.5.9  PS/2 Scan Codes
     Make code or break code is sent when any key is pressed or released.
     While a key is pressed, its _make code_ is sent out repeatedly and the
     rate depends on the typematic repeat value.

I will update patches to fix other problem, keep using PPPPPPPR style.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]