qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] input: add support for kbd delays


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 0/3] input: add support for kbd delays
Date: Mon, 02 Jun 2014 11:29:42 +0200

On Mo, 2014-06-02 at 05:00 -0400, Dave Mielke wrote:
> Hi:
> 
> A follow-up to my last message. I'm glad I left those "j"s repeating while I 
> wrote it. After sending it, I returned to that session and discovered that 
> they'd finally stopped. This caused me to do some more experimentation.
> 
> I held "j" down for quite a short period of time, and, sure enough, they did 
> stop about two seconds after. I then held backspace to get rid of them, 
> letting 
> go of it as soon as they were all gone. The keyboard only appeared to be dead 
> for, again, a couple of seconds.
> 
> I then tried these same tests with my patch. Autorepeating worked exactly as 
> it 
> should, stopping as soon as I let go of the key. Backspacing till they were 
> all 
> gone also left me with a live keyboard immediately. I did the control letter 
> test and they did what they should do instead of just double echoing the 
> non-control letter.

What mdelay you are using with your patch?

I've have hardcoded 100ms (same delay used by send-key monitor command).
Which is probably too much, especially with autorepeat.  Key events come
in faster than they are sent to the guest, so they pile up in the queue.
You lift the key, and qemu continues streaming the events to the guest
until the queue is empty.

Highest repeat rate ps/2 allows is 30Hz.  Which is 33 ms delay per key
event.  We have two delays in there (one after pressing all keys, one
after releasing all keys).  So something between 10 and 15 ms should be
short enough to make sure the queue doesn't grow.  Lets try that,
incremental patch attached.

cheers,
  Gerd

Attachment: 0001-curses-add-kbd-delay-between-keydown-and-keyup-event.patch
Description: Text Data


reply via email to

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