mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
1048c88f03
commit
e4c8f004c5
8 changed files with 171 additions and 90 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue