qmp-commands: move 'input-send-event' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
043ea3123d
commit
70d5b0c253
|
@ -1660,61 +1660,6 @@ Example:
|
||||||
-> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
|
-> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
|
||||||
<- { "return": {} }
|
<- { "return": {} }
|
||||||
|
|
||||||
input-send-event
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Send input event to guest.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
- "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
|
|
||||||
it is possible to map which console belongs to which device and display.
|
|
||||||
|
|
||||||
Example (1):
|
|
||||||
|
|
||||||
Press left mouse button.
|
|
||||||
|
|
||||||
-> { "execute": "input-send-event",
|
|
||||||
"arguments": { "device": "video0",
|
|
||||||
"events": [ { "type": "btn",
|
|
||||||
"data" : { "down": true, "button": "left" } } ] } }
|
|
||||||
<- { "return": {} }
|
|
||||||
|
|
||||||
-> { "execute": "input-send-event",
|
|
||||||
"arguments": { "device": "video0",
|
|
||||||
"events": [ { "type": "btn",
|
|
||||||
"data" : { "down": false, "button": "left" } } ] } }
|
|
||||||
<- { "return": {} }
|
|
||||||
|
|
||||||
Example (2):
|
|
||||||
|
|
||||||
Press ctrl-alt-del.
|
|
||||||
|
|
||||||
-> { "execute": "input-send-event",
|
|
||||||
"arguments": { "events": [
|
|
||||||
{ "type": "key", "data" : { "down": true,
|
|
||||||
"key": {"type": "qcode", "data": "ctrl" } } },
|
|
||||||
{ "type": "key", "data" : { "down": true,
|
|
||||||
"key": {"type": "qcode", "data": "alt" } } },
|
|
||||||
{ "type": "key", "data" : { "down": true,
|
|
||||||
"key": {"type": "qcode", "data": "delete" } } } ] } }
|
|
||||||
<- { "return": {} }
|
|
||||||
|
|
||||||
Example (3):
|
|
||||||
|
|
||||||
Move mouse pointer to absolute coordinates (20000, 400).
|
|
||||||
|
|
||||||
-> { "execute": "input-send-event" ,
|
|
||||||
"arguments": { "events": [
|
|
||||||
{ "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
|
|
||||||
{ "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
|
|
||||||
<- { "return": {} }
|
|
||||||
|
|
||||||
block-set-write-threshold
|
block-set-write-threshold
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
|
@ -5407,9 +5407,9 @@
|
||||||
#
|
#
|
||||||
# Returns: Nothing on success.
|
# Returns: Nothing on success.
|
||||||
#
|
#
|
||||||
# The @display and @head parameters can be used to send the input
|
# The @device and @head parameters can be used to send the input event
|
||||||
# event to specific input devices in case (a) multiple input devices
|
# to specific input devices in case (a) multiple input devices of the
|
||||||
# of the same kind are added to the virtual machine and (b) you have
|
# same kind are added to the virtual machine and (b) you have
|
||||||
# configured input routing (see docs/multiseat.txt) for those input
|
# configured input routing (see docs/multiseat.txt) for those input
|
||||||
# devices. The parameters work exactly like the device and head
|
# devices. The parameters work exactly like the device and head
|
||||||
# properties of input devices. If @device is missing, only devices
|
# properties of input devices. If @device is missing, only devices
|
||||||
|
@ -5419,6 +5419,48 @@
|
||||||
# precedence.
|
# precedence.
|
||||||
#
|
#
|
||||||
# Since: 2.6
|
# Since: 2.6
|
||||||
|
#
|
||||||
|
# Note: The consoles are visible in the qom tree, under
|
||||||
|
# /backend/console[$index]. They have a device link and head property,
|
||||||
|
# so it is possible to map which console belongs to which device and
|
||||||
|
# display.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# 1. Press left mouse button.
|
||||||
|
#
|
||||||
|
# -> { "execute": "input-send-event",
|
||||||
|
# "arguments": { "device": "video0",
|
||||||
|
# "events": [ { "type": "btn",
|
||||||
|
# "data" : { "down": true, "button": "left" } } ] } }
|
||||||
|
# <- { "return": {} }
|
||||||
|
#
|
||||||
|
# -> { "execute": "input-send-event",
|
||||||
|
# "arguments": { "device": "video0",
|
||||||
|
# "events": [ { "type": "btn",
|
||||||
|
# "data" : { "down": false, "button": "left" } } ] } }
|
||||||
|
# <- { "return": {} }
|
||||||
|
#
|
||||||
|
# 2. Press ctrl-alt-del.
|
||||||
|
#
|
||||||
|
# -> { "execute": "input-send-event",
|
||||||
|
# "arguments": { "events": [
|
||||||
|
# { "type": "key", "data" : { "down": true,
|
||||||
|
# "key": {"type": "qcode", "data": "ctrl" } } },
|
||||||
|
# { "type": "key", "data" : { "down": true,
|
||||||
|
# "key": {"type": "qcode", "data": "alt" } } },
|
||||||
|
# { "type": "key", "data" : { "down": true,
|
||||||
|
# "key": {"type": "qcode", "data": "delete" } } } ] } }
|
||||||
|
# <- { "return": {} }
|
||||||
|
#
|
||||||
|
# 3. Move mouse pointer to absolute coordinates (20000, 400).
|
||||||
|
#
|
||||||
|
# -> { "execute": "input-send-event" ,
|
||||||
|
# "arguments": { "events": [
|
||||||
|
# { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
|
||||||
|
# { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
|
||||||
|
# <- { "return": {} }
|
||||||
|
#
|
||||||
##
|
##
|
||||||
{ 'command': 'input-send-event',
|
{ 'command': 'input-send-event',
|
||||||
'data': { '*device': 'str',
|
'data': { '*device': 'str',
|
||||||
|
|
Loading…
Reference in New Issue