]> git.proxmox.com Git - qemu.git/commit - qapi-schema.json
qmp: qmp_send_key(): accept key codes in hex
authorLuiz Capitulino <lcapitulino@redhat.com>
Thu, 20 Sep 2012 17:19:47 +0000 (14:19 -0300)
committerLuiz Capitulino <lcapitulino@redhat.com>
Thu, 27 Sep 2012 12:50:30 +0000 (09:50 -0300)
commit9f32897768064841fe9a99145c9d15ab6667ffed
tree2a91ebbc96faee4436df7716dd75398a416f78b7
parent05a3543dbddd03d6be723be4074e2e661b00b851
qmp: qmp_send_key(): accept key codes in hex

Before the qapi conversion, the sendkey command could be used to
send key codes in hex directly to the guest. In HMP, this would
be like:

 (qemu) sendkey 0xdc

However, the qapi conversion broke this, as it only supports sending
QKeyCode values to the guest. That's a regression.

This commit fixes the problem by adding hex value support down
the QMP interface, qmp_send_key().

In more detail, this commit:

 1. Adds the KeyValue union. This can represent an hex value or
    a QKeyCode value

 2. *Changes* the QMP send-key command to take an KeyValue argument
    instead of a QKeyCode one

 3. Adapt hmp_send_key() to the QMP interface changes

Item 2 is an incompatible change, but as we're in development phase
(and this command has been merged a few weeks ago) this shouldn't be
a problem.

Finally, it's not possible to split this commit without breaking the
build.

Reported-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
hmp.c
input.c
qapi-schema.json