summaryrefslogtreecommitdiffstats
path: root/hmp-commands.hx
diff options
context:
space:
mode:
authorAmos Kong2012-08-31 04:56:26 +0200
committerLuiz Capitulino2012-09-05 20:48:57 +0200
commite4c8f004c55d9da3eae3e14df740238bf805b5d6 (patch)
tree15dfdb6d109c4d093fa08e4f7fa79bfbaf29c6b1 /hmp-commands.hx
parentmonitor: move key_defs[] table and introduce two help functions (diff)
downloadqemu-e4c8f004c55d9da3eae3e14df740238bf805b5d6.tar.gz
qemu-e4c8f004c55d9da3eae3e14df740238bf805b5d6.tar.xz
qemu-e4c8f004c55d9da3eae3e14df740238bf805b5d6.zip
qapi: convert sendkey
Convert 'sendkey' to use QAPI. QAPI passes key's index of mapping table to qmp_send_key(), not keycode. So we use help functions to convert key/code to index of key_defs, and 'index' will be converted to 'keycode' inside qmp_send_key(). For qmp, QAPI would check invalid key and raise error. For hmp, invalid key is checked in hmp_send_key(). 'send-key' of QMP doesn't support key in hexadecimal format. Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp-commands.hx')
-rw-r--r--hmp-commands.hx2
1 files changed, 1 insertions, 1 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index bd0c6c9191..5cee1310cc 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -505,7 +505,7 @@ ETEXI
.args_type = "keys:s,hold-time:i?",
.params = "keys [hold_ms]",
.help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
- .mhandler.cmd = do_sendkey,
+ .mhandler.cmd = hmp_send_key,
},
STEXI