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" }
330 # "mouse-mode":"client",
336 # "connection-id": 1804289383,
337 # "host": "127.0.0.1",
345 # "connection-id": 1804289383,
346 # "host": "127.0.0.1",
350 # [ ... more channels follow ... ]
356 { 'command': 'query-spice', 'returns': 'SpiceInfo',
357 'if': 'CONFIG_SPICE' }
362 # Emitted when a SPICE client establishes a connection
364 # @server: server information
366 # @client: client information
372 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
373 # "event": "SPICE_CONNECTED",
375 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
376 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
380 { 'event': 'SPICE_CONNECTED',
381 'data': { 'server': 'SpiceBasicInfo',
382 'client': 'SpiceBasicInfo' },
383 'if': 'CONFIG_SPICE' }
386 # @SPICE_INITIALIZED:
388 # Emitted after initial handshake and authentication takes place (if any)
389 # and the SPICE channel is up and running
391 # @server: server information
393 # @client: client information
399 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
400 # "event": "SPICE_INITIALIZED",
401 # "data": {"server": {"auth": "spice", "port": "5921",
402 # "family": "ipv4", "host": "127.0.0.1"},
403 # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
404 # "connection-id": 1804289383, "host": "127.0.0.1",
405 # "channel-id": 0, "tls": true}
409 { 'event': 'SPICE_INITIALIZED',
410 'data': { 'server': 'SpiceServerInfo',
411 'client': 'SpiceChannel' },
412 'if': 'CONFIG_SPICE' }
415 # @SPICE_DISCONNECTED:
417 # Emitted when the SPICE connection is closed
419 # @server: server information
421 # @client: client information
427 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
428 # "event": "SPICE_DISCONNECTED",
430 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
431 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
435 { 'event': 'SPICE_DISCONNECTED',
436 'data': { 'server': 'SpiceBasicInfo',
437 'client': 'SpiceBasicInfo' },
438 'if': 'CONFIG_SPICE' }
441 # @SPICE_MIGRATE_COMPLETED:
443 # Emitted when SPICE migration has completed
449 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
450 # "event": "SPICE_MIGRATE_COMPLETED" }
453 { 'event': 'SPICE_MIGRATE_COMPLETED',
454 'if': 'CONFIG_SPICE' }
463 # The basic information for vnc network connection
467 # @service: The service name of the vnc port. This may depend on the host
468 # system's service database so symbolic names should not be relied
471 # @family: address family
473 # @websocket: true in case the socket is a websocket (since 2.3).
477 { 'struct': 'VncBasicInfo',
478 'data': { 'host': 'str',
480 'family': 'NetworkAddressFamily',
481 'websocket': 'bool' },
487 # The network connection information for server
489 # @auth: authentication method used for
490 # the plain (non-websocket) VNC server
494 { 'struct': 'VncServerInfo',
495 'base': 'VncBasicInfo',
496 'data': { '*auth': 'str' },
502 # Information about a connected VNC client.
504 # @x509_dname: If x509 authentication is in use, the Distinguished
505 # Name of the client.
507 # @sasl_username: If SASL authentication is in use, the SASL username
508 # used for authentication.
512 { 'struct': 'VncClientInfo',
513 'base': 'VncBasicInfo',
514 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
520 # Information about the VNC session.
522 # @enabled: true if the VNC server is enabled, false otherwise
524 # @host: The hostname the VNC server is bound to. This depends on
525 # the name resolution on the host and may be an IP address.
527 # @family: - 'ipv6' if the host is listening for IPv6 connections
528 # - 'ipv4' if the host is listening for IPv4 connections
529 # - 'unix' if the host is listening on a unix domain socket
530 # - 'unknown' otherwise
532 # @service: The service name of the server's port. This may depends
533 # on the host system's service database so symbolic names should not
536 # @auth: the current authentication type used by the server
538 # - 'none' if no authentication is being used
539 # - 'vnc' if VNC authentication is being used
540 # - 'vencrypt+plain' if VEncrypt is used with plain text authentication
541 # - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
542 # - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
543 # - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
544 # - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
545 # - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
546 # - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
547 # - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
548 # - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
550 # @clients: a list of @VncClientInfo of all currently connected clients
554 { 'struct': 'VncInfo',
555 'data': {'enabled': 'bool', '*host': 'str',
556 '*family': 'NetworkAddressFamily',
557 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
563 # vnc primary authentication method.
567 { 'enum': 'VncPrimaryAuth',
568 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
569 'tls', 'vencrypt', 'sasl' ],
573 # @VncVencryptSubAuth:
575 # vnc sub authentication method with vencrypt.
579 { 'enum': 'VncVencryptSubAuth',
581 'tls-none', 'x509-none',
582 'tls-vnc', 'x509-vnc',
583 'tls-plain', 'x509-plain',
584 'tls-sasl', 'x509-sasl' ],
590 # The network connection information for server
592 # @auth: The current authentication type used by the servers
594 # @vencrypt: The vencrypt sub authentication type used by the
595 # servers, only specified in case auth == vencrypt.
599 { 'struct': 'VncServerInfo2',
600 'base': 'VncBasicInfo',
601 'data': { 'auth' : 'VncPrimaryAuth',
602 '*vencrypt' : 'VncVencryptSubAuth' },
608 # Information about a vnc server
610 # @id: vnc server name.
612 # @server: A list of @VncBasincInfo describing all listening sockets.
613 # The list can be empty (in case the vnc server is disabled).
614 # It also may have multiple entries: normal + websocket,
615 # possibly also ipv4 + ipv6 in the future.
617 # @clients: A list of @VncClientInfo of all currently connected clients.
618 # The list can be empty, for obvious reasons.
620 # @auth: The current authentication type used by the non-websockets servers
622 # @vencrypt: The vencrypt authentication type used by the servers,
623 # only specified in case auth == vencrypt.
625 # @display: The display device the vnc server is linked to.
629 { 'struct': 'VncInfo2',
630 'data': { 'id' : 'str',
631 'server' : ['VncServerInfo2'],
632 'clients' : ['VncClientInfo'],
633 'auth' : 'VncPrimaryAuth',
634 '*vencrypt' : 'VncVencryptSubAuth',
635 '*display' : 'str' },
641 # Returns information about the current VNC server
649 # -> { "execute": "query-vnc" }
658 # "host":"127.0.0.1",
667 { 'command': 'query-vnc', 'returns': 'VncInfo',
670 # @query-vnc-servers:
672 # Returns a list of vnc servers. The list can be empty.
674 # Returns: a list of @VncInfo2
678 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
682 # @change-vnc-password:
684 # Change the VNC server password.
686 # @password: the new password to use with VNC authentication
690 # Notes: An empty password in this command will set the password to the empty
691 # string. Existing clients are unaffected by executing this command.
693 { 'command': 'change-vnc-password',
694 'data': { 'password': 'str' },
700 # Emitted when a VNC client establishes a connection
702 # @server: server information
704 # @client: client information
706 # Note: This event is emitted before any authentication takes place, thus
707 # the authentication ID is not provided
713 # <- { "event": "VNC_CONNECTED",
715 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
716 # "service": "5901", "host": "0.0.0.0" },
717 # "client": { "family": "ipv4", "service": "58425",
718 # "host": "127.0.0.1", "websocket": false } },
719 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
722 { 'event': 'VNC_CONNECTED',
723 'data': { 'server': 'VncServerInfo',
724 'client': 'VncBasicInfo' },
730 # Emitted after authentication takes place (if any) and the VNC session is
733 # @server: server information
735 # @client: client information
741 # <- { "event": "VNC_INITIALIZED",
743 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
744 # "service": "5901", "host": "0.0.0.0"},
745 # "client": { "family": "ipv4", "service": "46089", "websocket": false,
746 # "host": "127.0.0.1", "sasl_username": "luiz" } },
747 # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
750 { 'event': 'VNC_INITIALIZED',
751 'data': { 'server': 'VncServerInfo',
752 'client': 'VncClientInfo' },
758 # Emitted when the connection is closed
760 # @server: server information
762 # @client: client information
768 # <- { "event": "VNC_DISCONNECTED",
770 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
771 # "service": "5901", "host": "0.0.0.0" },
772 # "client": { "family": "ipv4", "service": "58425", "websocket": false,
773 # "host": "127.0.0.1", "sasl_username": "luiz" } },
774 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
777 { 'event': 'VNC_DISCONNECTED',
778 'data': { 'server': 'VncServerInfo',
779 'client': 'VncClientInfo' },
789 # Information about a mouse device.
791 # @name: the name of the mouse device
793 # @index: the index of the mouse device
795 # @current: true if this device is currently receiving mouse events
797 # @absolute: true if this device supports absolute coordinates as input
801 { 'struct': 'MouseInfo',
802 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
803 'absolute': 'bool'} }
808 # Returns information about each active mouse device
810 # Returns: a list of @MouseInfo for each device
816 # -> { "execute": "query-mice" }
819 # "name":"QEMU Microsoft Mouse",
825 # "name":"QEMU PS/2 Mouse",
834 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
839 # An enumeration of key name.
841 # This is used by the @send-key command.
843 # @unmapped: since 2.0
846 # @kp_comma: since 2.4
847 # @kp_equals: since 2.6
849 # @hiragana: since 2.9
855 # @audionext: since 2.10
856 # @audioprev: since 2.10
857 # @audiostop: since 2.10
858 # @audioplay: since 2.10
859 # @audiomute: since 2.10
860 # @volumeup: since 2.10
861 # @volumedown: since 2.10
862 # @mediaselect: since 2.10
864 # @calculator: since 2.10
865 # @computer: since 2.10
866 # @ac_home: since 2.10
867 # @ac_back: since 2.10
868 # @ac_forward: since 2.10
869 # @ac_refresh: since 2.10
870 # @ac_bookmarks: since 2.10
872 # @muhenkan: since 2.12
873 # @katakanahiragana: since 2.12
878 # 'sysrq' was mistakenly added to hack around the fact that
879 # the ps2 driver was not generating correct scancodes sequences
880 # when 'alt+print' was pressed. This flaw is now fixed and the
881 # 'sysrq' key serves no further purpose. Any further use of
882 # 'sysrq' will be transparently changed to 'print', so they
883 # are effectively synonyms.
888 { 'enum': 'QKeyCode',
889 'data': [ 'unmapped',
890 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
891 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
892 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
893 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
894 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
895 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
896 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
897 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
898 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
899 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
900 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
901 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
902 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
903 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
904 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
905 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
906 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
907 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
908 'volumeup', 'volumedown', 'mediaselect',
909 'mail', 'calculator', 'computer',
910 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
918 { 'enum': 'KeyValueKind',
919 'data': [ 'number', 'qcode' ] }
926 { 'struct': 'IntWrapper',
927 'data': { 'data': 'int' } }
934 { 'struct': 'QKeyCodeWrapper',
935 'data': { 'data': 'QKeyCode' } }
940 # Represents a keyboard key.
944 { 'union': 'KeyValue',
945 'base': { 'type': 'KeyValueKind' },
946 'discriminator': 'type',
948 'number': 'IntWrapper',
949 'qcode': 'QKeyCodeWrapper' } }
954 # Send keys to guest.
956 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
957 # simultaneously sent to the guest. A @KeyValue.number value is sent
958 # directly to the guest, while @KeyValue.qcode must be a valid
961 # @hold-time: time to delay key up events, milliseconds. Defaults
964 # Returns: - Nothing on success
965 # - If key is unknown or redundant, InvalidParameter
971 # -> { "execute": "send-key",
972 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
973 # { "type": "qcode", "data": "alt" },
974 # { "type": "qcode", "data": "delete" } ] } }
975 # <- { "return": {} }
978 { 'command': 'send-key',
979 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
984 # Button of a pointer input device (mouse, tablet).
986 # @side: front side button of a 5-button mouse (since 2.9)
988 # @extra: rear side button of a 5-button mouse (since 2.9)
992 { 'enum' : 'InputButton',
993 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
994 'extra', 'wheel-left', 'wheel-right' ] }
999 # Position axis of a pointer input device (mouse, tablet).
1003 { 'enum' : 'InputAxis',
1004 'data' : [ 'x', 'y' ] }
1009 # Keyboard input event.
1011 # @key: Which key this event is for.
1012 # @down: True for key-down and false for key-up events.
1016 { 'struct' : 'InputKeyEvent',
1017 'data' : { 'key' : 'KeyValue',
1023 # Pointer button input event.
1025 # @button: Which button this event is for.
1026 # @down: True for key-down and false for key-up events.
1030 { 'struct' : 'InputBtnEvent',
1031 'data' : { 'button' : 'InputButton',
1037 # Pointer motion input event.
1039 # @axis: Which axis is referenced by @value.
1040 # @value: Pointer position. For absolute coordinates the
1041 # valid range is 0 -> 0x7ffff
1045 { 'struct' : 'InputMoveEvent',
1046 'data' : { 'axis' : 'InputAxis',
1054 { 'enum': 'InputEventKind',
1055 'data': [ 'key', 'btn', 'rel', 'abs' ] }
1058 # @InputKeyEventWrapper:
1062 { 'struct': 'InputKeyEventWrapper',
1063 'data': { 'data': 'InputKeyEvent' } }
1066 # @InputBtnEventWrapper:
1070 { 'struct': 'InputBtnEventWrapper',
1071 'data': { 'data': 'InputBtnEvent' } }
1074 # @InputMoveEventWrapper:
1078 { 'struct': 'InputMoveEventWrapper',
1079 'data': { 'data': 'InputMoveEvent' } }
1084 # Input event union.
1086 # @type: the input type, one of:
1088 # - 'key': Input event of Keyboard
1089 # - 'btn': Input event of pointer buttons
1090 # - 'rel': Input event of relative pointer motion
1091 # - 'abs': Input event of absolute pointer motion
1095 { 'union' : 'InputEvent',
1096 'base': { 'type': 'InputEventKind' },
1097 'discriminator': 'type',
1098 'data' : { 'key' : 'InputKeyEventWrapper',
1099 'btn' : 'InputBtnEventWrapper',
1100 'rel' : 'InputMoveEventWrapper',
1101 'abs' : 'InputMoveEventWrapper' } }
1104 # @input-send-event:
1106 # Send input event(s) to guest.
1108 # The @device and @head parameters can be used to send the input event
1109 # to specific input devices in case (a) multiple input devices of the
1110 # same kind are added to the virtual machine and (b) you have
1111 # configured input routing (see docs/multiseat.txt) for those input
1112 # devices. The parameters work exactly like the device and head
1113 # properties of input devices. If @device is missing, only devices
1114 # that have no input routing config are admissible. If @device is
1115 # specified, both input devices with and without input routing config
1116 # are admissible, but devices with input routing config take
1119 # @device: display device to send event(s) to.
1120 # @head: head to send event(s) to, in case the
1121 # display device supports multiple scanouts.
1122 # @events: List of InputEvent union.
1124 # Returns: Nothing on success.
1128 # Note: The consoles are visible in the qom tree, under
1129 # /backend/console[$index]. They have a device link and head property,
1130 # so it is possible to map which console belongs to which device and
1135 # 1. Press left mouse button.
1137 # -> { "execute": "input-send-event",
1138 # "arguments": { "device": "video0",
1139 # "events": [ { "type": "btn",
1140 # "data" : { "down": true, "button": "left" } } ] } }
1141 # <- { "return": {} }
1143 # -> { "execute": "input-send-event",
1144 # "arguments": { "device": "video0",
1145 # "events": [ { "type": "btn",
1146 # "data" : { "down": false, "button": "left" } } ] } }
1147 # <- { "return": {} }
1149 # 2. Press ctrl-alt-del.
1151 # -> { "execute": "input-send-event",
1152 # "arguments": { "events": [
1153 # { "type": "key", "data" : { "down": true,
1154 # "key": {"type": "qcode", "data": "ctrl" } } },
1155 # { "type": "key", "data" : { "down": true,
1156 # "key": {"type": "qcode", "data": "alt" } } },
1157 # { "type": "key", "data" : { "down": true,
1158 # "key": {"type": "qcode", "data": "delete" } } } ] } }
1159 # <- { "return": {} }
1161 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1163 # -> { "execute": "input-send-event" ,
1164 # "arguments": { "events": [
1165 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1166 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1167 # <- { "return": {} }
1170 { 'command': 'input-send-event',
1171 'data': { '*device': 'str',
1173 'events' : [ 'InputEvent' ] } }
1178 # GTK display options.
1180 # @grab-on-hover: Grab keyboard input on mouse hover.
1181 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1182 # turned off the host window will be resized instead.
1183 # In case the display device can notify the guest on
1184 # window resizes (virtio-gpu) this will default to "on",
1185 # assuming the guest will resize the display to match
1186 # the window size then. Otherwise it defaults to "off".
1192 { 'struct' : 'DisplayGTK',
1193 'data' : { '*grab-on-hover' : 'bool',
1194 '*zoom-to-fit' : 'bool' } }
1197 # @DisplayEGLHeadless:
1199 # EGL headless display options.
1201 # @rendernode: Which DRM render node should be used. Default is the first
1202 # available node on the host.
1207 { 'struct' : 'DisplayEGLHeadless',
1208 'data' : { '*rendernode' : 'str' } }
1213 # DBus display options.
1215 # @addr: The D-Bus bus address (default to the session bus).
1217 # @rendernode: Which DRM render node should be used. Default is the first
1218 # available node on the host.
1220 # @p2p: Whether to use peer-to-peer connections (accepted through
1223 # @audiodev: Use the specified DBus audiodev to export audio.
1228 { 'struct' : 'DisplayDBus',
1229 'data' : { '*rendernode' : 'str',
1232 '*audiodev': 'str' } }
1237 # Display OpenGL mode.
1239 # @off: Disable OpenGL (default).
1240 # @on: Use OpenGL, pick context type automatically.
1241 # Would better be named 'auto' but is called 'on' for backward
1242 # compatibility with bool type.
1243 # @core: Use OpenGL with Core (desktop) Context.
1244 # @es: Use OpenGL with ES (embedded systems) Context.
1249 { 'enum' : 'DisplayGLMode',
1250 'data' : [ 'off', 'on', 'core', 'es' ] }
1255 # Curses display options.
1257 # @charset: Font charset used by guest (default: CP437).
1262 { 'struct' : 'DisplayCurses',
1263 'data' : { '*charset' : 'str' } }
1268 # Cocoa display options.
1270 # @left-command-key: Enable/disable forwarding of left command key to
1271 # guest. Allows command-tab window switching on the
1272 # host without sending this key to the guest when
1273 # "off". Defaults to "on"
1275 # @full-grab: Capture all key presses, including system combos. This
1276 # requires accessibility permissions, since it performs
1277 # a global grab on key events. (default: off)
1278 # See https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1280 # @swap-opt-cmd: Swap the Option and Command keys so that their key codes match
1281 # their position on non-Mac keyboards and you can use Meta/Super
1282 # and Alt where you expect them. (default: off)
1286 { 'struct': 'DisplayCocoa',
1288 '*left-command-key': 'bool',
1289 '*full-grab': 'bool',
1290 '*swap-opt-cmd': 'bool'
1296 # Display (user interface) type.
1298 # @default: The default user interface, selecting from the first available
1299 # of gtk, sdl, cocoa, and vnc.
1301 # @none: No user interface or video output display. The guest will
1302 # still see an emulated graphics card, but its output will not
1303 # be displayed to the QEMU user.
1305 # @gtk: The GTK user interface.
1307 # @sdl: The SDL user interface.
1309 # @egl-headless: No user interface, offload GL operations to a local
1310 # DRI device. Graphical display need to be paired with
1311 # VNC or Spice. (Since 3.1)
1313 # @curses: Display video output via curses. For graphics device
1314 # models which support a text mode, QEMU can display this
1315 # output using a curses/ncurses interface. Nothing is
1316 # displayed when the graphics device is in graphical mode or
1317 # if the graphics device does not support a text
1318 # mode. Generally only the VGA device models support text
1321 # @cocoa: The Cocoa user interface.
1323 # @spice-app: Set up a Spice server and run the default associated
1324 # application to connect to it. The server will redirect
1325 # the serial console and QEMU monitors. (Since 4.0)
1327 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1332 { 'enum' : 'DisplayType',
1334 { 'name': 'default' },
1336 { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1337 { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1338 { 'name': 'egl-headless',
1339 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1340 { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1341 { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1342 { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1343 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1350 # Display (user interface) options.
1352 # @type: Which DisplayType qemu should use.
1353 # @full-screen: Start user interface in fullscreen mode (default: off).
1354 # @window-close: Allow to quit qemu with window close button (default: on).
1355 # @show-cursor: Force showing the mouse cursor (default: off).
1357 # @gl: Enable OpenGL support (default: off).
1362 { 'union' : 'DisplayOptions',
1363 'base' : { 'type' : 'DisplayType',
1364 '*full-screen' : 'bool',
1365 '*window-close' : 'bool',
1366 '*show-cursor' : 'bool',
1367 '*gl' : 'DisplayGLMode' },
1368 'discriminator' : 'type',
1370 'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1371 'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1372 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1373 'egl-headless': { 'type': 'DisplayEGLHeadless',
1374 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1375 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' }
1380 # @query-display-options:
1382 # Returns information about display configuration
1384 # Returns: @DisplayOptions
1389 { 'command': 'query-display-options',
1390 'returns': 'DisplayOptions' }
1393 # @DisplayReloadType:
1395 # Available DisplayReload types.
1402 { 'enum': 'DisplayReloadType',
1406 # @DisplayReloadOptionsVNC:
1408 # Specify the VNC reload options.
1410 # @tls-certs: reload tls certs or not.
1415 { 'struct': 'DisplayReloadOptionsVNC',
1416 'data': { '*tls-certs': 'bool' } }
1419 # @DisplayReloadOptions:
1421 # Options of the display configuration reload.
1423 # @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',