Skip to contentSkip to conversation

qmp: update send-key document

PATCH Applied Amos Kong 3 participants 3 messages Jul 16, 2013 – Jul 17, 2013

lore
Share & tools
lore

Amos Kong

author
#0 lore raw

PATCH 1/1 qmp: update send-key document

commit 9f328977 changes qmp_send_key() to accept key codes in hex, but the document wasn't updated. The items of keys list is union now, not enum.

---
 qmp-commands.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
qmp-commands.hx +5 -2
index e3cbe93..30f9fc9 100644
@@ -346,7 +346,8 @@ Send keys to VM.
 Arguments:
 
 keys array:
-    - "key": key sequence (a json-array of key enum values)
+    - "key": key sequence (a json-array of key union values,
+             union can be number or qcode enum)
 
 - hold-time: time to delay key up events, milliseconds. Defaults to 100
              (json-int, optional)
@@ -354,7 +355,9 @@ keys array:
 Example:
 
 -> { "execute": "send-key",
-     "arguments": { 'keys': [ 'ctrl', 'alt', 'delete' ] } }
+     "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
+                              { "type": "qcode", "data": "alt" },
+                              { "type": "qcode", "data": "delete" } ] } }
 <- { "return": {} }
 
 EQMP
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Amos Kong

commit 9f328977 changes qmp_send_key() to accept key codes in hex, but the document wasn't updated. The items of keys list is union now, not enum.

---
 qmp-commands.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#2 lore raw
In reply to Amos Kong
Quoted 5 lines · On Tue, 16 Jul 2013 19:52:14 +0800 Amos Kong <[email protected]> wrote:

commit 9f328977 changes qmp_send_key() to accept key codes in hex, but the document wasn't updated. The items of keys list is union now, not enum.

Applied to the qmp branch, thanks.

Quoted 29 lines
---
 qmp-commands.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
qmp-commands.hx +5 -2
index e3cbe93..30f9fc9 100644
@@ -346,7 +346,8 @@ Send keys to VM.
 Arguments:
 
 keys array:
-    - "key": key sequence (a json-array of key enum values)
+    - "key": key sequence (a json-array of key union values,
+             union can be number or qcode enum)
 
 - hold-time: time to delay key up events, milliseconds. Defaults to 100
              (json-int, optional)
@@ -354,7 +355,9 @@ keys array:
 Example:
 
 -> { "execute": "send-key",
-     "arguments": { 'keys': [ 'ctrl', 'alt', 'delete' ] } }
+     "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
+                              { "type": "qcode", "data": "alt" },
+                              { "type": "qcode", "data": "delete" } ] } }
 <- { "return": {} }
 
 EQMP