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 clients.
27 # @keep: maintain existing clients
29 # @fail: fail the command if clients are connected
31 # @disconnect: disconnect existing clients
35 { 'enum': 'SetPasswordAction',
36 'data': [ 'keep', 'fail', 'disconnect' ] }
39 # @SetPasswordOptions:
41 # Options for set_password.
43 # @protocol: - 'vnc' to modify the VNC server password
44 # - 'spice' to modify the Spice server password
46 # @password: the new password
48 # @connected: How to handle existing clients when changing the
49 # password. If nothing is specified, defaults to 'keep'.
50 # For VNC, only 'keep' is currently implemented.
54 { 'union': 'SetPasswordOptions',
55 'base': { 'protocol': 'DisplayProtocol',
57 '*connected': 'SetPasswordAction' },
58 'discriminator': 'protocol',
59 'data': { 'vnc': 'SetPasswordOptionsVnc' } }
62 # @SetPasswordOptionsVnc:
64 # Options for set_password specific to the VNC procotol.
66 # @display: The id of the display where the password should be changed.
67 # Defaults to the first.
71 { 'struct': 'SetPasswordOptionsVnc',
72 'data': { '*display': 'str' } }
77 # Set the password of a remote display server.
79 # Returns: - Nothing on success
80 # - If Spice is not enabled, DeviceNotFound
86 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
87 # "password": "secret" } }
91 { 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
94 # @ExpirePasswordOptions:
96 # General options for expire_password.
98 # @protocol: - 'vnc' to modify the VNC server expiration
99 # - 'spice' to modify the Spice server expiration
101 # @time: when to expire the password.
103 # - 'now' to expire the password immediately
104 # - 'never' to cancel password expiration
105 # - '+INT' where INT is the number of seconds from now (integer)
106 # - 'INT' where INT is the absolute time in seconds
108 # Notes: Time is relative to the server and currently there is no way to
109 # coordinate server time with client time. It is not recommended to
110 # use the absolute time version of the @time parameter unless you're
111 # sure you are on the same machine as the QEMU instance.
115 { 'union': 'ExpirePasswordOptions',
116 'base': { 'protocol': 'DisplayProtocol',
118 'discriminator': 'protocol',
119 'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
122 # @ExpirePasswordOptionsVnc:
124 # Options for expire_password specific to the VNC procotol.
126 # @display: The id of the display where the expiration should be changed.
127 # Defaults to the first.
132 { 'struct': 'ExpirePasswordOptionsVnc',
133 'data': { '*display': 'str' } }
138 # Expire the password of a remote display server.
140 # Returns: - Nothing on success
141 # - If @protocol is 'spice' and Spice is not active, DeviceNotFound
147 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
149 # <- { "return": {} }
152 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
157 # Supported image format types.
165 { 'enum': 'ImageFormat',
166 'data': ['ppm', 'png'] }
171 # Capture the contents of a screen and write it to a file.
173 # @filename: the path of a new file to store the image
175 # @device: ID of the display device that should be dumped. If this parameter
176 # is missing, the primary display will be used. (Since 2.12)
178 # @head: head to use in case the device supports multiple heads. If this
179 # parameter is missing, head #0 will be used. Also note that the head
180 # can only be specified in conjunction with the device ID. (Since 2.12)
182 # @format: image format for screendump. (default: ppm) (Since 7.1)
184 # Returns: Nothing on success
190 # -> { "execute": "screendump",
191 # "arguments": { "filename": "/tmp/image" } }
192 # <- { "return": {} }
195 { 'command': 'screendump',
196 'data': {'filename': 'str', '*device': 'str', '*head': 'int',
197 '*format': 'ImageFormat'},
207 # The basic information for SPICE network connection
213 # @family: address family
217 { 'struct': 'SpiceBasicInfo',
218 'data': { 'host': 'str',
220 'family': 'NetworkAddressFamily' },
221 'if': 'CONFIG_SPICE' }
226 # Information about a SPICE server
228 # @auth: authentication method
232 { 'struct': 'SpiceServerInfo',
233 'base': 'SpiceBasicInfo',
234 'data': { '*auth': 'str' },
235 'if': 'CONFIG_SPICE' }
240 # Information about a SPICE client channel.
242 # @connection-id: SPICE connection id number. All channels with the same id
243 # belong to the same SPICE session.
245 # @channel-type: SPICE channel type number. "1" is the main control
246 # channel, filter for this one if you want to track spice
249 # @channel-id: SPICE channel ID number. Usually "0", might be different when
250 # multiple channels of the same type exist, such as multiple
251 # display channels in a multihead setup
253 # @tls: true if the channel is encrypted, false otherwise.
257 { 'struct': 'SpiceChannel',
258 'base': 'SpiceBasicInfo',
259 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
261 'if': 'CONFIG_SPICE' }
264 # @SpiceQueryMouseMode:
266 # An enumeration of Spice mouse states.
268 # @client: Mouse cursor position is determined by the client.
270 # @server: Mouse cursor position is determined by the server.
272 # @unknown: No information is available about mouse mode used by
275 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
279 { 'enum': 'SpiceQueryMouseMode',
280 'data': [ 'client', 'server', 'unknown' ],
281 'if': 'CONFIG_SPICE' }
286 # Information about the SPICE session.
288 # @enabled: true if the SPICE server is enabled, false otherwise
290 # @migrated: true if the last guest migration completed and spice
291 # migration had completed as well. false otherwise. (since 1.4)
293 # @host: The hostname the SPICE server is bound to. This depends on
294 # the name resolution on the host and may be an IP address.
296 # @port: The SPICE server's port number.
298 # @compiled-version: SPICE server version.
300 # @tls-port: The SPICE server's TLS port number.
302 # @auth: the current authentication type used by the server
304 # - 'none' if no authentication is being used
305 # - 'spice' uses SASL or direct TLS authentication, depending on command
308 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
309 # be determined by the client or the server, or unknown if spice
310 # server doesn't provide this information. (since: 1.1)
312 # @channels: a list of @SpiceChannel for each active spice channel
316 { 'struct': 'SpiceInfo',
317 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
318 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
319 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
320 'if': 'CONFIG_SPICE' }
325 # Returns information about the current SPICE server
327 # Returns: @SpiceInfo
333 # -> { "execute": "query-spice" }
341 # "mouse-mode":"client",
347 # "connection-id": 1804289383,
348 # "host": "127.0.0.1",
356 # "connection-id": 1804289383,
357 # "host": "127.0.0.1",
361 # [ ... more channels follow ... ]
367 { 'command': 'query-spice', 'returns': 'SpiceInfo',
368 'if': 'CONFIG_SPICE' }
373 # Emitted when a SPICE client establishes a connection
375 # @server: server information
377 # @client: client information
383 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
384 # "event": "SPICE_CONNECTED",
386 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
387 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
391 { 'event': 'SPICE_CONNECTED',
392 'data': { 'server': 'SpiceBasicInfo',
393 'client': 'SpiceBasicInfo' },
394 'if': 'CONFIG_SPICE' }
397 # @SPICE_INITIALIZED:
399 # Emitted after initial handshake and authentication takes place (if any)
400 # and the SPICE channel is up and running
402 # @server: server information
404 # @client: client information
410 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
411 # "event": "SPICE_INITIALIZED",
412 # "data": {"server": {"auth": "spice", "port": "5921",
413 # "family": "ipv4", "host": "127.0.0.1"},
414 # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
415 # "connection-id": 1804289383, "host": "127.0.0.1",
416 # "channel-id": 0, "tls": true}
420 { 'event': 'SPICE_INITIALIZED',
421 'data': { 'server': 'SpiceServerInfo',
422 'client': 'SpiceChannel' },
423 'if': 'CONFIG_SPICE' }
426 # @SPICE_DISCONNECTED:
428 # Emitted when the SPICE connection is closed
430 # @server: server information
432 # @client: client information
438 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
439 # "event": "SPICE_DISCONNECTED",
441 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
442 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
446 { 'event': 'SPICE_DISCONNECTED',
447 'data': { 'server': 'SpiceBasicInfo',
448 'client': 'SpiceBasicInfo' },
449 'if': 'CONFIG_SPICE' }
452 # @SPICE_MIGRATE_COMPLETED:
454 # Emitted when SPICE migration has completed
460 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
461 # "event": "SPICE_MIGRATE_COMPLETED" }
464 { 'event': 'SPICE_MIGRATE_COMPLETED',
465 'if': 'CONFIG_SPICE' }
474 # The basic information for vnc network connection
478 # @service: The service name of the vnc port. This may depend on the host
479 # system's service database so symbolic names should not be relied
482 # @family: address family
484 # @websocket: true in case the socket is a websocket (since 2.3).
488 { 'struct': 'VncBasicInfo',
489 'data': { 'host': 'str',
491 'family': 'NetworkAddressFamily',
492 'websocket': 'bool' },
498 # The network connection information for server
500 # @auth: authentication method used for
501 # the plain (non-websocket) VNC server
505 { 'struct': 'VncServerInfo',
506 'base': 'VncBasicInfo',
507 'data': { '*auth': 'str' },
513 # Information about a connected VNC client.
515 # @x509_dname: If x509 authentication is in use, the Distinguished
516 # Name of the client.
518 # @sasl_username: If SASL authentication is in use, the SASL username
519 # used for authentication.
523 { 'struct': 'VncClientInfo',
524 'base': 'VncBasicInfo',
525 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
531 # Information about the VNC session.
533 # @enabled: true if the VNC server is enabled, false otherwise
535 # @host: The hostname the VNC server is bound to. This depends on
536 # the name resolution on the host and may be an IP address.
538 # @family: - 'ipv6' if the host is listening for IPv6 connections
539 # - 'ipv4' if the host is listening for IPv4 connections
540 # - 'unix' if the host is listening on a unix domain socket
541 # - 'unknown' otherwise
543 # @service: The service name of the server's port. This may depends
544 # on the host system's service database so symbolic names should not
547 # @auth: the current authentication type used by the server
549 # - 'none' if no authentication is being used
550 # - 'vnc' if VNC authentication is being used
551 # - 'vencrypt+plain' if VEncrypt is used with plain text authentication
552 # - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
553 # - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
554 # - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
555 # - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
556 # - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
557 # - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
558 # - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
559 # - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
561 # @clients: a list of @VncClientInfo of all currently connected clients
565 { 'struct': 'VncInfo',
566 'data': {'enabled': 'bool', '*host': 'str',
567 '*family': 'NetworkAddressFamily',
568 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
574 # vnc primary authentication method.
578 { 'enum': 'VncPrimaryAuth',
579 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
580 'tls', 'vencrypt', 'sasl' ],
584 # @VncVencryptSubAuth:
586 # vnc sub authentication method with vencrypt.
590 { 'enum': 'VncVencryptSubAuth',
592 'tls-none', 'x509-none',
593 'tls-vnc', 'x509-vnc',
594 'tls-plain', 'x509-plain',
595 'tls-sasl', 'x509-sasl' ],
601 # The network connection information for server
603 # @auth: The current authentication type used by the servers
605 # @vencrypt: The vencrypt sub authentication type used by the
606 # servers, only specified in case auth == vencrypt.
610 { 'struct': 'VncServerInfo2',
611 'base': 'VncBasicInfo',
612 'data': { 'auth' : 'VncPrimaryAuth',
613 '*vencrypt' : 'VncVencryptSubAuth' },
619 # Information about a vnc server
621 # @id: vnc server name.
623 # @server: A list of @VncBasincInfo describing all listening sockets.
624 # The list can be empty (in case the vnc server is disabled).
625 # It also may have multiple entries: normal + websocket,
626 # possibly also ipv4 + ipv6 in the future.
628 # @clients: A list of @VncClientInfo of all currently connected clients.
629 # The list can be empty, for obvious reasons.
631 # @auth: The current authentication type used by the non-websockets servers
633 # @vencrypt: The vencrypt authentication type used by the servers,
634 # only specified in case auth == vencrypt.
636 # @display: The display device the vnc server is linked to.
640 { 'struct': 'VncInfo2',
641 'data': { 'id' : 'str',
642 'server' : ['VncServerInfo2'],
643 'clients' : ['VncClientInfo'],
644 'auth' : 'VncPrimaryAuth',
645 '*vencrypt' : 'VncVencryptSubAuth',
646 '*display' : 'str' },
652 # Returns information about the current VNC server
660 # -> { "execute": "query-vnc" }
669 # "host":"127.0.0.1",
679 { 'command': 'query-vnc', 'returns': 'VncInfo',
682 # @query-vnc-servers:
684 # Returns a list of vnc servers. The list can be empty.
686 # Returns: a list of @VncInfo2
690 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
694 # @change-vnc-password:
696 # Change the VNC server password.
698 # @password: the new password to use with VNC authentication
702 # Notes: An empty password in this command will set the password to the empty
703 # string. Existing clients are unaffected by executing this command.
705 { 'command': 'change-vnc-password',
706 'data': { 'password': 'str' },
712 # Emitted when a VNC client establishes a connection
714 # @server: server information
716 # @client: client information
718 # Note: This event is emitted before any authentication takes place, thus
719 # the authentication ID is not provided
725 # <- { "event": "VNC_CONNECTED",
727 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
728 # "service": "5901", "host": "0.0.0.0" },
729 # "client": { "family": "ipv4", "service": "58425",
730 # "host": "127.0.0.1", "websocket": false } },
731 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
734 { 'event': 'VNC_CONNECTED',
735 'data': { 'server': 'VncServerInfo',
736 'client': 'VncBasicInfo' },
742 # Emitted after authentication takes place (if any) and the VNC session is
745 # @server: server information
747 # @client: client information
753 # <- { "event": "VNC_INITIALIZED",
755 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
756 # "service": "5901", "host": "0.0.0.0"},
757 # "client": { "family": "ipv4", "service": "46089", "websocket": false,
758 # "host": "127.0.0.1", "sasl_username": "luiz" } },
759 # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
762 { 'event': 'VNC_INITIALIZED',
763 'data': { 'server': 'VncServerInfo',
764 'client': 'VncClientInfo' },
770 # Emitted when the connection is closed
772 # @server: server information
774 # @client: client information
780 # <- { "event": "VNC_DISCONNECTED",
782 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
783 # "service": "5901", "host": "0.0.0.0" },
784 # "client": { "family": "ipv4", "service": "58425", "websocket": false,
785 # "host": "127.0.0.1", "sasl_username": "luiz" } },
786 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
789 { 'event': 'VNC_DISCONNECTED',
790 'data': { 'server': 'VncServerInfo',
791 'client': 'VncClientInfo' },
801 # Information about a mouse device.
803 # @name: the name of the mouse device
805 # @index: the index of the mouse device
807 # @current: true if this device is currently receiving mouse events
809 # @absolute: true if this device supports absolute coordinates as input
813 { 'struct': 'MouseInfo',
814 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
815 'absolute': 'bool'} }
820 # Returns information about each active mouse device
822 # Returns: a list of @MouseInfo for each device
828 # -> { "execute": "query-mice" }
831 # "name":"QEMU Microsoft Mouse",
837 # "name":"QEMU PS/2 Mouse",
846 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
851 # An enumeration of key name.
853 # This is used by the @send-key command.
855 # @unmapped: since 2.0
858 # @kp_comma: since 2.4
859 # @kp_equals: since 2.6
861 # @hiragana: since 2.9
867 # @audionext: since 2.10
868 # @audioprev: since 2.10
869 # @audiostop: since 2.10
870 # @audioplay: since 2.10
871 # @audiomute: since 2.10
872 # @volumeup: since 2.10
873 # @volumedown: since 2.10
874 # @mediaselect: since 2.10
876 # @calculator: since 2.10
877 # @computer: since 2.10
878 # @ac_home: since 2.10
879 # @ac_back: since 2.10
880 # @ac_forward: since 2.10
881 # @ac_refresh: since 2.10
882 # @ac_bookmarks: since 2.10
884 # @muhenkan: since 2.12
885 # @katakanahiragana: since 2.12
890 # 'sysrq' was mistakenly added to hack around the fact that
891 # the ps2 driver was not generating correct scancodes sequences
892 # when 'alt+print' was pressed. This flaw is now fixed and the
893 # 'sysrq' key serves no further purpose. Any further use of
894 # 'sysrq' will be transparently changed to 'print', so they
895 # are effectively synonyms.
899 { 'enum': 'QKeyCode',
900 'data': [ 'unmapped',
901 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
902 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
903 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
904 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
905 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
906 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
907 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
908 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
909 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
910 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
911 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
912 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
913 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
914 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
915 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
916 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
917 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
918 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
919 'volumeup', 'volumedown', 'mediaselect',
920 'mail', 'calculator', 'computer',
921 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
929 { 'enum': 'KeyValueKind',
930 'data': [ 'number', 'qcode' ] }
937 { 'struct': 'IntWrapper',
938 'data': { 'data': 'int' } }
945 { 'struct': 'QKeyCodeWrapper',
946 'data': { 'data': 'QKeyCode' } }
951 # Represents a keyboard key.
955 { 'union': 'KeyValue',
956 'base': { 'type': 'KeyValueKind' },
957 'discriminator': 'type',
959 'number': 'IntWrapper',
960 'qcode': 'QKeyCodeWrapper' } }
965 # Send keys to guest.
967 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
968 # simultaneously sent to the guest. A @KeyValue.number value is sent
969 # directly to the guest, while @KeyValue.qcode must be a valid
972 # @hold-time: time to delay key up events, milliseconds. Defaults
975 # Returns: - Nothing on success
976 # - If key is unknown or redundant, InvalidParameter
982 # -> { "execute": "send-key",
983 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
984 # { "type": "qcode", "data": "alt" },
985 # { "type": "qcode", "data": "delete" } ] } }
986 # <- { "return": {} }
989 { 'command': 'send-key',
990 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
995 # Button of a pointer input device (mouse, tablet).
997 # @side: front side button of a 5-button mouse (since 2.9)
999 # @extra: rear side button of a 5-button mouse (since 2.9)
1003 { 'enum' : 'InputButton',
1004 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
1005 'extra', 'wheel-left', 'wheel-right' ] }
1010 # Position axis of a pointer input device (mouse, tablet).
1014 { 'enum' : 'InputAxis',
1015 'data' : [ 'x', 'y' ] }
1020 # Keyboard input event.
1022 # @key: Which key this event is for.
1023 # @down: True for key-down and false for key-up events.
1027 { 'struct' : 'InputKeyEvent',
1028 'data' : { 'key' : 'KeyValue',
1034 # Pointer button input event.
1036 # @button: Which button this event is for.
1037 # @down: True for key-down and false for key-up events.
1041 { 'struct' : 'InputBtnEvent',
1042 'data' : { 'button' : 'InputButton',
1048 # Pointer motion input event.
1050 # @axis: Which axis is referenced by @value.
1051 # @value: Pointer position. For absolute coordinates the
1052 # valid range is 0 -> 0x7ffff
1056 { 'struct' : 'InputMoveEvent',
1057 'data' : { 'axis' : 'InputAxis',
1065 { 'enum': 'InputEventKind',
1066 'data': [ 'key', 'btn', 'rel', 'abs' ] }
1069 # @InputKeyEventWrapper:
1073 { 'struct': 'InputKeyEventWrapper',
1074 'data': { 'data': 'InputKeyEvent' } }
1077 # @InputBtnEventWrapper:
1081 { 'struct': 'InputBtnEventWrapper',
1082 'data': { 'data': 'InputBtnEvent' } }
1085 # @InputMoveEventWrapper:
1089 { 'struct': 'InputMoveEventWrapper',
1090 'data': { 'data': 'InputMoveEvent' } }
1095 # Input event union.
1097 # @type: the input type, one of:
1099 # - 'key': Input event of Keyboard
1100 # - 'btn': Input event of pointer buttons
1101 # - 'rel': Input event of relative pointer motion
1102 # - 'abs': Input event of absolute pointer motion
1106 { 'union' : 'InputEvent',
1107 'base': { 'type': 'InputEventKind' },
1108 'discriminator': 'type',
1109 'data' : { 'key' : 'InputKeyEventWrapper',
1110 'btn' : 'InputBtnEventWrapper',
1111 'rel' : 'InputMoveEventWrapper',
1112 'abs' : 'InputMoveEventWrapper' } }
1115 # @input-send-event:
1117 # Send input event(s) to guest.
1119 # The @device and @head parameters can be used to send the input event
1120 # to specific input devices in case (a) multiple input devices of the
1121 # same kind are added to the virtual machine and (b) you have
1122 # configured input routing (see docs/multiseat.txt) for those input
1123 # devices. The parameters work exactly like the device and head
1124 # properties of input devices. If @device is missing, only devices
1125 # that have no input routing config are admissible. If @device is
1126 # specified, both input devices with and without input routing config
1127 # are admissible, but devices with input routing config take
1130 # @device: display device to send event(s) to.
1131 # @head: head to send event(s) to, in case the
1132 # display device supports multiple scanouts.
1133 # @events: List of InputEvent union.
1135 # Returns: Nothing on success.
1139 # Note: The consoles are visible in the qom tree, under
1140 # /backend/console[$index]. They have a device link and head property,
1141 # so it is possible to map which console belongs to which device and
1146 # 1. Press left mouse button.
1148 # -> { "execute": "input-send-event",
1149 # "arguments": { "device": "video0",
1150 # "events": [ { "type": "btn",
1151 # "data" : { "down": true, "button": "left" } } ] } }
1152 # <- { "return": {} }
1154 # -> { "execute": "input-send-event",
1155 # "arguments": { "device": "video0",
1156 # "events": [ { "type": "btn",
1157 # "data" : { "down": false, "button": "left" } } ] } }
1158 # <- { "return": {} }
1160 # 2. Press ctrl-alt-del.
1162 # -> { "execute": "input-send-event",
1163 # "arguments": { "events": [
1164 # { "type": "key", "data" : { "down": true,
1165 # "key": {"type": "qcode", "data": "ctrl" } } },
1166 # { "type": "key", "data" : { "down": true,
1167 # "key": {"type": "qcode", "data": "alt" } } },
1168 # { "type": "key", "data" : { "down": true,
1169 # "key": {"type": "qcode", "data": "delete" } } } ] } }
1170 # <- { "return": {} }
1172 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1174 # -> { "execute": "input-send-event" ,
1175 # "arguments": { "events": [
1176 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1177 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1178 # <- { "return": {} }
1181 { 'command': 'input-send-event',
1182 'data': { '*device': 'str',
1184 'events' : [ 'InputEvent' ] } }
1189 # GTK display options.
1191 # @grab-on-hover: Grab keyboard input on mouse hover.
1192 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1193 # turned off the host window will be resized instead.
1194 # In case the display device can notify the guest on
1195 # window resizes (virtio-gpu) this will default to "on",
1196 # assuming the guest will resize the display to match
1197 # the window size then. Otherwise it defaults to "off".
1202 { 'struct' : 'DisplayGTK',
1203 'data' : { '*grab-on-hover' : 'bool',
1204 '*zoom-to-fit' : 'bool' } }
1207 # @DisplayEGLHeadless:
1209 # EGL headless display options.
1211 # @rendernode: Which DRM render node should be used. Default is the first
1212 # available node on the host.
1216 { 'struct' : 'DisplayEGLHeadless',
1217 'data' : { '*rendernode' : 'str' } }
1222 # DBus display options.
1224 # @addr: The D-Bus bus address (default to the session bus).
1226 # @rendernode: Which DRM render node should be used. Default is the first
1227 # available node on the host.
1229 # @p2p: Whether to use peer-to-peer connections (accepted through
1232 # @audiodev: Use the specified DBus audiodev to export audio.
1236 { 'struct' : 'DisplayDBus',
1237 'data' : { '*rendernode' : 'str',
1240 '*audiodev': 'str' } }
1245 # Display OpenGL mode.
1247 # @off: Disable OpenGL (default).
1248 # @on: Use OpenGL, pick context type automatically.
1249 # Would better be named 'auto' but is called 'on' for backward
1250 # compatibility with bool type.
1251 # @core: Use OpenGL with Core (desktop) Context.
1252 # @es: Use OpenGL with ES (embedded systems) Context.
1256 { 'enum' : 'DisplayGLMode',
1257 'data' : [ 'off', 'on', 'core', 'es' ] }
1262 # Curses display options.
1264 # @charset: Font charset used by guest (default: CP437).
1268 { 'struct' : 'DisplayCurses',
1269 'data' : { '*charset' : 'str' } }
1274 # Cocoa display options.
1276 # @left-command-key: Enable/disable forwarding of left command key to
1277 # guest. Allows command-tab window switching on the
1278 # host without sending this key to the guest when
1279 # "off". Defaults to "on"
1281 # @full-grab: Capture all key presses, including system combos. This
1282 # requires accessibility permissions, since it performs
1283 # a global grab on key events. (default: off)
1284 # See https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1286 # @swap-opt-cmd: Swap the Option and Command keys so that their key codes match
1287 # their position on non-Mac keyboards and you can use Meta/Super
1288 # and Alt where you expect them. (default: off)
1292 { 'struct': 'DisplayCocoa',
1294 '*left-command-key': 'bool',
1295 '*full-grab': 'bool',
1296 '*swap-opt-cmd': 'bool'
1302 # Display (user interface) type.
1304 # @default: The default user interface, selecting from the first available
1305 # of gtk, sdl, cocoa, and vnc.
1307 # @none: No user interface or video output display. The guest will
1308 # still see an emulated graphics card, but its output will not
1309 # be displayed to the QEMU user.
1311 # @gtk: The GTK user interface.
1313 # @sdl: The SDL user interface.
1315 # @egl-headless: No user interface, offload GL operations to a local
1316 # DRI device. Graphical display need to be paired with
1317 # VNC or Spice. (Since 3.1)
1319 # @curses: Display video output via curses. For graphics device
1320 # models which support a text mode, QEMU can display this
1321 # output using a curses/ncurses interface. Nothing is
1322 # displayed when the graphics device is in graphical mode or
1323 # if the graphics device does not support a text
1324 # mode. Generally only the VGA device models support text
1327 # @cocoa: The Cocoa user interface.
1329 # @spice-app: Set up a Spice server and run the default associated
1330 # application to connect to it. The server will redirect
1331 # the serial console and QEMU monitors. (Since 4.0)
1333 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1337 { 'enum' : 'DisplayType',
1339 { 'name': 'default' },
1341 { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1342 { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1343 { 'name': 'egl-headless',
1344 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1345 { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1346 { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1347 { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1348 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1355 # Display (user interface) options.
1357 # @type: Which DisplayType qemu should use.
1358 # @full-screen: Start user interface in fullscreen mode (default: off).
1359 # @window-close: Allow to quit qemu with window close button (default: on).
1360 # @show-cursor: Force showing the mouse cursor (default: off).
1362 # @gl: Enable OpenGL support (default: off).
1366 { 'union' : 'DisplayOptions',
1367 'base' : { 'type' : 'DisplayType',
1368 '*full-screen' : 'bool',
1369 '*window-close' : 'bool',
1370 '*show-cursor' : 'bool',
1371 '*gl' : 'DisplayGLMode' },
1372 'discriminator' : 'type',
1374 'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1375 'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1376 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1377 'egl-headless': { 'type': 'DisplayEGLHeadless',
1378 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1379 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' }
1384 # @query-display-options:
1386 # Returns information about display configuration
1388 # Returns: @DisplayOptions
1392 { 'command': 'query-display-options',
1393 'returns': 'DisplayOptions' }
1396 # @DisplayReloadType:
1398 # Available DisplayReload types.
1404 { 'enum': 'DisplayReloadType',
1408 # @DisplayReloadOptionsVNC:
1410 # Specify the VNC reload options.
1412 # @tls-certs: reload tls certs or not.
1416 { 'struct': 'DisplayReloadOptionsVNC',
1417 'data': { '*tls-certs': 'bool' } }
1420 # @DisplayReloadOptions:
1422 # Options of the display configuration reload.
1424 # @type: Specify the display type.
1428 { 'union': 'DisplayReloadOptions',
1429 'base': {'type': 'DisplayReloadType'},
1430 'discriminator': 'type',
1431 'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1436 # Reload display configuration.
1438 # Returns: Nothing on success.
1444 # -> { "execute": "display-reload",
1445 # "arguments": { "type": "vnc", "tls-certs": true } }
1446 # <- { "return": {} }
1449 { 'command': 'display-reload',
1450 'data': 'DisplayReloadOptions',
1454 # @DisplayUpdateType:
1456 # Available DisplayUpdate types.
1462 { 'enum': 'DisplayUpdateType',
1466 # @DisplayUpdateOptionsVNC:
1468 # Specify the VNC reload options.
1470 # @addresses: If specified, change set of addresses
1471 # to listen for connections. Addresses configured
1472 # for websockets are not touched.
1476 { 'struct': 'DisplayUpdateOptionsVNC',
1477 'data': { '*addresses': ['SocketAddress'] } }
1480 # @DisplayUpdateOptions:
1482 # Options of the display configuration reload.
1484 # @type: Specify the display type.
1488 { 'union': 'DisplayUpdateOptions',
1489 'base': {'type': 'DisplayUpdateType'},
1490 'discriminator': 'type',
1491 'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1496 # Update display configuration.
1498 # Returns: Nothing on success.
1504 # -> { "execute": "display-update",
1505 # "arguments": { "type": "vnc", "addresses":
1506 # [ { "type": "inet", "host": "0.0.0.0",
1507 # "port": "5901" } ] } }
1508 # <- { "return": {} }
1511 { 'command': 'display-update',
1512 'data': 'DisplayUpdateOptions',