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.
131 { 'struct': 'ExpirePasswordOptionsVnc',
132 'data': { '*display': 'str' } }
137 # Expire the password of a remote display server.
139 # Returns: - Nothing on success
140 # - If @protocol is 'spice' and Spice is not active, DeviceNotFound
146 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
148 # <- { "return": {} }
151 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
156 # Supported image format types.
164 { 'enum': 'ImageFormat',
165 'data': ['ppm', 'png'] }
170 # Capture the contents of a screen and write it to a file.
172 # @filename: the path of a new file to store the image
174 # @device: ID of the display device that should be dumped. If this parameter
175 # is missing, the primary display will be used. (Since 2.12)
177 # @head: head to use in case the device supports multiple heads. If this
178 # parameter is missing, head #0 will be used. Also note that the head
179 # can only be specified in conjunction with the device ID. (Since 2.12)
181 # @format: image format for screendump. (default: ppm) (Since 7.1)
183 # Returns: Nothing on success
189 # -> { "execute": "screendump",
190 # "arguments": { "filename": "/tmp/image" } }
191 # <- { "return": {} }
194 { 'command': 'screendump',
195 'data': {'filename': 'str', '*device': 'str', '*head': 'int',
196 '*format': 'ImageFormat'},
206 # The basic information for SPICE network connection
212 # @family: address family
216 { 'struct': 'SpiceBasicInfo',
217 'data': { 'host': 'str',
219 'family': 'NetworkAddressFamily' },
220 'if': 'CONFIG_SPICE' }
225 # Information about a SPICE server
227 # @auth: authentication method
231 { 'struct': 'SpiceServerInfo',
232 'base': 'SpiceBasicInfo',
233 'data': { '*auth': 'str' },
234 'if': 'CONFIG_SPICE' }
239 # Information about a SPICE client channel.
241 # @connection-id: SPICE connection id number. All channels with the same id
242 # belong to the same SPICE session.
244 # @channel-type: SPICE channel type number. "1" is the main control
245 # channel, filter for this one if you want to track spice
248 # @channel-id: SPICE channel ID number. Usually "0", might be different when
249 # multiple channels of the same type exist, such as multiple
250 # display channels in a multihead setup
252 # @tls: true if the channel is encrypted, false otherwise.
256 { 'struct': 'SpiceChannel',
257 'base': 'SpiceBasicInfo',
258 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
260 'if': 'CONFIG_SPICE' }
263 # @SpiceQueryMouseMode:
265 # An enumeration of Spice mouse states.
267 # @client: Mouse cursor position is determined by the client.
269 # @server: Mouse cursor position is determined by the server.
271 # @unknown: No information is available about mouse mode used by
274 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
278 { 'enum': 'SpiceQueryMouseMode',
279 'data': [ 'client', 'server', 'unknown' ],
280 'if': 'CONFIG_SPICE' }
285 # Information about the SPICE session.
287 # @enabled: true if the SPICE server is enabled, false otherwise
289 # @migrated: true if the last guest migration completed and spice
290 # migration had completed as well. false otherwise. (since 1.4)
292 # @host: The hostname the SPICE server is bound to. This depends on
293 # the name resolution on the host and may be an IP address.
295 # @port: The SPICE server's port number.
297 # @compiled-version: SPICE server version.
299 # @tls-port: The SPICE server's TLS port number.
301 # @auth: the current authentication type used by the server
303 # - 'none' if no authentication is being used
304 # - 'spice' uses SASL or direct TLS authentication, depending on command
307 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
308 # be determined by the client or the server, or unknown if spice
309 # server doesn't provide this information. (since: 1.1)
311 # @channels: a list of @SpiceChannel for each active spice channel
315 { 'struct': 'SpiceInfo',
316 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
317 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
318 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
319 'if': 'CONFIG_SPICE' }
324 # Returns information about the current SPICE server
326 # Returns: @SpiceInfo
332 # -> { "execute": "query-spice" }
340 # "mouse-mode":"client",
346 # "connection-id": 1804289383,
347 # "host": "127.0.0.1",
355 # "connection-id": 1804289383,
356 # "host": "127.0.0.1",
360 # [ ... more channels follow ... ]
366 { 'command': 'query-spice', 'returns': 'SpiceInfo',
367 'if': 'CONFIG_SPICE' }
372 # Emitted when a SPICE client establishes a connection
374 # @server: server information
376 # @client: client information
382 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
383 # "event": "SPICE_CONNECTED",
385 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
386 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
390 { 'event': 'SPICE_CONNECTED',
391 'data': { 'server': 'SpiceBasicInfo',
392 'client': 'SpiceBasicInfo' },
393 'if': 'CONFIG_SPICE' }
396 # @SPICE_INITIALIZED:
398 # Emitted after initial handshake and authentication takes place (if any)
399 # and the SPICE channel is up and running
401 # @server: server information
403 # @client: client information
409 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
410 # "event": "SPICE_INITIALIZED",
411 # "data": {"server": {"auth": "spice", "port": "5921",
412 # "family": "ipv4", "host": "127.0.0.1"},
413 # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
414 # "connection-id": 1804289383, "host": "127.0.0.1",
415 # "channel-id": 0, "tls": true}
419 { 'event': 'SPICE_INITIALIZED',
420 'data': { 'server': 'SpiceServerInfo',
421 'client': 'SpiceChannel' },
422 'if': 'CONFIG_SPICE' }
425 # @SPICE_DISCONNECTED:
427 # Emitted when the SPICE connection is closed
429 # @server: server information
431 # @client: client information
437 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
438 # "event": "SPICE_DISCONNECTED",
440 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
441 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
445 { 'event': 'SPICE_DISCONNECTED',
446 'data': { 'server': 'SpiceBasicInfo',
447 'client': 'SpiceBasicInfo' },
448 'if': 'CONFIG_SPICE' }
451 # @SPICE_MIGRATE_COMPLETED:
453 # Emitted when SPICE migration has completed
459 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
460 # "event": "SPICE_MIGRATE_COMPLETED" }
463 { 'event': 'SPICE_MIGRATE_COMPLETED',
464 'if': 'CONFIG_SPICE' }
473 # The basic information for vnc network connection
477 # @service: The service name of the vnc port. This may depend on the host
478 # system's service database so symbolic names should not be relied
481 # @family: address family
483 # @websocket: true in case the socket is a websocket (since 2.3).
487 { 'struct': 'VncBasicInfo',
488 'data': { 'host': 'str',
490 'family': 'NetworkAddressFamily',
491 'websocket': 'bool' },
497 # The network connection information for server
499 # @auth: authentication method used for
500 # the plain (non-websocket) VNC server
504 { 'struct': 'VncServerInfo',
505 'base': 'VncBasicInfo',
506 'data': { '*auth': 'str' },
512 # Information about a connected VNC client.
514 # @x509_dname: If x509 authentication is in use, the Distinguished
515 # Name of the client.
517 # @sasl_username: If SASL authentication is in use, the SASL username
518 # used for authentication.
522 { 'struct': 'VncClientInfo',
523 'base': 'VncBasicInfo',
524 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
530 # Information about the VNC session.
532 # @enabled: true if the VNC server is enabled, false otherwise
534 # @host: The hostname the VNC server is bound to. This depends on
535 # the name resolution on the host and may be an IP address.
537 # @family: - 'ipv6' if the host is listening for IPv6 connections
538 # - 'ipv4' if the host is listening for IPv4 connections
539 # - 'unix' if the host is listening on a unix domain socket
540 # - 'unknown' otherwise
542 # @service: The service name of the server's port. This may depends
543 # on the host system's service database so symbolic names should not
546 # @auth: the current authentication type used by the server
548 # - 'none' if no authentication is being used
549 # - 'vnc' if VNC authentication is being used
550 # - 'vencrypt+plain' if VEncrypt is used with plain text authentication
551 # - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
552 # - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
553 # - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
554 # - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
555 # - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
556 # - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
557 # - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
558 # - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
560 # @clients: a list of @VncClientInfo of all currently connected clients
564 { 'struct': 'VncInfo',
565 'data': {'enabled': 'bool', '*host': 'str',
566 '*family': 'NetworkAddressFamily',
567 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
573 # vnc primary authentication method.
577 { 'enum': 'VncPrimaryAuth',
578 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
579 'tls', 'vencrypt', 'sasl' ],
583 # @VncVencryptSubAuth:
585 # vnc sub authentication method with vencrypt.
589 { 'enum': 'VncVencryptSubAuth',
591 'tls-none', 'x509-none',
592 'tls-vnc', 'x509-vnc',
593 'tls-plain', 'x509-plain',
594 'tls-sasl', 'x509-sasl' ],
600 # The network connection information for server
602 # @auth: The current authentication type used by the servers
604 # @vencrypt: The vencrypt sub authentication type used by the
605 # servers, only specified in case auth == vencrypt.
609 { 'struct': 'VncServerInfo2',
610 'base': 'VncBasicInfo',
611 'data': { 'auth' : 'VncPrimaryAuth',
612 '*vencrypt' : 'VncVencryptSubAuth' },
618 # Information about a vnc server
620 # @id: vnc server name.
622 # @server: A list of @VncBasincInfo describing all listening sockets.
623 # The list can be empty (in case the vnc server is disabled).
624 # It also may have multiple entries: normal + websocket,
625 # possibly also ipv4 + ipv6 in the future.
627 # @clients: A list of @VncClientInfo of all currently connected clients.
628 # The list can be empty, for obvious reasons.
630 # @auth: The current authentication type used by the non-websockets servers
632 # @vencrypt: The vencrypt authentication type used by the servers,
633 # only specified in case auth == vencrypt.
635 # @display: The display device the vnc server is linked to.
639 { 'struct': 'VncInfo2',
640 'data': { 'id' : 'str',
641 'server' : ['VncServerInfo2'],
642 'clients' : ['VncClientInfo'],
643 'auth' : 'VncPrimaryAuth',
644 '*vencrypt' : 'VncVencryptSubAuth',
645 '*display' : 'str' },
651 # Returns information about the current VNC server
659 # -> { "execute": "query-vnc" }
668 # "host":"127.0.0.1",
678 { 'command': 'query-vnc', 'returns': 'VncInfo',
681 # @query-vnc-servers:
683 # Returns a list of vnc servers. The list can be empty.
685 # Returns: a list of @VncInfo2
689 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
693 # @change-vnc-password:
695 # Change the VNC server password.
697 # @password: the new password to use with VNC authentication
701 # Notes: An empty password in this command will set the password to the empty
702 # string. Existing clients are unaffected by executing this command.
704 { 'command': 'change-vnc-password',
705 'data': { 'password': 'str' },
711 # Emitted when a VNC client establishes a connection
713 # @server: server information
715 # @client: client information
717 # Note: This event is emitted before any authentication takes place, thus
718 # the authentication ID is not provided
724 # <- { "event": "VNC_CONNECTED",
726 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
727 # "service": "5901", "host": "0.0.0.0" },
728 # "client": { "family": "ipv4", "service": "58425",
729 # "host": "127.0.0.1", "websocket": false } },
730 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
733 { 'event': 'VNC_CONNECTED',
734 'data': { 'server': 'VncServerInfo',
735 'client': 'VncBasicInfo' },
741 # Emitted after authentication takes place (if any) and the VNC session is
744 # @server: server information
746 # @client: client information
752 # <- { "event": "VNC_INITIALIZED",
754 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
755 # "service": "5901", "host": "0.0.0.0"},
756 # "client": { "family": "ipv4", "service": "46089", "websocket": false,
757 # "host": "127.0.0.1", "sasl_username": "luiz" } },
758 # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
761 { 'event': 'VNC_INITIALIZED',
762 'data': { 'server': 'VncServerInfo',
763 'client': 'VncClientInfo' },
769 # Emitted when the connection is closed
771 # @server: server information
773 # @client: client information
779 # <- { "event": "VNC_DISCONNECTED",
781 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
782 # "service": "5901", "host": "0.0.0.0" },
783 # "client": { "family": "ipv4", "service": "58425", "websocket": false,
784 # "host": "127.0.0.1", "sasl_username": "luiz" } },
785 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
788 { 'event': 'VNC_DISCONNECTED',
789 'data': { 'server': 'VncServerInfo',
790 'client': 'VncClientInfo' },
800 # Information about a mouse device.
802 # @name: the name of the mouse device
804 # @index: the index of the mouse device
806 # @current: true if this device is currently receiving mouse events
808 # @absolute: true if this device supports absolute coordinates as input
812 { 'struct': 'MouseInfo',
813 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
814 'absolute': 'bool'} }
819 # Returns information about each active mouse device
821 # Returns: a list of @MouseInfo for each device
827 # -> { "execute": "query-mice" }
830 # "name":"QEMU Microsoft Mouse",
836 # "name":"QEMU PS/2 Mouse",
845 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
850 # An enumeration of key name.
852 # This is used by the @send-key command.
854 # @unmapped: since 2.0
857 # @kp_comma: since 2.4
858 # @kp_equals: since 2.6
860 # @hiragana: since 2.9
866 # @audionext: since 2.10
867 # @audioprev: since 2.10
868 # @audiostop: since 2.10
869 # @audioplay: since 2.10
870 # @audiomute: since 2.10
871 # @volumeup: since 2.10
872 # @volumedown: since 2.10
873 # @mediaselect: since 2.10
875 # @calculator: since 2.10
876 # @computer: since 2.10
877 # @ac_home: since 2.10
878 # @ac_back: since 2.10
879 # @ac_forward: since 2.10
880 # @ac_refresh: since 2.10
881 # @ac_bookmarks: since 2.10
883 # @muhenkan: since 2.12
884 # @katakanahiragana: since 2.12
889 # 'sysrq' was mistakenly added to hack around the fact that
890 # the ps2 driver was not generating correct scancodes sequences
891 # when 'alt+print' was pressed. This flaw is now fixed and the
892 # 'sysrq' key serves no further purpose. Any further use of
893 # 'sysrq' will be transparently changed to 'print', so they
894 # are effectively synonyms.
898 { 'enum': 'QKeyCode',
899 'data': [ 'unmapped',
900 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
901 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
902 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
903 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
904 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
905 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
906 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
907 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
908 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
909 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
910 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
911 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
912 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
913 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
914 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
915 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
916 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
917 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
918 'volumeup', 'volumedown', 'mediaselect',
919 'mail', 'calculator', 'computer',
920 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
928 { 'enum': 'KeyValueKind',
929 'data': [ 'number', 'qcode' ] }
936 { 'struct': 'IntWrapper',
937 'data': { 'data': 'int' } }
944 { 'struct': 'QKeyCodeWrapper',
945 'data': { 'data': 'QKeyCode' } }
950 # Represents a keyboard key.
954 { 'union': 'KeyValue',
955 'base': { 'type': 'KeyValueKind' },
956 'discriminator': 'type',
958 'number': 'IntWrapper',
959 'qcode': 'QKeyCodeWrapper' } }
964 # Send keys to guest.
966 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
967 # simultaneously sent to the guest. A @KeyValue.number value is sent
968 # directly to the guest, while @KeyValue.qcode must be a valid
971 # @hold-time: time to delay key up events, milliseconds. Defaults
974 # Returns: - Nothing on success
975 # - If key is unknown or redundant, InvalidParameter
981 # -> { "execute": "send-key",
982 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
983 # { "type": "qcode", "data": "alt" },
984 # { "type": "qcode", "data": "delete" } ] } }
985 # <- { "return": {} }
988 { 'command': 'send-key',
989 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
994 # Button of a pointer input device (mouse, tablet).
996 # @side: front side button of a 5-button mouse (since 2.9)
998 # @extra: rear side button of a 5-button mouse (since 2.9)
1002 { 'enum' : 'InputButton',
1003 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
1004 'extra', 'wheel-left', 'wheel-right' ] }
1009 # Position axis of a pointer input device (mouse, tablet).
1013 { 'enum' : 'InputAxis',
1014 'data' : [ 'x', 'y' ] }
1019 # Keyboard input event.
1021 # @key: Which key this event is for.
1022 # @down: True for key-down and false for key-up events.
1026 { 'struct' : 'InputKeyEvent',
1027 'data' : { 'key' : 'KeyValue',
1033 # Pointer button input event.
1035 # @button: Which button this event is for.
1036 # @down: True for key-down and false for key-up events.
1040 { 'struct' : 'InputBtnEvent',
1041 'data' : { 'button' : 'InputButton',
1047 # Pointer motion input event.
1049 # @axis: Which axis is referenced by @value.
1050 # @value: Pointer position. For absolute coordinates the
1051 # valid range is 0 -> 0x7ffff
1055 { 'struct' : 'InputMoveEvent',
1056 'data' : { 'axis' : 'InputAxis',
1064 { 'enum': 'InputEventKind',
1065 'data': [ 'key', 'btn', 'rel', 'abs' ] }
1068 # @InputKeyEventWrapper:
1072 { 'struct': 'InputKeyEventWrapper',
1073 'data': { 'data': 'InputKeyEvent' } }
1076 # @InputBtnEventWrapper:
1080 { 'struct': 'InputBtnEventWrapper',
1081 'data': { 'data': 'InputBtnEvent' } }
1084 # @InputMoveEventWrapper:
1088 { 'struct': 'InputMoveEventWrapper',
1089 'data': { 'data': 'InputMoveEvent' } }
1094 # Input event union.
1096 # @type: the input type, one of:
1098 # - 'key': Input event of Keyboard
1099 # - 'btn': Input event of pointer buttons
1100 # - 'rel': Input event of relative pointer motion
1101 # - 'abs': Input event of absolute pointer motion
1105 { 'union' : 'InputEvent',
1106 'base': { 'type': 'InputEventKind' },
1107 'discriminator': 'type',
1108 'data' : { 'key' : 'InputKeyEventWrapper',
1109 'btn' : 'InputBtnEventWrapper',
1110 'rel' : 'InputMoveEventWrapper',
1111 'abs' : 'InputMoveEventWrapper' } }
1114 # @input-send-event:
1116 # Send input event(s) to guest.
1118 # The @device and @head parameters can be used to send the input event
1119 # to specific input devices in case (a) multiple input devices of the
1120 # same kind are added to the virtual machine and (b) you have
1121 # configured input routing (see docs/multiseat.txt) for those input
1122 # devices. The parameters work exactly like the device and head
1123 # properties of input devices. If @device is missing, only devices
1124 # that have no input routing config are admissible. If @device is
1125 # specified, both input devices with and without input routing config
1126 # are admissible, but devices with input routing config take
1129 # @device: display device to send event(s) to.
1130 # @head: head to send event(s) to, in case the
1131 # display device supports multiple scanouts.
1132 # @events: List of InputEvent union.
1134 # Returns: Nothing on success.
1138 # Note: The consoles are visible in the qom tree, under
1139 # /backend/console[$index]. They have a device link and head property,
1140 # so it is possible to map which console belongs to which device and
1145 # 1. Press left mouse button.
1147 # -> { "execute": "input-send-event",
1148 # "arguments": { "device": "video0",
1149 # "events": [ { "type": "btn",
1150 # "data" : { "down": true, "button": "left" } } ] } }
1151 # <- { "return": {} }
1153 # -> { "execute": "input-send-event",
1154 # "arguments": { "device": "video0",
1155 # "events": [ { "type": "btn",
1156 # "data" : { "down": false, "button": "left" } } ] } }
1157 # <- { "return": {} }
1159 # 2. Press ctrl-alt-del.
1161 # -> { "execute": "input-send-event",
1162 # "arguments": { "events": [
1163 # { "type": "key", "data" : { "down": true,
1164 # "key": {"type": "qcode", "data": "ctrl" } } },
1165 # { "type": "key", "data" : { "down": true,
1166 # "key": {"type": "qcode", "data": "alt" } } },
1167 # { "type": "key", "data" : { "down": true,
1168 # "key": {"type": "qcode", "data": "delete" } } } ] } }
1169 # <- { "return": {} }
1171 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1173 # -> { "execute": "input-send-event" ,
1174 # "arguments": { "events": [
1175 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1176 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1177 # <- { "return": {} }
1180 { 'command': 'input-send-event',
1181 'data': { '*device': 'str',
1183 'events' : [ 'InputEvent' ] } }
1188 # GTK display options.
1190 # @grab-on-hover: Grab keyboard input on mouse hover.
1191 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1192 # turned off the host window will be resized instead.
1193 # In case the display device can notify the guest on
1194 # window resizes (virtio-gpu) this will default to "on",
1195 # assuming the guest will resize the display to match
1196 # the window size then. Otherwise it defaults to "off".
1198 # @show-tabs: Display the tab bar for switching between the various graphical
1199 # interfaces (e.g. VGA and virtual console character devices)
1205 { 'struct' : 'DisplayGTK',
1206 'data' : { '*grab-on-hover' : 'bool',
1207 '*zoom-to-fit' : 'bool',
1208 '*show-tabs' : 'bool' } }
1211 # @DisplayEGLHeadless:
1213 # EGL headless display options.
1215 # @rendernode: Which DRM render node should be used. Default is the first
1216 # available node on the host.
1220 { 'struct' : 'DisplayEGLHeadless',
1221 'data' : { '*rendernode' : 'str' } }
1226 # DBus display options.
1228 # @addr: The D-Bus bus address (default to the session bus).
1230 # @rendernode: Which DRM render node should be used. Default is the first
1231 # available node on the host.
1233 # @p2p: Whether to use peer-to-peer connections (accepted through
1236 # @audiodev: Use the specified DBus audiodev to export audio.
1240 { 'struct' : 'DisplayDBus',
1241 'data' : { '*rendernode' : 'str',
1244 '*audiodev': 'str' } }
1249 # Display OpenGL mode.
1251 # @off: Disable OpenGL (default).
1252 # @on: Use OpenGL, pick context type automatically.
1253 # Would better be named 'auto' but is called 'on' for backward
1254 # compatibility with bool type.
1255 # @core: Use OpenGL with Core (desktop) Context.
1256 # @es: Use OpenGL with ES (embedded systems) Context.
1260 { 'enum' : 'DisplayGLMode',
1261 'data' : [ 'off', 'on', 'core', 'es' ] }
1266 # Curses display options.
1268 # @charset: Font charset used by guest (default: CP437).
1272 { 'struct' : 'DisplayCurses',
1273 'data' : { '*charset' : 'str' } }
1278 # Cocoa display options.
1280 # @left-command-key: Enable/disable forwarding of left command key to
1281 # guest. Allows command-tab window switching on the
1282 # host without sending this key to the guest when
1283 # "off". Defaults to "on"
1285 # @full-grab: Capture all key presses, including system combos. This
1286 # requires accessibility permissions, since it performs
1287 # a global grab on key events. (default: off)
1288 # See https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1290 # @swap-opt-cmd: Swap the Option and Command keys so that their key codes match
1291 # their position on non-Mac keyboards and you can use Meta/Super
1292 # and Alt where you expect them. (default: off)
1296 { 'struct': 'DisplayCocoa',
1298 '*left-command-key': 'bool',
1299 '*full-grab': 'bool',
1300 '*swap-opt-cmd': 'bool'
1306 # Set of modifier keys that need to be held for shortcut key actions.
1310 { 'enum' : 'HotKeyMod',
1311 'data' : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
1316 # SDL2 display options.
1318 # @grab-mod: Modifier keys that should be pressed together with the
1319 # "G" key to release the mouse grab.
1323 { 'struct' : 'DisplaySDL',
1324 'data' : { '*grab-mod' : 'HotKeyMod' } }
1329 # Display (user interface) type.
1331 # @default: The default user interface, selecting from the first available
1332 # of gtk, sdl, cocoa, and vnc.
1334 # @none: No user interface or video output display. The guest will
1335 # still see an emulated graphics card, but its output will not
1336 # be displayed to the QEMU user.
1338 # @gtk: The GTK user interface.
1340 # @sdl: The SDL user interface.
1342 # @egl-headless: No user interface, offload GL operations to a local
1343 # DRI device. Graphical display need to be paired with
1344 # VNC or Spice. (Since 3.1)
1346 # @curses: Display video output via curses. For graphics device
1347 # models which support a text mode, QEMU can display this
1348 # output using a curses/ncurses interface. Nothing is
1349 # displayed when the graphics device is in graphical mode or
1350 # if the graphics device does not support a text
1351 # mode. Generally only the VGA device models support text
1354 # @cocoa: The Cocoa user interface.
1356 # @spice-app: Set up a Spice server and run the default associated
1357 # application to connect to it. The server will redirect
1358 # the serial console and QEMU monitors. (Since 4.0)
1360 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1364 { 'enum' : 'DisplayType',
1366 { 'name': 'default' },
1368 { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1369 { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1370 { 'name': 'egl-headless',
1371 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1372 { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1373 { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1374 { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1375 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1382 # Display (user interface) options.
1384 # @type: Which DisplayType qemu should use.
1385 # @full-screen: Start user interface in fullscreen mode (default: off).
1386 # @window-close: Allow to quit qemu with window close button (default: on).
1387 # @show-cursor: Force showing the mouse cursor (default: off). (since: 5.0)
1388 # @gl: Enable OpenGL support (default: off).
1392 { 'union' : 'DisplayOptions',
1393 'base' : { 'type' : 'DisplayType',
1394 '*full-screen' : 'bool',
1395 '*window-close' : 'bool',
1396 '*show-cursor' : 'bool',
1397 '*gl' : 'DisplayGLMode' },
1398 'discriminator' : 'type',
1400 'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1401 'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1402 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1403 'egl-headless': { 'type': 'DisplayEGLHeadless',
1404 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1405 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' },
1406 'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' }
1411 # @query-display-options:
1413 # Returns information about display configuration
1415 # Returns: @DisplayOptions
1419 { 'command': 'query-display-options',
1420 'returns': 'DisplayOptions' }
1423 # @DisplayReloadType:
1425 # Available DisplayReload types.
1431 { 'enum': 'DisplayReloadType',
1435 # @DisplayReloadOptionsVNC:
1437 # Specify the VNC reload options.
1439 # @tls-certs: reload tls certs or not.
1443 { 'struct': 'DisplayReloadOptionsVNC',
1444 'data': { '*tls-certs': 'bool' } }
1447 # @DisplayReloadOptions:
1449 # Options of the display configuration reload.
1451 # @type: Specify the display type.
1455 { 'union': 'DisplayReloadOptions',
1456 'base': {'type': 'DisplayReloadType'},
1457 'discriminator': 'type',
1458 'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1463 # Reload display configuration.
1465 # Returns: Nothing on success.
1471 # -> { "execute": "display-reload",
1472 # "arguments": { "type": "vnc", "tls-certs": true } }
1473 # <- { "return": {} }
1476 { 'command': 'display-reload',
1477 'data': 'DisplayReloadOptions',
1481 # @DisplayUpdateType:
1483 # Available DisplayUpdate types.
1489 { 'enum': 'DisplayUpdateType',
1493 # @DisplayUpdateOptionsVNC:
1495 # Specify the VNC reload options.
1497 # @addresses: If specified, change set of addresses
1498 # to listen for connections. Addresses configured
1499 # for websockets are not touched.
1503 { 'struct': 'DisplayUpdateOptionsVNC',
1504 'data': { '*addresses': ['SocketAddress'] } }
1507 # @DisplayUpdateOptions:
1509 # Options of the display configuration reload.
1511 # @type: Specify the display type.
1515 { 'union': 'DisplayUpdateOptions',
1516 'base': {'type': 'DisplayUpdateType'},
1517 'discriminator': 'type',
1518 'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1523 # Update display configuration.
1525 # Returns: Nothing on success.
1531 # -> { "execute": "display-update",
1532 # "arguments": { "type": "vnc", "addresses":
1533 # [ { "type": "inet", "host": "0.0.0.0",
1534 # "port": "5901" } ] } }
1535 # <- { "return": {} }
1538 { 'command': 'display-update',
1539 'data': 'DisplayUpdateOptions',