On Wed, 27 Jun 2012 17:59:04 +0800 Amos Kong <ak...@redhat.com> wrote:
> On 27/06/12 04:22, Luiz Capitulino wrote: > > On Wed, 20 Jun 2012 06:53:40 -0600 > > Eric Blake<ebl...@redhat.com> wrote: > > > >> On 06/19/2012 10:47 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. > >>> > >> > >> The interface looks like we have settled into something useful that > >> libvirt can live with. I will leave a more thorough review of the > >> series to those more familiar with qemu's internals. However, as long > >> as we are fine-tuning things, I have some questions that might be worth > >> one more spin: > >> > >>> +## > >>> +# @sendkey: > >> > >> Should this be named 'send-key', given that most QMP commands separate > >> words with '-' rather than squasheverythingtogether? > > > > Yes, that's right. > > still use sendkey for hmp ? Yes. > >>> +SQMP > >>> +sendkey > >>> +---------- > >>> + > >>> +Send keys to VM. > >>> + > >>> +Arguments: > >>> + > >>> +keys array: > >>> + - "key": key sequence (json-string) > >> > >> I'm not sure if json-string is the right designation any more. Rather, > >> it is a json-array of key enum values. > > The content in brackets should be the description of "key", > which is the item of array. I think jaso-string is better. > It's not the description for while array. Actually, you should call it a list of json-string.