qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 6/6] qapi: convert sendkey


From: Amos Kong
Subject: Re: [Qemu-devel] [PATCH v2 6/6] qapi: convert sendkey
Date: Tue, 05 Jun 2012 10:55:51 -0400 (EDT)

Hello Eric,

Thanks for your comments.

----- Original Message -----
> On 06/01/2012 04:54 PM, Amos Kong wrote:
> > Convert 'sendkey' to use QAPI. do_sendkey() depends on some
> > variables/functions in monitor.c, so reserve qmp_sendkey()
> > to monitor.c
> > 
> > key_defs[] in monitor.c is the mapping of key name to keycode,
> > Keys' order in the enmu and key_defs[] is same.
> > 
> > Signed-off-by: Amos Kong <address@hidden>
> > ---
> 
> > +++ b/qapi-schema.json
> > @@ -1755,3 +1755,50 @@
> >  # Since: 0.14.0
> >  ##
> >  { 'command': 'device_del', 'data': {'id': 'str'} }
> > +
> > +##
> > +# @KeyCodes:
> > +#
> > +# An enumeration of key name.
> > +#
> > +# This is used by the sendkey command.
> > +#
> > +# Since: 0.14.0
> 
> Really?  Or is this enum since 1.2?

Yeah, it should be 1.2

> 
> > +
> > +##
> > +# @sendkey:
> > +#
> > +# Send keys to VM.
> > +#
> > +# @keys: key sequence
> > +# @hold-time: time to delay key up events, milliseconds
> > +#
> > +# Returns: Nothing on success
> > +#          If key is unknown or redundant, QERR_INVALID_PARAMETER
> > +#          If keys number is over the limitation, QERR_OVERFLOW
> > +#
> > +# Notes: Send keys to the emulator. Keys could be the name of the
> > +#        key or the raw value in either decimal or hexadecimal format. Use
> > +#        "-" to press several keys simultaneously.
> 
> These notes don't really correspond to the QMP interface of passing
> in a JSON array of simultaneous keys to press.


# Notes: Send keys to the emulator. Keys could be the name of the
#        key or the raw value in either decimal or hexadecimal format. Use
#        a JSON array to press several keys simultaneously.



Ho, I found another bug in my code, key in decimal or hexadecimal
format is not supported. I will fix it.

 
> > +#
> > +# Since: 0.14.0
> 
> Again, shouldn't this be 1.2?

yeah, 1.2
 
> 
> > +SQMP
> > +sendkey
> > +----------
> > +
> > +Send keys to VM.
> > +
> > +Arguments:
> > +
> > +keys array:
> > +    - "key": key sequence (json-string)
> > +
> > +- hold-time: time to delay key up events, miliseconds (josn-int,
> > optional)
> 
> s/miliseconds/milliseconds/
> 
> --
> Eric Blake   address@hidden    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 
> 



reply via email to

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