aboutsummaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-01-12 12:11:14 +0100
committerGerd Hoffmann <kraxel@redhat.com>2016-03-01 07:51:34 +0100
commitb98d26e33327cf3009be5ead5d6dc8bc0c65dea8 (patch)
treea532496c11dbf5385c8d1882393cb1cdcca10e71 /qmp-commands.hx
parentf2c1d54c186c400ec676ec4d29ea4b8bf440c054 (diff)
qapi: switch x-input-send-event from console to device+head
Use display device qdev id and head number instead of console index to specify the QemuConsole. This makes things consistent with input devices (for input routing) and vnc server configuration, which both use display and head too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx17
1 files changed, 9 insertions, 8 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 13f158d568..b1a2b97f87 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4671,8 +4671,9 @@ Send input event to guest.
Arguments:
-- "console": console index. (json-int, optional)
-- "events": list of input events.
+- "device": display device (json-string, optional)
+- "head": display head (json-int, optional)
+- "events": list of input events
The consoles are visible in the qom tree, under
/backend/console[$index]. They have a device link and head property, so
@@ -4685,15 +4686,15 @@ Example (1):
Press left mouse button.
-> { "execute": "x-input-send-event",
- "arguments": { "console": 0,
+ "arguments": { "device": "video0",
"events": [ { "type": "btn",
- "data" : { "down": true, "button": "Left" } } ] } }
+ "data" : { "down": true, "button": "Left" } } ] } }
<- { "return": {} }
-> { "execute": "x-input-send-event",
- "arguments": { "console": 0,
+ "arguments": { "device": "video0",
"events": [ { "type": "btn",
- "data" : { "down": false, "button": "Left" } } ] } }
+ "data" : { "down": false, "button": "Left" } } ] } }
<- { "return": {} }
Example (2):
@@ -4701,7 +4702,7 @@ Example (2):
Press ctrl-alt-del.
-> { "execute": "x-input-send-event",
- "arguments": { "console": 0, "events": [
+ "arguments": { "events": [
{ "type": "key", "data" : { "down": true,
"key": {"type": "qcode", "data": "ctrl" } } },
{ "type": "key", "data" : { "down": true,
@@ -4715,7 +4716,7 @@ Example (3):
Move mouse pointer to absolute coordinates (20000, 400).
-> { "execute": "x-input-send-event" ,
- "arguments": { "console": 0, "events": [
+ "arguments": { "events": [
{ "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
{ "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
<- { "return": {} }