9 { 'include': 'common.json' }
10 { 'include': 'sockets.json' }
15 # Display protocols which support changing password options.
20 { 'enum': 'DisplayProtocol',
21 'data': [ 'vnc', 'spice' ] }
26 # An action to take on changing a password on a connection with active clients.
28 # @keep: maintain existing clients
30 # @fail: fail the command if clients are connected
32 # @disconnect: disconnect existing clients
37 { 'enum': 'SetPasswordAction',
38 'data': [ 'keep', 'fail', 'disconnect' ] }
41 # @SetPasswordOptions:
43 # Options for set_password.
45 # @protocol: - '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'.
52 # For VNC, only 'keep' is currently implemented.
57 { 'union': 'SetPasswordOptions',
58 'base': { 'protocol': 'DisplayProtocol',
60 '*connected': 'SetPasswordAction' },
61 'discriminator': 'protocol',
62 'data': { 'vnc': 'SetPasswordOptionsVnc' } }
65 # @SetPasswordOptionsVnc:
67 # Options for set_password specific to the VNC procotol.
69 # @display: The id of the display where the password should be changed.
70 # Defaults to the first.
75 { 'struct': 'SetPasswordOptionsVnc',
76 'data': { '*display': 'str' } }
81 # Set the password of a remote display server.
83 # Returns: - Nothing on success
84 # - If Spice is not enabled, DeviceNotFound
90 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
91 # "password": "secret" } }
95 { 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
98 # @ExpirePasswordOptions:
100 # General options for expire_password.
102 # @protocol: - 'vnc' to modify the VNC server expiration
103 # - 'spice' to modify the Spice server expiration
105 # @time: when to expire the password.
107 # - 'now' to expire the password immediately
108 # - 'never' to cancel password expiration
109 # - '+INT' where INT is the number of seconds from now (integer)
110 # - 'INT' where INT is the absolute time in seconds
112 # Notes: Time is relative to the server and currently there is no way to
113 # coordinate server time with client time. It is not recommended to
114 # use the absolute time version of the @time parameter unless you're
115 # sure you are on the same machine as the QEMU instance.
120 { 'union': 'ExpirePasswordOptions',
121 'base': { 'protocol': 'DisplayProtocol',
123 'discriminator': 'protocol',
124 'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
127 # @ExpirePasswordOptionsVnc:
129 # Options for expire_password specific to the VNC procotol.
131 # @display: The id of the display where the expiration should be changed.
132 # Defaults to the first.
138 { 'struct': 'ExpirePasswordOptionsVnc',
139 'data': { '*display': 'str' } }
144 # Expire the password of a remote display server.
146 # Returns: - Nothing on success
147 # - If @protocol is 'spice' and Spice is not active, DeviceNotFound
153 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
155 # <- { "return": {} }
158 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
163 # Write a PPM of the VGA screen to a file.
165 # @filename: the path of a new PPM file to store the image
167 # @device: ID of the display device that should be dumped. If this parameter
168 # is missing, the primary display will be used. (Since 2.12)
170 # @head: head to use in case the device supports multiple heads. If this
171 # parameter is missing, head #0 will be used. Also note that the head
172 # can only be specified in conjunction with the device ID. (Since 2.12)
174 # Returns: Nothing on success
180 # -> { "execute": "screendump",
181 # "arguments": { "filename": "/tmp/image" } }
182 # <- { "return": {} }
185 { 'command': 'screendump',
186 'data': {'filename': 'str', '*device': 'str', '*head': 'int'},
196 # The basic information for SPICE network connection
202 # @family: address family
206 { 'struct': 'SpiceBasicInfo',
207 'data': { 'host': 'str',
209 'family': 'NetworkAddressFamily' },
210 'if': 'CONFIG_SPICE' }
215 # Information about a SPICE server
217 # @auth: authentication method
221 { 'struct': 'SpiceServerInfo',
222 'base': 'SpiceBasicInfo',
223 'data': { '*auth': 'str' },
224 'if': 'CONFIG_SPICE' }
229 # Information about a SPICE client channel.
231 # @connection-id: SPICE connection id number. All channels with the same id
232 # belong to the same SPICE session.
234 # @channel-type: SPICE channel type number. "1" is the main control
235 # channel, filter for this one if you want to track spice
238 # @channel-id: SPICE channel ID number. Usually "0", might be different when
239 # multiple channels of the same type exist, such as multiple
240 # display channels in a multihead setup
242 # @tls: true if the channel is encrypted, false otherwise.
246 { 'struct': 'SpiceChannel',
247 'base': 'SpiceBasicInfo',
248 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
250 'if': 'CONFIG_SPICE' }
253 # @SpiceQueryMouseMode:
255 # An enumeration of Spice mouse states.
257 # @client: Mouse cursor position is determined by the client.
259 # @server: Mouse cursor position is determined by the server.
261 # @unknown: No information is available about mouse mode used by
264 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
268 { 'enum': 'SpiceQueryMouseMode',
269 'data': [ 'client', 'server', 'unknown' ],
270 'if': 'CONFIG_SPICE' }
275 # Information about the SPICE session.
277 # @enabled: true if the SPICE server is enabled, false otherwise
279 # @migrated: true if the last guest migration completed and spice
280 # migration had completed as well. false otherwise. (since 1.4)
282 # @host: The hostname the SPICE server is bound to. This depends on
283 # the name resolution on the host and may be an IP address.
285 # @port: The SPICE server's port number.
287 # @compiled-version: SPICE server version.
289 # @tls-port: The SPICE server's TLS port number.
291 # @auth: the current authentication type used by the server
293 # - 'none' if no authentication is being used
294 # - 'spice' uses SASL or direct TLS authentication, depending on command
297 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
298 # be determined by the client or the server, or unknown if spice
299 # server doesn't provide this information. (since: 1.1)
301 # @channels: a list of @SpiceChannel for each active spice channel
305 { 'struct': 'SpiceInfo',
306 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
307 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
308 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
309 'if': 'CONFIG_SPICE' }
314 # Returns information about the current SPICE server
316 # Returns: @SpiceInfo
322 # -> { "execute": "query-spice" }
334 # "connection-id": 1804289383,
335 # "host": "127.0.0.1",
343 # "connection-id": 1804289383,
344 # "host": "127.0.0.1",
348 # [ ... more channels follow ... ]
354 { 'command': 'query-spice', 'returns': 'SpiceInfo',
355 'if': 'CONFIG_SPICE' }
360 # Emitted when a SPICE client establishes a connection
362 # @server: server information
364 # @client: client information
370 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
371 # "event": "SPICE_CONNECTED",
373 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
374 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
378 { 'event': 'SPICE_CONNECTED',
379 'data': { 'server': 'SpiceBasicInfo',
380 'client': 'SpiceBasicInfo' },
381 'if': 'CONFIG_SPICE' }
384 # @SPICE_INITIALIZED:
386 # Emitted after initial handshake and authentication takes place (if any)
387 # and the SPICE channel is up and running
389 # @server: server information
391 # @client: client information
397 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
398 # "event": "SPICE_INITIALIZED",
399 # "data": {"server": {"auth": "spice", "port": "5921",
400 # "family": "ipv4", "host": "127.0.0.1"},
401 # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
402 # "connection-id": 1804289383, "host": "127.0.0.1",
403 # "channel-id": 0, "tls": true}
407 { 'event': 'SPICE_INITIALIZED',
408 'data': { 'server': 'SpiceServerInfo',
409 'client': 'SpiceChannel' },
410 'if': 'CONFIG_SPICE' }
413 # @SPICE_DISCONNECTED:
415 # Emitted when the SPICE connection is closed
417 # @server: server information
419 # @client: client information
425 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
426 # "event": "SPICE_DISCONNECTED",
428 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
429 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
433 { 'event': 'SPICE_DISCONNECTED',
434 'data': { 'server': 'SpiceBasicInfo',
435 'client': 'SpiceBasicInfo' },
436 'if': 'CONFIG_SPICE' }
439 # @SPICE_MIGRATE_COMPLETED:
441 # Emitted when SPICE migration has completed
447 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
448 # "event": "SPICE_MIGRATE_COMPLETED" }
451 { 'event': 'SPICE_MIGRATE_COMPLETED',
452 'if': 'CONFIG_SPICE' }
461 # The basic information for vnc network connection
465 # @service: The service name of the vnc port. This may depend on the host
466 # system's service database so symbolic names should not be relied
469 # @family: address family
471 # @websocket: true in case the socket is a websocket (since 2.3).
475 { 'struct': 'VncBasicInfo',
476 'data': { 'host': 'str',
478 'family': 'NetworkAddressFamily',
479 'websocket': 'bool' },
485 # The network connection information for server
487 # @auth: authentication method used for
488 # the plain (non-websocket) VNC server
492 { 'struct': 'VncServerInfo',
493 'base': 'VncBasicInfo',
494 'data': { '*auth': 'str' },
500 # Information about a connected VNC client.
502 # @x509_dname: If x509 authentication is in use, the Distinguished
503 # Name of the client.
505 # @sasl_username: If SASL authentication is in use, the SASL username
506 # used for authentication.
510 { 'struct': 'VncClientInfo',
511 'base': 'VncBasicInfo',
512 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
518 # Information about the VNC session.
520 # @enabled: true if the VNC server is enabled, false otherwise
522 # @host: The hostname the VNC server is bound to. This depends on
523 # the name resolution on the host and may be an IP address.
525 # @family: - 'ipv6' if the host is listening for IPv6 connections
526 # - 'ipv4' if the host is listening for IPv4 connections
527 # - 'unix' if the host is listening on a unix domain socket
528 # - 'unknown' otherwise
530 # @service: The service name of the server's port. This may depends
531 # on the host system's service database so symbolic names should not
534 # @auth: the current authentication type used by the server
536 # - 'none' if no authentication is being used
537 # - 'vnc' if VNC authentication is being used
538 # - 'vencrypt+plain' if VEncrypt is used with plain text authentication
539 # - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
540 # - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
541 # - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
542 # - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
543 # - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
544 # - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
545 # - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
546 # - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
548 # @clients: a list of @VncClientInfo of all currently connected clients
552 { 'struct': 'VncInfo',
553 'data': {'enabled': 'bool', '*host': 'str',
554 '*family': 'NetworkAddressFamily',
555 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
561 # vnc primary authentication method.
565 { 'enum': 'VncPrimaryAuth',
566 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
567 'tls', 'vencrypt', 'sasl' ],
571 # @VncVencryptSubAuth:
573 # vnc sub authentication method with vencrypt.
577 { 'enum': 'VncVencryptSubAuth',
579 'tls-none', 'x509-none',
580 'tls-vnc', 'x509-vnc',
581 'tls-plain', 'x509-plain',
582 'tls-sasl', 'x509-sasl' ],
588 # The network connection information for server
590 # @auth: The current authentication type used by the servers
592 # @vencrypt: The vencrypt sub authentication type used by the
593 # servers, only specified in case auth == vencrypt.
597 { 'struct': 'VncServerInfo2',
598 'base': 'VncBasicInfo',
599 'data': { 'auth' : 'VncPrimaryAuth',
600 '*vencrypt' : 'VncVencryptSubAuth' },
606 # Information about a vnc server
608 # @id: vnc server name.
610 # @server: A list of @VncBasincInfo describing all listening sockets.
611 # The list can be empty (in case the vnc server is disabled).
612 # It also may have multiple entries: normal + websocket,
613 # possibly also ipv4 + ipv6 in the future.
615 # @clients: A list of @VncClientInfo of all currently connected clients.
616 # The list can be empty, for obvious reasons.
618 # @auth: The current authentication type used by the non-websockets servers
620 # @vencrypt: The vencrypt authentication type used by the servers,
621 # only specified in case auth == vencrypt.
623 # @display: The display device the vnc server is linked to.
627 { 'struct': 'VncInfo2',
628 'data': { 'id' : 'str',
629 'server' : ['VncServerInfo2'],
630 'clients' : ['VncClientInfo'],
631 'auth' : 'VncPrimaryAuth',
632 '*vencrypt' : 'VncVencryptSubAuth',
633 '*display' : 'str' },
639 # Returns information about the current VNC server
647 # -> { "execute": "query-vnc" }
656 # "host":"127.0.0.1",
665 { 'command': 'query-vnc', 'returns': 'VncInfo',
668 # @query-vnc-servers:
670 # Returns a list of vnc servers. The list can be empty.
672 # Returns: a list of @VncInfo2
676 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
680 # @change-vnc-password:
682 # Change the VNC server password.
684 # @password: the new password to use with VNC authentication
688 # Notes: An empty password in this command will set the password to the empty
689 # string. Existing clients are unaffected by executing this command.
691 { 'command': 'change-vnc-password',
692 'data': { 'password': 'str' },
698 # Emitted when a VNC client establishes a connection
700 # @server: server information
702 # @client: client information
704 # Note: This event is emitted before any authentication takes place, thus
705 # the authentication ID is not provided
711 # <- { "event": "VNC_CONNECTED",
713 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
714 # "service": "5901", "host": "0.0.0.0" },
715 # "client": { "family": "ipv4", "service": "58425",
716 # "host": "127.0.0.1", "websocket": false } },
717 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
720 { 'event': 'VNC_CONNECTED',
721 'data': { 'server': 'VncServerInfo',
722 'client': 'VncBasicInfo' },
728 # Emitted after authentication takes place (if any) and the VNC session is
731 # @server: server information
733 # @client: client information
739 # <- { "event": "VNC_INITIALIZED",
741 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
742 # "service": "5901", "host": "0.0.0.0"},
743 # "client": { "family": "ipv4", "service": "46089", "websocket": false,
744 # "host": "127.0.0.1", "sasl_username": "luiz" } },
745 # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
748 { 'event': 'VNC_INITIALIZED',
749 'data': { 'server': 'VncServerInfo',
750 'client': 'VncClientInfo' },
756 # Emitted when the connection is closed
758 # @server: server information
760 # @client: client information
766 # <- { "event": "VNC_DISCONNECTED",
768 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
769 # "service": "5901", "host": "0.0.0.0" },
770 # "client": { "family": "ipv4", "service": "58425", "websocket": false,
771 # "host": "127.0.0.1", "sasl_username": "luiz" } },
772 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
775 { 'event': 'VNC_DISCONNECTED',
776 'data': { 'server': 'VncServerInfo',
777 'client': 'VncClientInfo' },
787 # Information about a mouse device.
789 # @name: the name of the mouse device
791 # @index: the index of the mouse device
793 # @current: true if this device is currently receiving mouse events
795 # @absolute: true if this device supports absolute coordinates as input
799 { 'struct': 'MouseInfo',
800 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
801 'absolute': 'bool'} }
806 # Returns information about each active mouse device
808 # Returns: a list of @MouseInfo for each device
814 # -> { "execute": "query-mice" }
817 # "name":"QEMU Microsoft Mouse",
823 # "name":"QEMU PS/2 Mouse",
832 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
837 # An enumeration of key name.
839 # This is used by the @send-key command.
841 # @unmapped: since 2.0
844 # @kp_comma: since 2.4
845 # @kp_equals: since 2.6
847 # @hiragana: since 2.9
853 # @audionext: since 2.10
854 # @audioprev: since 2.10
855 # @audiostop: since 2.10
856 # @audioplay: since 2.10
857 # @audiomute: since 2.10
858 # @volumeup: since 2.10
859 # @volumedown: since 2.10
860 # @mediaselect: since 2.10
862 # @calculator: since 2.10
863 # @computer: since 2.10
864 # @ac_home: since 2.10
865 # @ac_back: since 2.10
866 # @ac_forward: since 2.10
867 # @ac_refresh: since 2.10
868 # @ac_bookmarks: since 2.10
870 # @muhenkan: since 2.12
871 # @katakanahiragana: since 2.12
876 # 'sysrq' was mistakenly added to hack around the fact that
877 # the ps2 driver was not generating correct scancodes sequences
878 # when 'alt+print' was pressed. This flaw is now fixed and the
879 # 'sysrq' key serves no further purpose. Any further use of
880 # 'sysrq' will be transparently changed to 'print', so they
881 # are effectively synonyms.
886 { 'enum': 'QKeyCode',
887 'data': [ 'unmapped',
888 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
889 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
890 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
891 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
892 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
893 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
894 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
895 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
896 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
897 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
898 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
899 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
900 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
901 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
902 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
903 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
904 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
905 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
906 'volumeup', 'volumedown', 'mediaselect',
907 'mail', 'calculator', 'computer',
908 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
916 { 'enum': 'KeyValueKind',
917 'data': [ 'number', 'qcode' ] }
924 { 'struct': 'IntWrapper',
925 'data': { 'data': 'int' } }
932 { 'struct': 'QKeyCodeWrapper',
933 'data': { 'data': 'QKeyCode' } }
938 # Represents a keyboard key.
942 { 'union': 'KeyValue',
943 'base': { 'type': 'KeyValueKind' },
944 'discriminator': 'type',
946 'number': 'IntWrapper',
947 'qcode': 'QKeyCodeWrapper' } }
952 # Send keys to guest.
954 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
955 # simultaneously sent to the guest. A @KeyValue.number value is sent
956 # directly to the guest, while @KeyValue.qcode must be a valid
959 # @hold-time: time to delay key up events, milliseconds. Defaults
962 # Returns: - Nothing on success
963 # - If key is unknown or redundant, InvalidParameter
969 # -> { "execute": "send-key",
970 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
971 # { "type": "qcode", "data": "alt" },
972 # { "type": "qcode", "data": "delete" } ] } }
973 # <- { "return": {} }
976 { 'command': 'send-key',
977 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
982 # Button of a pointer input device (mouse, tablet).
984 # @side: front side button of a 5-button mouse (since 2.9)
986 # @extra: rear side button of a 5-button mouse (since 2.9)
990 { 'enum' : 'InputButton',
991 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
992 'extra', 'wheel-left', 'wheel-right' ] }
997 # Position axis of a pointer input device (mouse, tablet).
1001 { 'enum' : 'InputAxis',
1002 'data' : [ 'x', 'y' ] }
1007 # Keyboard input event.
1009 # @key: Which key this event is for.
1010 # @down: True for key-down and false for key-up events.
1014 { 'struct' : 'InputKeyEvent',
1015 'data' : { 'key' : 'KeyValue',
1021 # Pointer button input event.
1023 # @button: Which button this event is for.
1024 # @down: True for key-down and false for key-up events.
1028 { 'struct' : 'InputBtnEvent',
1029 'data' : { 'button' : 'InputButton',
1035 # Pointer motion input event.
1037 # @axis: Which axis is referenced by @value.
1038 # @value: Pointer position. For absolute coordinates the
1039 # valid range is 0 -> 0x7ffff
1043 { 'struct' : 'InputMoveEvent',
1044 'data' : { 'axis' : 'InputAxis',
1052 { 'enum': 'InputEventKind',
1053 'data': [ 'key', 'btn', 'rel', 'abs' ] }
1056 # @InputKeyEventWrapper:
1060 { 'struct': 'InputKeyEventWrapper',
1061 'data': { 'data': 'InputKeyEvent' } }
1064 # @InputBtnEventWrapper:
1068 { 'struct': 'InputBtnEventWrapper',
1069 'data': { 'data': 'InputBtnEvent' } }
1072 # @InputMoveEventWrapper:
1076 { 'struct': 'InputMoveEventWrapper',
1077 'data': { 'data': 'InputMoveEvent' } }
1082 # Input event union.
1084 # @type: the input type, one of:
1086 # - 'key': Input event of Keyboard
1087 # - 'btn': Input event of pointer buttons
1088 # - 'rel': Input event of relative pointer motion
1089 # - 'abs': Input event of absolute pointer motion
1093 { 'union' : 'InputEvent',
1094 'base': { 'type': 'InputEventKind' },
1095 'discriminator': 'type',
1096 'data' : { 'key' : 'InputKeyEventWrapper',
1097 'btn' : 'InputBtnEventWrapper',
1098 'rel' : 'InputMoveEventWrapper',
1099 'abs' : 'InputMoveEventWrapper' } }
1102 # @input-send-event:
1104 # Send input event(s) to guest.
1106 # The @device and @head parameters can be used to send the input event
1107 # to specific input devices in case (a) multiple input devices of the
1108 # same kind are added to the virtual machine and (b) you have
1109 # configured input routing (see docs/multiseat.txt) for those input
1110 # devices. The parameters work exactly like the device and head
1111 # properties of input devices. If @device is missing, only devices
1112 # that have no input routing config are admissible. If @device is
1113 # specified, both input devices with and without input routing config
1114 # are admissible, but devices with input routing config take
1117 # @device: display device to send event(s) to.
1118 # @head: head to send event(s) to, in case the
1119 # display device supports multiple scanouts.
1120 # @events: List of InputEvent union.
1122 # Returns: Nothing on success.
1126 # Note: The consoles are visible in the qom tree, under
1127 # /backend/console[$index]. They have a device link and head property,
1128 # so it is possible to map which console belongs to which device and
1133 # 1. Press left mouse button.
1135 # -> { "execute": "input-send-event",
1136 # "arguments": { "device": "video0",
1137 # "events": [ { "type": "btn",
1138 # "data" : { "down": true, "button": "left" } } ] } }
1139 # <- { "return": {} }
1141 # -> { "execute": "input-send-event",
1142 # "arguments": { "device": "video0",
1143 # "events": [ { "type": "btn",
1144 # "data" : { "down": false, "button": "left" } } ] } }
1145 # <- { "return": {} }
1147 # 2. Press ctrl-alt-del.
1149 # -> { "execute": "input-send-event",
1150 # "arguments": { "events": [
1151 # { "type": "key", "data" : { "down": true,
1152 # "key": {"type": "qcode", "data": "ctrl" } } },
1153 # { "type": "key", "data" : { "down": true,
1154 # "key": {"type": "qcode", "data": "alt" } } },
1155 # { "type": "key", "data" : { "down": true,
1156 # "key": {"type": "qcode", "data": "delete" } } } ] } }
1157 # <- { "return": {} }
1159 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1161 # -> { "execute": "input-send-event" ,
1162 # "arguments": { "events": [
1163 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1164 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1165 # <- { "return": {} }
1168 { 'command': 'input-send-event',
1169 'data': { '*device': 'str',
1171 'events' : [ 'InputEvent' ] } }
1176 # GTK display options.
1178 # @grab-on-hover: Grab keyboard input on mouse hover.
1179 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1180 # turned off the host window will be resized instead.
1181 # In case the display device can notify the guest on
1182 # window resizes (virtio-gpu) this will default to "on",
1183 # assuming the guest will resize the display to match
1184 # the window size then. Otherwise it defaults to "off".
1190 { 'struct' : 'DisplayGTK',
1191 'data' : { '*grab-on-hover' : 'bool',
1192 '*zoom-to-fit' : 'bool' } }
1195 # @DisplayEGLHeadless:
1197 # EGL headless display options.
1199 # @rendernode: Which DRM render node should be used. Default is the first
1200 # available node on the host.
1205 { 'struct' : 'DisplayEGLHeadless',
1206 'data' : { '*rendernode' : 'str' } }
1211 # DBus display options.
1213 # @addr: The D-Bus bus address (default to the session bus).
1215 # @rendernode: Which DRM render node should be used. Default is the first
1216 # available node on the host.
1218 # @p2p: Whether to use peer-to-peer connections (accepted through
1221 # @audiodev: Use the specified DBus audiodev to export audio.
1226 { 'struct' : 'DisplayDBus',
1227 'data' : { '*rendernode' : 'str',
1230 '*audiodev': 'str' } }
1235 # Display OpenGL mode.
1237 # @off: Disable OpenGL (default).
1238 # @on: Use OpenGL, pick context type automatically.
1239 # Would better be named 'auto' but is called 'on' for backward
1240 # compatibility with bool type.
1241 # @core: Use OpenGL with Core (desktop) Context.
1242 # @es: Use OpenGL with ES (embedded systems) Context.
1247 { 'enum' : 'DisplayGLMode',
1248 'data' : [ 'off', 'on', 'core', 'es' ] }
1253 # Curses display options.
1255 # @charset: Font charset used by guest (default: CP437).
1260 { 'struct' : 'DisplayCurses',
1261 'data' : { '*charset' : 'str' } }
1266 # Cocoa display options.
1268 # @left-command-key: Enable/disable forwarding of left command key to
1269 # guest. Allows command-tab window switching on the
1270 # host without sending this key to the guest when
1271 # "off". Defaults to "on"
1273 # @full-grab: Capture all key presses, including system combos. This
1274 # requires accessibility permissions, since it performs
1275 # a global grab on key events. (default: off)
1276 # See https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1278 # @swap-opt-cmd: Swap the Option and Command keys so that their key codes match
1279 # their position on non-Mac keyboards and you can use Meta/Super
1280 # and Alt where you expect them. (default: off)
1284 { 'struct': 'DisplayCocoa',
1286 '*left-command-key': 'bool',
1287 '*full-grab': 'bool',
1288 '*swap-opt-cmd': 'bool'
1294 # Display (user interface) type.
1296 # @default: The default user interface, selecting from the first available
1297 # of gtk, sdl, cocoa, and vnc.
1299 # @none: No user interface or video output display. The guest will
1300 # still see an emulated graphics card, but its output will not
1301 # be displayed to the QEMU user.
1303 # @gtk: The GTK user interface.
1305 # @sdl: The SDL user interface.
1307 # @egl-headless: No user interface, offload GL operations to a local
1308 # DRI device. Graphical display need to be paired with
1309 # VNC or Spice. (Since 3.1)
1311 # @curses: Display video output via curses. For graphics device
1312 # models which support a text mode, QEMU can display this
1313 # output using a curses/ncurses interface. Nothing is
1314 # displayed when the graphics device is in graphical mode or
1315 # if the graphics device does not support a text
1316 # mode. Generally only the VGA device models support text
1319 # @cocoa: The Cocoa user interface.
1321 # @spice-app: Set up a Spice server and run the default associated
1322 # application to connect to it. The server will redirect
1323 # the serial console and QEMU monitors. (Since 4.0)
1325 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1330 { 'enum' : 'DisplayType',
1332 { 'name': 'default' },
1334 { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1335 { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1336 { 'name': 'egl-headless',
1337 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1338 { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1339 { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1340 { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1341 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1348 # Display (user interface) options.
1350 # @type: Which DisplayType qemu should use.
1351 # @full-screen: Start user interface in fullscreen mode (default: off).
1352 # @window-close: Allow to quit qemu with window close button (default: on).
1353 # @show-cursor: Force showing the mouse cursor (default: off).
1355 # @gl: Enable OpenGL support (default: off).
1360 { 'union' : 'DisplayOptions',
1361 'base' : { 'type' : 'DisplayType',
1362 '*full-screen' : 'bool',
1363 '*window-close' : 'bool',
1364 '*show-cursor' : 'bool',
1365 '*gl' : 'DisplayGLMode' },
1366 'discriminator' : 'type',
1368 'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1369 'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1370 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1371 'egl-headless': { 'type': 'DisplayEGLHeadless',
1372 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1373 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' }
1378 # @query-display-options:
1380 # Returns information about display configuration
1382 # Returns: @DisplayOptions
1387 { 'command': 'query-display-options',
1388 'returns': 'DisplayOptions' }
1391 # @DisplayReloadType:
1393 # Available DisplayReload types.
1400 { 'enum': 'DisplayReloadType',
1404 # @DisplayReloadOptionsVNC:
1406 # Specify the VNC reload options.
1408 # @tls-certs: reload tls certs or not.
1413 { 'struct': 'DisplayReloadOptionsVNC',
1414 'data': { '*tls-certs': 'bool' } }
1417 # @DisplayReloadOptions:
1419 # Options of the display configuration reload.
1421 # @type: Specify the display type.
1426 { 'union': 'DisplayReloadOptions',
1427 'base': {'type': 'DisplayReloadType'},
1428 'discriminator': 'type',
1429 'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1434 # Reload display configuration.
1436 # Returns: Nothing on success.
1442 # -> { "execute": "display-reload",
1443 # "arguments": { "type": "vnc", "tls-certs": true } }
1444 # <- { "return": {} }
1447 { 'command': 'display-reload',
1448 'data': 'DisplayReloadOptions',