----- Original Message ----- > On Wed, 25 Jul 2012 01:55:14 -0400 (EDT) > Amos Kong <ak...@redhat.com> wrote: > > > > > > > ----- Original Message ----- > > > On Thu, 5 Jul 2012 20:48:44 +0800 > > > Amos Kong <ak...@redhat.com> 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 console.h is the mapping of key name to keycode, > > > > Keys' index in the enmu and key_defs[] is same. > > > > > > > > 'send-key' of QMP doesn't support key in hexadecimal format. > > > > > > > > Signed-off-by: Amos Kong <ak...@redhat.com> > > > > --- > > > > console.h | 152 ++++++++++++++++++++++++++++++++++ > > > > hmp-commands.hx | 2 +- > > > > hmp.c | 64 +++++++++++++++ > > > > hmp.h | 1 + > > > > monitor.c | 239 > > > > ++++++------------------------------------------------ > > > > qapi-schema.json | 46 +++++++++++ > > > > qmp-commands.hx | 28 +++++++ > > > > 7 files changed, 317 insertions(+), 215 deletions(-) > > > > ... > > > > > > diff --git a/qapi-schema.json b/qapi-schema.json > > > > index 3b6e346..08e51c6 100644 > > > > --- a/qapi-schema.json > > > > +++ b/qapi-schema.json > > > > @@ -1862,3 +1862,49 @@ > > > > # Since: 0.14.0 > > > > ## > > > > { 'command': 'netdev_del', 'data': {'id': 'str'} } > > > > + > > > > +## > > > > +# @KeyCodes: > > > > > > s/KeyCodes/KeyCode > > > > > > 'KeyCode' is not an available variable name. > > > > | ./qapi-types.h:471: error: conflicting types for ‘KeyCode’ > > | /usr/include/X11/X.h:108: note: previous declaration of ‘KeyCode’ > > | was here > > > > How about 'CodeOfKey'? > > QKeyCode, maybe?
Looks good. > Can you please paste the full error message? [root@dhcp-8-167 qemu]# make .... CC slirp/arp_table.o CC ui/keymaps.o CC ui/spice-core.o CC ui/spice-input.o CC ui/spice-display.o CC ui/sdl.o In file included from ./console.h:9, from ui/sdl.c:32: ./qapi-types.h:471: error: conflicting types for ‘KeyCode’ /usr/include/X11/X.h:108: note: previous declaration of ‘KeyCode’ was here make: *** [ui/sdl.o] Error 1 [root@dhcp-8-167 qemu]#