9 { 'include': 'common.json' }
10 { 'include': 'sockets.json' }
15 # Display protocols which support changing password options.
19 { 'enum': 'DisplayProtocol',
20 'data': [ 'vnc', 'spice' ] }
25 # An action to take on changing a password on a connection with active
28 # @keep: maintain existing clients
30 # @fail: fail the command if clients are connected
32 # @disconnect: disconnect existing clients
36 { 'enum': 'SetPasswordAction',
37 'data': [ 'keep', 'fail', 'disconnect' ] }
40 # @SetPasswordOptions:
42 # Options for set_password.
45 # - 'vnc' to modify the VNC server password
46 # - 'spice' to modify the Spice server password
48 # @password: the new password
50 # @connected: How to handle existing clients when changing the
51 # password. If nothing is specified, defaults to 'keep'. For VNC,
52 # only 'keep' is currently implemented.
56 { 'union': 'SetPasswordOptions',
57 'base': { 'protocol': 'DisplayProtocol',
59 '*connected': 'SetPasswordAction' },
60 'discriminator': 'protocol',
61 'data': { 'vnc': 'SetPasswordOptionsVnc' } }
64 # @SetPasswordOptionsVnc:
66 # Options for set_password specific to the VNC protocol.
68 # @display: The id of the display where the password should be
69 # changed. Defaults to the first.
73 { 'struct': 'SetPasswordOptionsVnc',
74 'data': { '*display': 'str' } }
79 # Set the password of a remote display server.
82 # - Nothing on success
83 # - If Spice is not enabled, DeviceNotFound
89 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
90 # "password": "secret" } }
93 { 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
96 # @ExpirePasswordOptions:
98 # General options for expire_password.
101 # - 'vnc' to modify the VNC server expiration
102 # - 'spice' to modify the Spice server expiration
104 # @time: when to expire the password.
106 # - 'now' to expire the password immediately
107 # - 'never' to cancel password expiration
108 # - '+INT' where INT is the number of seconds from now (integer)
109 # - 'INT' where INT is the absolute time in seconds
111 # Notes: Time is relative to the server and currently there is no way
112 # to coordinate server time with client time. It is not
113 # recommended to use the absolute time version of the @time
114 # parameter unless you're sure you are on the same machine as the
119 { 'union': 'ExpirePasswordOptions',
120 'base': { 'protocol': 'DisplayProtocol',
122 'discriminator': 'protocol',
123 'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
126 # @ExpirePasswordOptionsVnc:
128 # Options for expire_password specific to the VNC protocol.
130 # @display: The id of the display where the expiration should be
131 # changed. Defaults to the first.
135 { 'struct': 'ExpirePasswordOptionsVnc',
136 'data': { '*display': 'str' } }
141 # Expire the password of a remote display server.
144 # - Nothing on success
145 # - If @protocol is 'spice' and Spice is not active,
152 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
154 # <- { "return": {} }
156 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
161 # Supported image format types.
169 { 'enum': 'ImageFormat',
170 'data': ['ppm', 'png'] }
175 # Capture the contents of a screen and write it to a file.
177 # @filename: the path of a new file to store the image
179 # @device: ID of the display device that should be dumped. If this
180 # parameter is missing, the primary display will be used. (Since
183 # @head: head to use in case the device supports multiple heads. If
184 # this parameter is missing, head #0 will be used. Also note that
185 # the head can only be specified in conjunction with the device
188 # @format: image format for screendump. (default: ppm) (Since 7.1)
190 # Returns: Nothing on success
196 # -> { "execute": "screendump",
197 # "arguments": { "filename": "/tmp/image" } }
198 # <- { "return": {} }
200 { 'command': 'screendump',
201 'data': {'filename': 'str', '*device': 'str', '*head': 'int',
202 '*format': 'ImageFormat'},
204 'if': 'CONFIG_PIXMAN' }
213 # The basic information for SPICE network connection
219 # @family: address family
223 { 'struct': 'SpiceBasicInfo',
224 'data': { 'host': 'str',
226 'family': 'NetworkAddressFamily' },
227 'if': 'CONFIG_SPICE' }
232 # Information about a SPICE server
234 # @auth: authentication method
238 { 'struct': 'SpiceServerInfo',
239 'base': 'SpiceBasicInfo',
240 'data': { '*auth': 'str' },
241 'if': 'CONFIG_SPICE' }
246 # Information about a SPICE client channel.
248 # @connection-id: SPICE connection id number. All channels with the
249 # same id belong to the same SPICE session.
251 # @channel-type: SPICE channel type number. "1" is the main control
252 # channel, filter for this one if you want to track spice sessions
255 # @channel-id: SPICE channel ID number. Usually "0", might be
256 # different when multiple channels of the same type exist, such as
257 # multiple display channels in a multihead setup
259 # @tls: true if the channel is encrypted, false otherwise.
263 { 'struct': 'SpiceChannel',
264 'base': 'SpiceBasicInfo',
265 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
267 'if': 'CONFIG_SPICE' }
270 # @SpiceQueryMouseMode:
272 # An enumeration of Spice mouse states.
274 # @client: Mouse cursor position is determined by the client.
276 # @server: Mouse cursor position is determined by the server.
278 # @unknown: No information is available about mouse mode used by the
281 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
285 { 'enum': 'SpiceQueryMouseMode',
286 'data': [ 'client', 'server', 'unknown' ],
287 'if': 'CONFIG_SPICE' }
292 # Information about the SPICE session.
294 # @enabled: true if the SPICE server is enabled, false otherwise
296 # @migrated: true if the last guest migration completed and spice
297 # migration had completed as well. false otherwise. (since 1.4)
299 # @host: The hostname the SPICE server is bound to. This depends on
300 # the name resolution on the host and may be an IP address.
302 # @port: The SPICE server's port number.
304 # @compiled-version: SPICE server version.
306 # @tls-port: The SPICE server's TLS port number.
308 # @auth: the current authentication type used by the server
310 # - 'none' if no authentication is being used
311 # - 'spice' uses SASL or direct TLS authentication, depending on
312 # command line options
314 # @mouse-mode: The mode in which the mouse cursor is displayed
315 # currently. Can be determined by the client or the server, or
316 # unknown if spice server doesn't provide this information.
319 # @channels: a list of @SpiceChannel for each active spice channel
323 { 'struct': 'SpiceInfo',
324 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
325 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
326 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
327 'if': 'CONFIG_SPICE' }
332 # Returns information about the current SPICE server
334 # Returns: @SpiceInfo
340 # -> { "execute": "query-spice" }
348 # "mouse-mode":"client",
354 # "connection-id": 1804289383,
355 # "host": "127.0.0.1",
363 # "connection-id": 1804289383,
364 # "host": "127.0.0.1",
368 # [ ... more channels follow ... ]
373 { 'command': 'query-spice', 'returns': 'SpiceInfo',
374 'if': 'CONFIG_SPICE' }
379 # Emitted when a SPICE client establishes a connection
381 # @server: server information
383 # @client: client information
389 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
390 # "event": "SPICE_CONNECTED",
392 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
393 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
396 { 'event': 'SPICE_CONNECTED',
397 'data': { 'server': 'SpiceBasicInfo',
398 'client': 'SpiceBasicInfo' },
399 'if': 'CONFIG_SPICE' }
402 # @SPICE_INITIALIZED:
404 # Emitted after initial handshake and authentication takes place (if
405 # any) and the SPICE channel is up and running
407 # @server: server information
409 # @client: client information
415 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
416 # "event": "SPICE_INITIALIZED",
417 # "data": {"server": {"auth": "spice", "port": "5921",
418 # "family": "ipv4", "host": "127.0.0.1"},
419 # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
420 # "connection-id": 1804289383, "host": "127.0.0.1",
421 # "channel-id": 0, "tls": true}
424 { 'event': 'SPICE_INITIALIZED',
425 'data': { 'server': 'SpiceServerInfo',
426 'client': 'SpiceChannel' },
427 'if': 'CONFIG_SPICE' }
430 # @SPICE_DISCONNECTED:
432 # Emitted when the SPICE connection is closed
434 # @server: server information
436 # @client: client information
442 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
443 # "event": "SPICE_DISCONNECTED",
445 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
446 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
449 { 'event': 'SPICE_DISCONNECTED',
450 'data': { 'server': 'SpiceBasicInfo',
451 'client': 'SpiceBasicInfo' },
452 'if': 'CONFIG_SPICE' }
455 # @SPICE_MIGRATE_COMPLETED:
457 # Emitted when SPICE migration has completed
463 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
464 # "event": "SPICE_MIGRATE_COMPLETED" }
466 { 'event': 'SPICE_MIGRATE_COMPLETED',
467 'if': 'CONFIG_SPICE' }
476 # The basic information for vnc network connection
480 # @service: The service name of the vnc port. This may depend on the
481 # host system's service database so symbolic names should not be
484 # @family: address family
486 # @websocket: true in case the socket is a websocket (since 2.3).
490 { 'struct': 'VncBasicInfo',
491 'data': { 'host': 'str',
493 'family': 'NetworkAddressFamily',
494 'websocket': 'bool' },
500 # The network connection information for server
502 # @auth: authentication method used for the plain (non-websocket) VNC
507 { 'struct': 'VncServerInfo',
508 'base': 'VncBasicInfo',
509 'data': { '*auth': 'str' },
515 # Information about a connected VNC client.
517 # @x509_dname: If x509 authentication is in use, the Distinguished
518 # Name of the client.
520 # @sasl_username: If SASL authentication is in use, the SASL username
521 # used for authentication.
525 { 'struct': 'VncClientInfo',
526 'base': 'VncBasicInfo',
527 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
533 # Information about the VNC session.
535 # @enabled: true if the VNC server is enabled, false otherwise
537 # @host: The hostname the VNC server is bound to. This depends on the
538 # name resolution on the host and may be an IP address.
541 # - 'ipv6' if the host is listening for IPv6 connections
542 # - 'ipv4' if the host is listening for IPv4 connections
543 # - 'unix' if the host is listening on a unix domain socket
544 # - 'unknown' otherwise
546 # @service: The service name of the server's port. This may depends
547 # on the host system's service database so symbolic names should
550 # @auth: the current authentication type used by the server
552 # - 'none' if no authentication is being used
553 # - 'vnc' if VNC authentication is being used
554 # - 'vencrypt+plain' if VEncrypt is used with plain text
556 # - 'vencrypt+tls+none' if VEncrypt is used with TLS and no
558 # - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC
560 # - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain
562 # - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
563 # - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
564 # - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain
566 # - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
567 # - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL
570 # @clients: a list of @VncClientInfo of all currently connected
575 { 'struct': 'VncInfo',
576 'data': {'enabled': 'bool', '*host': 'str',
577 '*family': 'NetworkAddressFamily',
578 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
584 # vnc primary authentication method.
588 { 'enum': 'VncPrimaryAuth',
589 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
590 'tls', 'vencrypt', 'sasl' ],
594 # @VncVencryptSubAuth:
596 # vnc sub authentication method with vencrypt.
600 { 'enum': 'VncVencryptSubAuth',
602 'tls-none', 'x509-none',
603 'tls-vnc', 'x509-vnc',
604 'tls-plain', 'x509-plain',
605 'tls-sasl', 'x509-sasl' ],
611 # The network connection information for server
613 # @auth: The current authentication type used by the servers
615 # @vencrypt: The vencrypt sub authentication type used by the servers,
616 # only specified in case auth == vencrypt.
620 { 'struct': 'VncServerInfo2',
621 'base': 'VncBasicInfo',
622 'data': { 'auth' : 'VncPrimaryAuth',
623 '*vencrypt' : 'VncVencryptSubAuth' },
629 # Information about a vnc server
631 # @id: vnc server name.
633 # @server: A list of @VncBasincInfo describing all listening sockets.
634 # The list can be empty (in case the vnc server is disabled). It
635 # also may have multiple entries: normal + websocket, possibly
636 # also ipv4 + ipv6 in the future.
638 # @clients: A list of @VncClientInfo of all currently connected
639 # clients. The list can be empty, for obvious reasons.
641 # @auth: The current authentication type used by the non-websockets
644 # @vencrypt: The vencrypt authentication type used by the servers,
645 # only specified in case auth == vencrypt.
647 # @display: The display device the vnc server is linked to.
651 { 'struct': 'VncInfo2',
652 'data': { 'id' : 'str',
653 'server' : ['VncServerInfo2'],
654 'clients' : ['VncClientInfo'],
655 'auth' : 'VncPrimaryAuth',
656 '*vencrypt' : 'VncVencryptSubAuth',
657 '*display' : 'str' },
663 # Returns information about the current VNC server
671 # -> { "execute": "query-vnc" }
680 # "host":"127.0.0.1",
689 { 'command': 'query-vnc', 'returns': 'VncInfo',
692 # @query-vnc-servers:
694 # Returns a list of vnc servers. The list can be empty.
696 # Returns: a list of @VncInfo2
700 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
704 # @change-vnc-password:
706 # Change the VNC server password.
708 # @password: the new password to use with VNC authentication
712 # Notes: An empty password in this command will set the password to
713 # the empty string. Existing clients are unaffected by executing
716 { 'command': 'change-vnc-password',
717 'data': { 'password': 'str' },
723 # Emitted when a VNC client establishes a connection
725 # @server: server information
727 # @client: client information
729 # Note: This event is emitted before any authentication takes place,
730 # thus the authentication ID is not provided
736 # <- { "event": "VNC_CONNECTED",
738 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
739 # "service": "5901", "host": "0.0.0.0" },
740 # "client": { "family": "ipv4", "service": "58425",
741 # "host": "127.0.0.1", "websocket": false } },
742 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
744 { 'event': 'VNC_CONNECTED',
745 'data': { 'server': 'VncServerInfo',
746 'client': 'VncBasicInfo' },
752 # Emitted after authentication takes place (if any) and the VNC
753 # session is made active
755 # @server: server information
757 # @client: client information
763 # <- { "event": "VNC_INITIALIZED",
765 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
766 # "service": "5901", "host": "0.0.0.0"},
767 # "client": { "family": "ipv4", "service": "46089", "websocket": false,
768 # "host": "127.0.0.1", "sasl_username": "luiz" } },
769 # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
771 { 'event': 'VNC_INITIALIZED',
772 'data': { 'server': 'VncServerInfo',
773 'client': 'VncClientInfo' },
779 # Emitted when the connection is closed
781 # @server: server information
783 # @client: client information
789 # <- { "event": "VNC_DISCONNECTED",
791 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
792 # "service": "5901", "host": "0.0.0.0" },
793 # "client": { "family": "ipv4", "service": "58425", "websocket": false,
794 # "host": "127.0.0.1", "sasl_username": "luiz" } },
795 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
797 { 'event': 'VNC_DISCONNECTED',
798 'data': { 'server': 'VncServerInfo',
799 'client': 'VncClientInfo' },
809 # Information about a mouse device.
811 # @name: the name of the mouse device
813 # @index: the index of the mouse device
815 # @current: true if this device is currently receiving mouse events
817 # @absolute: true if this device supports absolute coordinates as
822 { 'struct': 'MouseInfo',
823 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
824 'absolute': 'bool'} }
829 # Returns information about each active mouse device
831 # Returns: a list of @MouseInfo for each device
837 # -> { "execute": "query-mice" }
840 # "name":"QEMU Microsoft Mouse",
846 # "name":"QEMU PS/2 Mouse",
854 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
859 # An enumeration of key name.
861 # This is used by the @send-key command.
863 # @unmapped: since 2.0
869 # @kp_comma: since 2.4
871 # @kp_equals: since 2.6
875 # @hiragana: since 2.9
885 # @audionext: since 2.10
887 # @audioprev: since 2.10
889 # @audiostop: since 2.10
891 # @audioplay: since 2.10
893 # @audiomute: since 2.10
895 # @volumeup: since 2.10
897 # @volumedown: since 2.10
899 # @mediaselect: since 2.10
903 # @calculator: since 2.10
905 # @computer: since 2.10
907 # @ac_home: since 2.10
909 # @ac_back: since 2.10
911 # @ac_forward: since 2.10
913 # @ac_refresh: since 2.10
915 # @ac_bookmarks: since 2.10
917 # @muhenkan: since 2.12
919 # @katakanahiragana: since 2.12
949 # 'sysrq' was mistakenly added to hack around the fact that the ps2
950 # driver was not generating correct scancodes sequences when
951 # 'alt+print' was pressed. This flaw is now fixed and the 'sysrq' key
952 # serves no further purpose. Any further use of 'sysrq' will be
953 # transparently changed to 'print', so they are effectively synonyms.
957 { 'enum': 'QKeyCode',
958 'data': [ 'unmapped',
959 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
960 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
961 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
962 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
963 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
964 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
965 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
966 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
967 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
968 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
969 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
970 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
971 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
972 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
973 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
974 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
975 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
976 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
977 'volumeup', 'volumedown', 'mediaselect',
978 'mail', 'calculator', 'computer',
979 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
980 'lang1', 'lang2','f13','f14','f15','f16','f17','f18','f19','f20','f21','f22','f23','f24' ] }
987 { 'enum': 'KeyValueKind',
988 'data': [ 'number', 'qcode' ] }
993 # @data: a numeric key code
997 { 'struct': 'IntWrapper',
998 'data': { 'data': 'int' } }
1003 # @data: An enumeration of key name
1007 { 'struct': 'QKeyCodeWrapper',
1008 'data': { 'data': 'QKeyCode' } }
1013 # Represents a keyboard key.
1015 # @type: key encoding
1019 { 'union': 'KeyValue',
1020 'base': { 'type': 'KeyValueKind' },
1021 'discriminator': 'type',
1023 'number': 'IntWrapper',
1024 'qcode': 'QKeyCodeWrapper' } }
1029 # Send keys to guest.
1031 # @keys: An array of @KeyValue elements. All @KeyValues in this array
1032 # are simultaneously sent to the guest. A @KeyValue.number value
1033 # is sent directly to the guest, while @KeyValue.qcode must be a
1034 # valid @QKeyCode value
1036 # @hold-time: time to delay key up events, milliseconds. Defaults to
1040 # - Nothing on success
1041 # - If key is unknown or redundant, GenericError
1047 # -> { "execute": "send-key",
1048 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
1049 # { "type": "qcode", "data": "alt" },
1050 # { "type": "qcode", "data": "delete" } ] } }
1051 # <- { "return": {} }
1053 { 'command': 'send-key',
1054 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
1059 # Button of a pointer input device (mouse, tablet).
1061 # @side: front side button of a 5-button mouse (since 2.9)
1063 # @extra: rear side button of a 5-button mouse (since 2.9)
1065 # @touch: screen contact on a multi-touch device (since 8.1)
1069 { 'enum' : 'InputButton',
1070 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
1071 'extra', 'wheel-left', 'wheel-right', 'touch' ] }
1076 # Position axis of a pointer input device (mouse, tablet).
1080 { 'enum' : 'InputAxis',
1081 'data' : [ 'x', 'y' ] }
1084 # @InputMultiTouchType:
1086 # Type of a multi-touch event.
1090 { 'enum' : 'InputMultiTouchType',
1091 'data' : [ 'begin', 'update', 'end', 'cancel', 'data' ] }
1097 # Keyboard input event.
1099 # @key: Which key this event is for.
1101 # @down: True for key-down and false for key-up events.
1105 { 'struct' : 'InputKeyEvent',
1106 'data' : { 'key' : 'KeyValue',
1112 # Pointer button input event.
1114 # @button: Which button this event is for.
1116 # @down: True for key-down and false for key-up events.
1120 { 'struct' : 'InputBtnEvent',
1121 'data' : { 'button' : 'InputButton',
1127 # Pointer motion input event.
1129 # @axis: Which axis is referenced by @value.
1131 # @value: Pointer position. For absolute coordinates the valid range
1136 { 'struct' : 'InputMoveEvent',
1137 'data' : { 'axis' : 'InputAxis',
1141 # @InputMultiTouchEvent:
1143 # MultiTouch input event.
1145 # @slot: Which slot has generated the event.
1147 # @tracking-id: ID to correlate this event with previously generated
1150 # @axis: Which axis is referenced by @value.
1152 # @value: Contact position.
1156 { 'struct' : 'InputMultiTouchEvent',
1157 'data' : { 'type' : 'InputMultiTouchType',
1159 'tracking-id': 'int',
1160 'axis' : 'InputAxis',
1166 # @key: a keyboard input event
1168 # @btn: a pointer button input event
1170 # @rel: a relative pointer motion input event
1172 # @abs: an absolute pointer motion input event
1174 # @mtt: a multi-touch input event
1178 { 'enum': 'InputEventKind',
1179 'data': [ 'key', 'btn', 'rel', 'abs', 'mtt' ] }
1182 # @InputKeyEventWrapper:
1184 # @data: Keyboard input event
1188 { 'struct': 'InputKeyEventWrapper',
1189 'data': { 'data': 'InputKeyEvent' } }
1192 # @InputBtnEventWrapper:
1194 # @data: Pointer button input event
1198 { 'struct': 'InputBtnEventWrapper',
1199 'data': { 'data': 'InputBtnEvent' } }
1202 # @InputMoveEventWrapper:
1204 # @data: Pointer motion input event
1208 { 'struct': 'InputMoveEventWrapper',
1209 'data': { 'data': 'InputMoveEvent' } }
1212 # @InputMultiTouchEventWrapper:
1214 # @data: MultiTouch input event
1218 { 'struct': 'InputMultiTouchEventWrapper',
1219 'data': { 'data': 'InputMultiTouchEvent' } }
1224 # Input event union.
1226 # @type: the type of input event
1230 { 'union' : 'InputEvent',
1231 'base': { 'type': 'InputEventKind' },
1232 'discriminator': 'type',
1233 'data' : { 'key' : 'InputKeyEventWrapper',
1234 'btn' : 'InputBtnEventWrapper',
1235 'rel' : 'InputMoveEventWrapper',
1236 'abs' : 'InputMoveEventWrapper',
1237 'mtt' : 'InputMultiTouchEventWrapper' } }
1240 # @input-send-event:
1242 # Send input event(s) to guest.
1244 # The @device and @head parameters can be used to send the input event
1245 # to specific input devices in case (a) multiple input devices of the
1246 # same kind are added to the virtual machine and (b) you have
1247 # configured input routing (see docs/multiseat.txt) for those input
1248 # devices. The parameters work exactly like the device and head
1249 # properties of input devices. If @device is missing, only devices
1250 # that have no input routing config are admissible. If @device is
1251 # specified, both input devices with and without input routing config
1252 # are admissible, but devices with input routing config take
1255 # @device: display device to send event(s) to.
1257 # @head: head to send event(s) to, in case the display device supports
1258 # multiple scanouts.
1260 # @events: List of InputEvent union.
1262 # Returns: Nothing on success.
1266 # Note: The consoles are visible in the qom tree, under
1267 # /backend/console[$index]. They have a device link and head
1268 # property, so it is possible to map which console belongs to
1269 # which device and display.
1273 # 1. Press left mouse button.
1275 # -> { "execute": "input-send-event",
1276 # "arguments": { "device": "video0",
1277 # "events": [ { "type": "btn",
1278 # "data" : { "down": true, "button": "left" } } ] } }
1279 # <- { "return": {} }
1281 # -> { "execute": "input-send-event",
1282 # "arguments": { "device": "video0",
1283 # "events": [ { "type": "btn",
1284 # "data" : { "down": false, "button": "left" } } ] } }
1285 # <- { "return": {} }
1287 # 2. Press ctrl-alt-del.
1289 # -> { "execute": "input-send-event",
1290 # "arguments": { "events": [
1291 # { "type": "key", "data" : { "down": true,
1292 # "key": {"type": "qcode", "data": "ctrl" } } },
1293 # { "type": "key", "data" : { "down": true,
1294 # "key": {"type": "qcode", "data": "alt" } } },
1295 # { "type": "key", "data" : { "down": true,
1296 # "key": {"type": "qcode", "data": "delete" } } } ] } }
1297 # <- { "return": {} }
1299 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1301 # -> { "execute": "input-send-event" ,
1302 # "arguments": { "events": [
1303 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1304 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1305 # <- { "return": {} }
1307 { 'command': 'input-send-event',
1308 'data': { '*device': 'str',
1310 'events' : [ 'InputEvent' ] } }
1315 # GTK display options.
1317 # @grab-on-hover: Grab keyboard input on mouse hover.
1319 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1320 # turned off the host window will be resized instead. In case the
1321 # display device can notify the guest on window resizes
1322 # (virtio-gpu) this will default to "on", assuming the guest will
1323 # resize the display to match the window size then. Otherwise it
1324 # defaults to "off". (Since 3.1)
1326 # @show-tabs: Display the tab bar for switching between the various
1327 # graphical interfaces (e.g. VGA and virtual console character
1328 # devices) by default. (Since 7.1)
1330 # @show-menubar: Display the main window menubar. Defaults to "on".
1335 { 'struct' : 'DisplayGTK',
1336 'data' : { '*grab-on-hover' : 'bool',
1337 '*zoom-to-fit' : 'bool',
1338 '*show-tabs' : 'bool',
1339 '*show-menubar' : 'bool' } }
1342 # @DisplayEGLHeadless:
1344 # EGL headless display options.
1346 # @rendernode: Which DRM render node should be used. Default is the
1347 # first available node on the host.
1351 { 'struct' : 'DisplayEGLHeadless',
1352 'data' : { '*rendernode' : 'str' } }
1357 # DBus display options.
1359 # @addr: The D-Bus bus address (default to the session bus).
1361 # @rendernode: Which DRM render node should be used. Default is the
1362 # first available node on the host.
1364 # @p2p: Whether to use peer-to-peer connections (accepted through
1367 # @audiodev: Use the specified DBus audiodev to export audio.
1371 { 'struct' : 'DisplayDBus',
1372 'data' : { '*rendernode' : 'str',
1375 '*audiodev': 'str' } }
1380 # Display OpenGL mode.
1382 # @off: Disable OpenGL (default).
1384 # @on: Use OpenGL, pick context type automatically. Would better be
1385 # named 'auto' but is called 'on' for backward compatibility with
1388 # @core: Use OpenGL with Core (desktop) Context.
1390 # @es: Use OpenGL with ES (embedded systems) Context.
1394 { 'enum' : 'DisplayGLMode',
1395 'data' : [ 'off', 'on', 'core', 'es' ] }
1400 # Curses display options.
1402 # @charset: Font charset used by guest (default: CP437).
1406 { 'struct' : 'DisplayCurses',
1407 'data' : { '*charset' : 'str' } }
1412 # Cocoa display options.
1414 # @left-command-key: Enable/disable forwarding of left command key to
1415 # guest. Allows command-tab window switching on the host without
1416 # sending this key to the guest when "off". Defaults to "on"
1418 # @full-grab: Capture all key presses, including system combos. This
1419 # requires accessibility permissions, since it performs a global
1420 # grab on key events. (default: off) See
1421 # https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1423 # @swap-opt-cmd: Swap the Option and Command keys so that their key
1424 # codes match their position on non-Mac keyboards and you can use
1425 # Meta/Super and Alt where you expect them. (default: off)
1427 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1428 # turned off the host window will be resized instead. Defaults to
1429 # "off". (Since 8.2)
1433 { 'struct': 'DisplayCocoa',
1435 '*left-command-key': 'bool',
1436 '*full-grab': 'bool',
1437 '*swap-opt-cmd': 'bool',
1438 '*zoom-to-fit': 'bool'
1444 # Set of modifier keys that need to be held for shortcut key actions.
1448 { 'enum' : 'HotKeyMod',
1449 'data' : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
1454 # SDL2 display options.
1456 # @grab-mod: Modifier keys that should be pressed together with the
1457 # "G" key to release the mouse grab.
1461 { 'struct' : 'DisplaySDL',
1462 'data' : { '*grab-mod' : 'HotKeyMod' } }
1467 # Display (user interface) type.
1469 # @default: The default user interface, selecting from the first
1470 # available of gtk, sdl, cocoa, and vnc.
1472 # @none: No user interface or video output display. The guest will
1473 # still see an emulated graphics card, but its output will not be
1474 # displayed to the QEMU user.
1476 # @gtk: The GTK user interface.
1478 # @sdl: The SDL user interface.
1480 # @egl-headless: No user interface, offload GL operations to a local
1481 # DRI device. Graphical display need to be paired with VNC or
1482 # Spice. (Since 3.1)
1484 # @curses: Display video output via curses. For graphics device
1485 # models which support a text mode, QEMU can display this output
1486 # using a curses/ncurses interface. Nothing is displayed when the
1487 # graphics device is in graphical mode or if the graphics device
1488 # does not support a text mode. Generally only the VGA device
1489 # models support text mode.
1491 # @cocoa: The Cocoa user interface.
1493 # @spice-app: Set up a Spice server and run the default associated
1494 # application to connect to it. The server will redirect the
1495 # serial console and QEMU monitors. (Since 4.0)
1497 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1501 { 'enum' : 'DisplayType',
1503 { 'name': 'default' },
1505 { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1506 { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1507 { 'name': 'egl-headless', 'if': 'CONFIG_OPENGL' },
1508 { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1509 { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1510 { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1511 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1518 # Display (user interface) options.
1520 # @type: Which DisplayType qemu should use.
1522 # @full-screen: Start user interface in fullscreen mode
1525 # @window-close: Allow to quit qemu with window close button
1528 # @show-cursor: Force showing the mouse cursor (default: off).
1531 # @gl: Enable OpenGL support (default: off).
1535 { 'union' : 'DisplayOptions',
1536 'base' : { 'type' : 'DisplayType',
1537 '*full-screen' : 'bool',
1538 '*window-close' : 'bool',
1539 '*show-cursor' : 'bool',
1540 '*gl' : 'DisplayGLMode' },
1541 'discriminator' : 'type',
1543 'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1544 'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1545 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1546 'egl-headless': { 'type': 'DisplayEGLHeadless',
1547 'if': 'CONFIG_OPENGL' },
1548 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' },
1549 'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' }
1554 # @query-display-options:
1556 # Returns information about display configuration
1558 # Returns: @DisplayOptions
1562 { 'command': 'query-display-options',
1563 'returns': 'DisplayOptions' }
1566 # @DisplayReloadType:
1568 # Available DisplayReload types.
1574 { 'enum': 'DisplayReloadType',
1578 # @DisplayReloadOptionsVNC:
1580 # Specify the VNC reload options.
1582 # @tls-certs: reload tls certs or not.
1586 { 'struct': 'DisplayReloadOptionsVNC',
1587 'data': { '*tls-certs': 'bool' } }
1590 # @DisplayReloadOptions:
1592 # Options of the display configuration reload.
1594 # @type: Specify the display type.
1598 { 'union': 'DisplayReloadOptions',
1599 'base': {'type': 'DisplayReloadType'},
1600 'discriminator': 'type',
1601 'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1606 # Reload display configuration.
1608 # Returns: Nothing on success.
1614 # -> { "execute": "display-reload",
1615 # "arguments": { "type": "vnc", "tls-certs": true } }
1616 # <- { "return": {} }
1618 { 'command': 'display-reload',
1619 'data': 'DisplayReloadOptions',
1623 # @DisplayUpdateType:
1625 # Available DisplayUpdate types.
1631 { 'enum': 'DisplayUpdateType',
1635 # @DisplayUpdateOptionsVNC:
1637 # Specify the VNC reload options.
1639 # @addresses: If specified, change set of addresses to listen for
1640 # connections. Addresses configured for websockets are not
1645 { 'struct': 'DisplayUpdateOptionsVNC',
1646 'data': { '*addresses': ['SocketAddress'] } }
1649 # @DisplayUpdateOptions:
1651 # Options of the display configuration reload.
1653 # @type: Specify the display type.
1657 { 'union': 'DisplayUpdateOptions',
1658 'base': {'type': 'DisplayUpdateType'},
1659 'discriminator': 'type',
1660 'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1665 # Update display configuration.
1667 # Returns: Nothing on success.
1673 # -> { "execute": "display-update",
1674 # "arguments": { "type": "vnc", "addresses":
1675 # [ { "type": "inet", "host": "0.0.0.0",
1676 # "port": "5901" } ] } }
1677 # <- { "return": {} }
1679 { 'command': 'display-update',
1680 'data': 'DisplayUpdateOptions',
1684 # @client_migrate_info:
1686 # Set migration information for remote display. This makes the server
1687 # ask the client to automatically reconnect using the new parameters
1688 # once migration finished successfully. Only implemented for SPICE.
1690 # @protocol: must be "spice"
1692 # @hostname: migration target hostname
1694 # @port: spice tcp port for plaintext channels
1696 # @tls-port: spice tcp port for tls-secured channels
1698 # @cert-subject: server certificate subject
1704 # -> { "execute": "client_migrate_info",
1705 # "arguments": { "protocol": "spice",
1706 # "hostname": "virt42.lab.kraxel.org",
1708 # <- { "return": {} }
1710 { 'command': 'client_migrate_info',
1711 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1712 '*tls-port': 'int', '*cert-subject': 'str' } }