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

2013-05-21 Thread Paolo Bonzini
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

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

2013-05-21 Thread Amos Kong
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

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

2013-05-21 Thread Amos Kong
On Tue, May 21, 2013 at 10:38:00AM +0200, Paolo Bonzini wrote: > 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 wrote: > ... In XWindow

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

2013-05-21 Thread Amos Kong
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 wrote: > >> ... In XWindows, you get a KeyRelease for every KeyPress Event. In X, > >> it looks something like this: > >> > >> PRPRPRPRPRPRPRPR >

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

2013-05-21 Thread Paolo Bonzini
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 wrote: ... In XWindows, you get a KeyRelease for every KeyPress Event. In X, it looks som

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

2013-05-16 Thread Paolo Bonzini
Il 16/05/2013 17:17, Peter Maydell ha scritto: > On 16 May 2013 16:09, Paolo Bonzini 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 la

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

2013-05-16 Thread Peter Maydell
On 16 May 2013 16:09, Paolo Bonzini 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 m

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

2013-05-16 Thread Paolo Bonzini
Il 16/05/2013 22:37, Amos Kong ha scritto: > On Thu, May 16, 2013 at 05:11:59PM +0800, Lei Li wrote: >> On 05/16/2013 03:35 PM, Amos Kong wrote: >>> On Thu, May 16, 2013 at 03:23:21PM +0800, Lei Li wrote: On 05/16/2013 12:30 PM, Amos Kong wrote: > Guest driver sets repeat rate and delay ti

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

2013-05-16 Thread Paolo Bonzini
Il 16/05/2013 08:58, Amos Kong ha scritto: >> > theoretically, we have to check if the typematic key is in break >> > now, if so, we will not do repeat anymore. > You mean key is released? I checked by '~keycode & 0x80', stop repeat > when key is release. > BTW, !(keycode & 0x80) is more readabl

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

2013-05-16 Thread Paolo Bonzini
Il 16/05/2013 06:30, Amos Kong ha scritto: > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > but ps2 backend doesn't process it and no auto-repeat implementation. > This patch adds support of auto-repeat feature. > > Guest ps2 driver sets autorepeat to fastest possible in reset

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

2013-05-16 Thread Amos Kong
On Thu, May 16, 2013 at 05:11:59PM +0800, Lei Li wrote: > On 05/16/2013 03:35 PM, Amos Kong wrote: > >On Thu, May 16, 2013 at 03:23:21PM +0800, Lei Li wrote: > >>On 05/16/2013 12:30 PM, Amos Kong wrote: > >>>Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > >>>but ps2 backend does

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

2013-05-16 Thread Lei Li
On 05/16/2013 03:35 PM, Amos Kong wrote: On Thu, May 16, 2013 at 03:23:21PM +0800, Lei Li wrote: On 05/16/2013 12:30 PM, Amos Kong wrote: Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, but ps2 backend doesn't process it and no auto-repeat implementation. This patch adds suppo

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

2013-05-16 Thread Amos Kong
On Thu, May 16, 2013 at 03:23:21PM +0800, Lei Li wrote: > On 05/16/2013 12:30 PM, Amos Kong wrote: > >Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > >but ps2 backend doesn't process it and no auto-repeat implementation. > >This patch adds support of auto-repeat feature. > > > >

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

2013-05-16 Thread Amos Kong
On Thu, May 16, 2013 at 03:13:10PM +0800, li guang wrote: > 在 2013-05-16四的 14:58 +0800,Amos Kong写道: > > On Thu, May 16, 2013 at 01:30:28PM +0800, li guang wrote: > > > 在 2013-05-16四的 12:30 +0800,Amos Kong写道: > > > > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > > > > but ps2 b

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

2013-05-16 Thread Lei Li
On 05/16/2013 12:30 PM, Amos Kong wrote: Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, but ps2 backend doesn't process it and no auto-repeat implementation. This patch adds support of auto-repeat feature. Guest ps2 driver sets autorepeat to fastest possible in reset, period:

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

2013-05-16 Thread Amos Kong
On Thu, May 16, 2013 at 07:50:35AM +0100, Peter Maydell wrote: > On 16 May 2013 05:30, Amos Kong wrote: > > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > > but ps2 backend doesn't process it and no auto-repeat implementation. > > This patch adds support of auto-repeat feature

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

2013-05-16 Thread li guang
在 2013-05-16四的 14:58 +0800,Amos Kong写道: > On Thu, May 16, 2013 at 01:30:28PM +0800, li guang wrote: > > 在 2013-05-16四的 12:30 +0800,Amos Kong写道: > > > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > > > but ps2 backend doesn't process it and no auto-repeat implementation. > > > T

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

2013-05-15 Thread Amos Kong
On Thu, May 16, 2013 at 01:30:28PM +0800, li guang wrote: > 在 2013-05-16四的 12:30 +0800,Amos Kong写道: > > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > > but ps2 backend doesn't process it and no auto-repeat implementation. > > This patch adds support of auto-repeat feature. > >

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

2013-05-15 Thread Peter Maydell
On 16 May 2013 05:30, Amos Kong wrote: > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > but ps2 backend doesn't process it and no auto-repeat implementation. > This patch adds support of auto-repeat feature. > diff --git a/hw/input/ps2.c b/hw/input/ps2.c > index 3412079..1cfe

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

2013-05-15 Thread Jason Wang
On 05/16/2013 12:30 PM, Amos Kong wrote: > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > but ps2 backend doesn't process it and no auto-repeat implementation. > This patch adds support of auto-repeat feature. > > Guest ps2 driver sets autorepeat to fastest possible in reset, >

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

2013-05-15 Thread li guang
在 2013-05-16四的 12:30 +0800,Amos Kong写道: > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > but ps2 backend doesn't process it and no auto-repeat implementation. > This patch adds support of auto-repeat feature. > > Guest ps2 driver sets autorepeat to fastest possible in reset, >

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

2013-05-15 Thread Amos Kong
Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, but ps2 backend doesn't process it and no auto-repeat implementation. This patch adds support of auto-repeat feature. Guest ps2 driver sets autorepeat to fastest possible in reset, period: 250ms, delay: 33ms Tested by 'sendkey' mon