All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Amos Kong <akong@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	aliguori@us.ibm.com, Lei Li <lilei@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, lcapitulino@redhat.com, kraxel@redhat.com,
	lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH] ps2: add support of auto-repeat
Date: Tue, 21 May 2013 10:38:00 +0200	[thread overview]
Message-ID: <519B3268.2060300@redhat.com> (raw)
In-Reply-To: <20130521083356.GE3915@t430s.nay.redhat.com>

Il 21/05/2013 10:33, Amos Kong ha scritto:
> 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 <pbonzini@redhat.com> wrote:
>>>> ...  In XWindows, you get a KeyRelease for every KeyPress Event. In X,
>>>> it looks something like this:
>>>>
>>>> PRPRPRPRPRPRPRPR
>>>
>>> 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
> 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.

Paolo

> 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.
> 
> 
> Others:
> 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:
>    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM014.pdf
>    """
>      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	other threads:[~2013-05-21  8:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16  4:30 [Qemu-devel] [PATCH] ps2: add support of auto-repeat Amos Kong
2013-05-16  5:30 ` li guang
2013-05-16  6:58   ` Amos Kong
2013-05-16  7:13     ` li guang
2013-05-16  7:28       ` Amos Kong
2013-05-16 15:04     ` Paolo Bonzini
2013-05-16  6:40 ` Jason Wang
2013-05-16  6:50 ` Peter Maydell
2013-05-16  7:17   ` Amos Kong
2013-05-16  7:23 ` Lei Li
2013-05-16  7:35   ` Amos Kong
2013-05-16  9:11     ` Lei Li
2013-05-16 20:37       ` Amos Kong
2013-05-16 15:09         ` Paolo Bonzini
2013-05-16 15:17           ` Peter Maydell
2013-05-16 15:20             ` Paolo Bonzini
2013-05-21  8:33               ` Amos Kong
2013-05-21  8:38                 ` Paolo Bonzini [this message]
2013-05-21  9:04                   ` Amos Kong
2013-05-21  9:51                     ` Amos Kong
2013-05-21  9:54                       ` Paolo Bonzini
2013-05-16 15:03 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519B3268.2060300@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=akong@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=lilei@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.