Merge tag 'darwin-20240305' of https://github.com/philmd/qemu into staging
[qemu/armbru.git] / qapi / ui.json
blob5744c24e3ce602c7059e33f94b92f9d18f14ee46
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Remote desktop
7 ##
9 { 'include': 'common.json' }
10 { 'include': 'sockets.json' }
13 # @DisplayProtocol:
15 # Display protocols which support changing password options.
17 # Since: 7.0
19 { 'enum': 'DisplayProtocol',
20   'data': [ 'vnc', 'spice' ] }
23 # @SetPasswordAction:
25 # An action to take on changing a password on a connection with active
26 # clients.
28 # @keep: maintain existing clients
30 # @fail: fail the command if clients are connected
32 # @disconnect: disconnect existing clients
34 # Since: 7.0
36 { 'enum': 'SetPasswordAction',
37   'data': [ 'keep', 'fail', 'disconnect' ] }
40 # @SetPasswordOptions:
42 # Options for set_password.
44 # @protocol:
45 #     - 'vnc' to modify the VNC server password
46 #     - 'spice' to modify the Spice server password
48 # @password: the new password
50 # @connected: How to handle existing clients when changing the
51 #     password.  If nothing is specified, defaults to 'keep'. For VNC,
52 #     only 'keep' is currently implemented.
54 # Since: 7.0
56 { 'union': 'SetPasswordOptions',
57   'base': { 'protocol': 'DisplayProtocol',
58             'password': 'str',
59             '*connected': 'SetPasswordAction' },
60   'discriminator': 'protocol',
61   'data': { 'vnc': 'SetPasswordOptionsVnc' } }
64 # @SetPasswordOptionsVnc:
66 # Options for set_password specific to the VNC protocol.
68 # @display: The id of the display where the password should be
69 #     changed.  Defaults to the first.
71 # Since: 7.0
73 { 'struct': 'SetPasswordOptionsVnc',
74   'data': { '*display': 'str' } }
77 # @set_password:
79 # Set the password of a remote display server.
81 # Errors:
82 #     - If Spice is not enabled, DeviceNotFound
84 # Since: 0.14
86 # Example:
88 #     -> { "execute": "set_password", "arguments": { "protocol": "vnc",
89 #                                                    "password": "secret" } }
90 #     <- { "return": {} }
92 { 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
95 # @ExpirePasswordOptions:
97 # General options for expire_password.
99 # @protocol:
100 #     - 'vnc' to modify the VNC server expiration
101 #     - 'spice' to modify the Spice server expiration
103 # @time: when to expire the password.
105 #     - 'now' to expire the password immediately
106 #     - 'never' to cancel password expiration
107 #     - '+INT' where INT is the number of seconds from now (integer)
108 #     - 'INT' where INT is the absolute time in seconds
110 # Notes: Time is relative to the server and currently there is no way
111 #     to coordinate server time with client time.  It is not
112 #     recommended to use the absolute time version of the @time
113 #     parameter unless you're sure you are on the same machine as the
114 #     QEMU instance.
116 # Since: 7.0
118 { 'union': 'ExpirePasswordOptions',
119   'base': { 'protocol': 'DisplayProtocol',
120             'time': 'str' },
121   'discriminator': 'protocol',
122   'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
125 # @ExpirePasswordOptionsVnc:
127 # Options for expire_password specific to the VNC protocol.
129 # @display: The id of the display where the expiration should be
130 #     changed.  Defaults to the first.
132 # Since: 7.0
134 { 'struct': 'ExpirePasswordOptionsVnc',
135   'data': { '*display': 'str' } }
138 # @expire_password:
140 # Expire the password of a remote display server.
142 # Errors:
143 #     - If @protocol is 'spice' and Spice is not active,
144 #       DeviceNotFound
146 # Since: 0.14
148 # Example:
150 #     -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
151 #                                                       "time": "+60" } }
152 #     <- { "return": {} }
154 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
157 # @ImageFormat:
159 # Supported image format types.
161 # @png: PNG format
163 # @ppm: PPM format
165 # Since: 7.1
167 { 'enum': 'ImageFormat',
168   'data': ['ppm', 'png'] }
171 # @screendump:
173 # Capture the contents of a screen and write it to a file.
175 # @filename: the path of a new file to store the image
177 # @device: ID of the display device that should be dumped.  If this
178 #     parameter is missing, the primary display will be used.  (Since
179 #     2.12)
181 # @head: head to use in case the device supports multiple heads.  If
182 #     this parameter is missing, head #0 will be used.  Also note that
183 #     the head can only be specified in conjunction with the device
184 #     ID. (Since 2.12)
186 # @format: image format for screendump.  (default: ppm) (Since 7.1)
188 # Since: 0.14
190 # Example:
192 #     -> { "execute": "screendump",
193 #          "arguments": { "filename": "/tmp/image" } }
194 #     <- { "return": {} }
196 { 'command': 'screendump',
197   'data': {'filename': 'str', '*device': 'str', '*head': 'int',
198            '*format': 'ImageFormat'},
199   'coroutine': true,
200   'if': 'CONFIG_PIXMAN' }
203 # == Spice
207 # @SpiceBasicInfo:
209 # The basic information for SPICE network connection
211 # @host: IP address
213 # @port: port number
215 # @family: address family
217 # Since: 2.1
219 { 'struct': 'SpiceBasicInfo',
220   'data': { 'host': 'str',
221             'port': 'str',
222             'family': 'NetworkAddressFamily' },
223   'if': 'CONFIG_SPICE' }
226 # @SpiceServerInfo:
228 # Information about a SPICE server
230 # @auth: authentication method
232 # Since: 2.1
234 { 'struct': 'SpiceServerInfo',
235   'base': 'SpiceBasicInfo',
236   'data': { '*auth': 'str' },
237   'if': 'CONFIG_SPICE' }
240 # @SpiceChannel:
242 # Information about a SPICE client channel.
244 # @connection-id: SPICE connection id number.  All channels with the
245 #     same id belong to the same SPICE session.
247 # @channel-type: SPICE channel type number.  "1" is the main control
248 #     channel, filter for this one if you want to track spice sessions
249 #     only
251 # @channel-id: SPICE channel ID number.  Usually "0", might be
252 #     different when multiple channels of the same type exist, such as
253 #     multiple display channels in a multihead setup
255 # @tls: true if the channel is encrypted, false otherwise.
257 # Since: 0.14
259 { 'struct': 'SpiceChannel',
260   'base': 'SpiceBasicInfo',
261   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
262            'tls': 'bool'},
263   'if': 'CONFIG_SPICE' }
266 # @SpiceQueryMouseMode:
268 # An enumeration of Spice mouse states.
270 # @client: Mouse cursor position is determined by the client.
272 # @server: Mouse cursor position is determined by the server.
274 # @unknown: No information is available about mouse mode used by the
275 #     spice server.
277 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
279 # Since: 1.1
281 { 'enum': 'SpiceQueryMouseMode',
282   'data': [ 'client', 'server', 'unknown' ],
283   'if': 'CONFIG_SPICE' }
286 # @SpiceInfo:
288 # Information about the SPICE session.
290 # @enabled: true if the SPICE server is enabled, false otherwise
292 # @migrated: true if the last guest migration completed and spice
293 #     migration had completed as well.  false otherwise.  (since 1.4)
295 # @host: The hostname the SPICE server is bound to.  This depends on
296 #     the name resolution on the host and may be an IP address.
298 # @port: The SPICE server's port number.
300 # @compiled-version: SPICE server version.
302 # @tls-port: The SPICE server's TLS port number.
304 # @auth: the current authentication type used by the server
306 #     - 'none'  if no authentication is being used
307 #     - 'spice' uses SASL or direct TLS authentication, depending on
308 #       command line options
310 # @mouse-mode: The mode in which the mouse cursor is displayed
311 #     currently.  Can be determined by the client or the server, or
312 #     unknown if spice server doesn't provide this information.
313 #     (since: 1.1)
315 # @channels: a list of @SpiceChannel for each active spice channel
317 # Since: 0.14
319 { 'struct': 'SpiceInfo',
320   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
321            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
322            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
323   'if': 'CONFIG_SPICE' }
326 # @query-spice:
328 # Returns information about the current SPICE server
330 # Returns: @SpiceInfo
332 # Since: 0.14
334 # Example:
336 #     -> { "execute": "query-spice" }
337 #     <- { "return": {
338 #              "enabled": true,
339 #              "auth": "spice",
340 #              "port": 5920,
341 #              "migrated":false,
342 #              "tls-port": 5921,
343 #              "host": "0.0.0.0",
344 #              "mouse-mode":"client",
345 #              "channels": [
346 #                 {
347 #                    "port": "54924",
348 #                    "family": "ipv4",
349 #                    "channel-type": 1,
350 #                    "connection-id": 1804289383,
351 #                    "host": "127.0.0.1",
352 #                    "channel-id": 0,
353 #                    "tls": true
354 #                 },
355 #                 {
356 #                    "port": "36710",
357 #                    "family": "ipv4",
358 #                    "channel-type": 4,
359 #                    "connection-id": 1804289383,
360 #                    "host": "127.0.0.1",
361 #                    "channel-id": 0,
362 #                    "tls": false
363 #                 },
364 #                 [ ... more channels follow ... ]
365 #              ]
366 #           }
367 #        }
369 { 'command': 'query-spice', 'returns': 'SpiceInfo',
370   'if': 'CONFIG_SPICE' }
373 # @SPICE_CONNECTED:
375 # Emitted when a SPICE client establishes a connection
377 # @server: server information
379 # @client: client information
381 # Since: 0.14
383 # Example:
385 #     <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
386 #          "event": "SPICE_CONNECTED",
387 #          "data": {
388 #            "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
389 #            "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
390 #        }}
392 { 'event': 'SPICE_CONNECTED',
393   'data': { 'server': 'SpiceBasicInfo',
394             'client': 'SpiceBasicInfo' },
395   'if': 'CONFIG_SPICE' }
398 # @SPICE_INITIALIZED:
400 # Emitted after initial handshake and authentication takes place (if
401 # any) and the SPICE channel is up and running
403 # @server: server information
405 # @client: client information
407 # Since: 0.14
409 # Example:
411 #     <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
412 #          "event": "SPICE_INITIALIZED",
413 #          "data": {"server": {"auth": "spice", "port": "5921",
414 #                              "family": "ipv4", "host": "127.0.0.1"},
415 #                   "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
416 #                              "connection-id": 1804289383, "host": "127.0.0.1",
417 #                              "channel-id": 0, "tls": true}
418 #        }}
420 { 'event': 'SPICE_INITIALIZED',
421   'data': { 'server': 'SpiceServerInfo',
422             'client': 'SpiceChannel' },
423   'if': 'CONFIG_SPICE' }
426 # @SPICE_DISCONNECTED:
428 # Emitted when the SPICE connection is closed
430 # @server: server information
432 # @client: client information
434 # Since: 0.14
436 # Example:
438 #     <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
439 #          "event": "SPICE_DISCONNECTED",
440 #          "data": {
441 #            "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
442 #            "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
443 #        }}
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
455 # Since: 1.3
457 # Example:
459 #     <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
460 #          "event": "SPICE_MIGRATE_COMPLETED" }
462 { 'event': 'SPICE_MIGRATE_COMPLETED',
463   'if': 'CONFIG_SPICE' }
466 # == VNC
470 # @VncBasicInfo:
472 # The basic information for vnc network connection
474 # @host: IP address
476 # @service: The service name of the vnc port.  This may depend on the
477 #     host system's service database so symbolic names should not be
478 #     relied on.
480 # @family: address family
482 # @websocket: true in case the socket is a websocket (since 2.3).
484 # Since: 2.1
486 { 'struct': 'VncBasicInfo',
487   'data': { 'host': 'str',
488             'service': 'str',
489             'family': 'NetworkAddressFamily',
490             'websocket': 'bool' },
491   'if': 'CONFIG_VNC' }
494 # @VncServerInfo:
496 # The network connection information for server
498 # @auth: authentication method used for the plain (non-websocket) VNC
499 #     server
501 # Since: 2.1
503 { 'struct': 'VncServerInfo',
504   'base': 'VncBasicInfo',
505   'data': { '*auth': 'str' },
506   'if': 'CONFIG_VNC' }
509 # @VncClientInfo:
511 # Information about a connected VNC client.
513 # @x509_dname: If x509 authentication is in use, the Distinguished
514 #     Name of the client.
516 # @sasl_username: If SASL authentication is in use, the SASL username
517 #     used for authentication.
519 # Since: 0.14
521 { 'struct': 'VncClientInfo',
522   'base': 'VncBasicInfo',
523   'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
524   'if': 'CONFIG_VNC' }
527 # @VncInfo:
529 # Information about the VNC session.
531 # @enabled: true if the VNC server is enabled, false otherwise
533 # @host: The hostname the VNC server is bound to.  This depends on the
534 #     name resolution on the host and may be an IP address.
536 # @family:
537 #     - '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
544 #     not be relied on.
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
551 #       authentication
552 #     - 'vencrypt+tls+none' if VEncrypt is used with TLS and no
553 #       authentication
554 #     - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC
555 #       authentication
556 #     - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain
557 #       text auth
558 #     - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
559 #     - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
560 #     - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain
561 #       text auth
562 #     - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
563 #     - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL
564 #       auth
566 # @clients: a list of @VncClientInfo of all currently connected
567 #     clients
569 # Since: 0.14
571 { 'struct': 'VncInfo',
572   'data': {'enabled': 'bool', '*host': 'str',
573            '*family': 'NetworkAddressFamily',
574            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
575   'if': 'CONFIG_VNC' }
578 # @VncPrimaryAuth:
580 # vnc primary authentication method.
582 # Since: 2.3
584 { 'enum': 'VncPrimaryAuth',
585   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
586             'tls', 'vencrypt', 'sasl' ],
587   'if': 'CONFIG_VNC' }
590 # @VncVencryptSubAuth:
592 # vnc sub authentication method with vencrypt.
594 # Since: 2.3
596 { 'enum': 'VncVencryptSubAuth',
597   'data': [ 'plain',
598             'tls-none',  'x509-none',
599             'tls-vnc',   'x509-vnc',
600             'tls-plain', 'x509-plain',
601             'tls-sasl',  'x509-sasl' ],
602   'if': 'CONFIG_VNC' }
605 # @VncServerInfo2:
607 # The network connection information for server
609 # @auth: The current authentication type used by the servers
611 # @vencrypt: The vencrypt sub authentication type used by the servers,
612 #     only specified in case auth == vencrypt.
614 # Since: 2.9
616 { 'struct': 'VncServerInfo2',
617   'base': 'VncBasicInfo',
618   'data': { 'auth'      : 'VncPrimaryAuth',
619             '*vencrypt' : 'VncVencryptSubAuth' },
620   'if': 'CONFIG_VNC' }
623 # @VncInfo2:
625 # Information about a vnc server
627 # @id: vnc server name.
629 # @server: A list of @VncBasincInfo describing all listening sockets.
630 #     The list can be empty (in case the vnc server is disabled). It
631 #     also may have multiple entries: normal + websocket, possibly
632 #     also ipv4 + ipv6 in the future.
634 # @clients: A list of @VncClientInfo of all currently connected
635 #     clients.  The list can be empty, for obvious reasons.
637 # @auth: The current authentication type used by the non-websockets
638 #     servers
640 # @vencrypt: The vencrypt authentication type used by the servers,
641 #     only specified in case auth == vencrypt.
643 # @display: The display device the vnc server is linked to.
645 # Since: 2.3
647 { 'struct': 'VncInfo2',
648   'data': { 'id'        : 'str',
649             'server'    : ['VncServerInfo2'],
650             'clients'   : ['VncClientInfo'],
651             'auth'      : 'VncPrimaryAuth',
652             '*vencrypt' : 'VncVencryptSubAuth',
653             '*display'  : 'str' },
654   'if': 'CONFIG_VNC' }
657 # @query-vnc:
659 # Returns information about the current VNC server
661 # Returns: @VncInfo
663 # Since: 0.14
665 # Example:
667 #     -> { "execute": "query-vnc" }
668 #     <- { "return": {
669 #              "enabled":true,
670 #              "host":"0.0.0.0",
671 #              "service":"50402",
672 #              "auth":"vnc",
673 #              "family":"ipv4",
674 #              "clients":[
675 #                 {
676 #                    "host":"127.0.0.1",
677 #                    "service":"50401",
678 #                    "family":"ipv4",
679 #                    "websocket":false
680 #                 }
681 #              ]
682 #           }
683 #        }
685 { 'command': 'query-vnc', 'returns': 'VncInfo',
686   'if': 'CONFIG_VNC' }
688 # @query-vnc-servers:
690 # Returns a list of vnc servers.  The list can be empty.
692 # Returns: a list of @VncInfo2
694 # Since: 2.3
696 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
697   'if': 'CONFIG_VNC' }
700 # @change-vnc-password:
702 # Change the VNC server password.
704 # @password: the new password to use with VNC authentication
706 # Since: 1.1
708 # Notes: An empty password in this command will set the password to
709 #     the empty string.  Existing clients are unaffected by executing
710 #     this command.
712 { 'command': 'change-vnc-password',
713   'data': { 'password': 'str' },
714   'if': 'CONFIG_VNC' }
717 # @VNC_CONNECTED:
719 # Emitted when a VNC client establishes a connection
721 # @server: server information
723 # @client: client information
725 # Note: This event is emitted before any authentication takes place,
726 #     thus the authentication ID is not provided
728 # Since: 0.13
730 # Example:
732 #     <- { "event": "VNC_CONNECTED",
733 #          "data": {
734 #                "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
735 #                            "service": "5901", "host": "0.0.0.0" },
736 #                "client": { "family": "ipv4", "service": "58425",
737 #                            "host": "127.0.0.1", "websocket": false } },
738 #          "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
740 { 'event': 'VNC_CONNECTED',
741   'data': { 'server': 'VncServerInfo',
742             'client': 'VncBasicInfo' },
743   'if': 'CONFIG_VNC' }
746 # @VNC_INITIALIZED:
748 # Emitted after authentication takes place (if any) and the VNC
749 # session is made active
751 # @server: server information
753 # @client: client information
755 # Since: 0.13
757 # Example:
759 #     <-  { "event": "VNC_INITIALIZED",
760 #           "data": {
761 #                "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
762 #                            "service": "5901", "host": "0.0.0.0"},
763 #                "client": { "family": "ipv4", "service": "46089", "websocket": false,
764 #                            "host": "127.0.0.1", "sasl_username": "luiz" } },
765 #           "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
767 { 'event': 'VNC_INITIALIZED',
768   'data': { 'server': 'VncServerInfo',
769             'client': 'VncClientInfo' },
770   'if': 'CONFIG_VNC' }
773 # @VNC_DISCONNECTED:
775 # Emitted when the connection is closed
777 # @server: server information
779 # @client: client information
781 # Since: 0.13
783 # Example:
785 #     <- { "event": "VNC_DISCONNECTED",
786 #          "data": {
787 #                "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
788 #                            "service": "5901", "host": "0.0.0.0" },
789 #                "client": { "family": "ipv4", "service": "58425", "websocket": false,
790 #                            "host": "127.0.0.1", "sasl_username": "luiz" } },
791 #          "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
793 { 'event': 'VNC_DISCONNECTED',
794   'data': { 'server': 'VncServerInfo',
795             'client': 'VncClientInfo' },
796   'if': 'CONFIG_VNC' }
799 # = Input
803 # @MouseInfo:
805 # Information about a mouse device.
807 # @name: the name of the mouse device
809 # @index: the index of the mouse device
811 # @current: true if this device is currently receiving mouse events
813 # @absolute: true if this device supports absolute coordinates as
814 #     input
816 # Since: 0.14
818 { 'struct': 'MouseInfo',
819   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
820            'absolute': 'bool'} }
823 # @query-mice:
825 # Returns information about each active mouse device
827 # Returns: a list of @MouseInfo for each device
829 # Since: 0.14
831 # Example:
833 #     -> { "execute": "query-mice" }
834 #     <- { "return": [
835 #              {
836 #                 "name":"QEMU Microsoft Mouse",
837 #                 "index":0,
838 #                 "current":false,
839 #                 "absolute":false
840 #              },
841 #              {
842 #                 "name":"QEMU PS/2 Mouse",
843 #                 "index":1,
844 #                 "current":true,
845 #                 "absolute":true
846 #              }
847 #           ]
848 #        }
850 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
853 # @QKeyCode:
855 # An enumeration of key name.
857 # This is used by the @send-key command.
859 # @unmapped: since 2.0
861 # @pause: since 2.0
863 # @ro: since 2.4
865 # @kp_comma: since 2.4
867 # @kp_equals: since 2.6
869 # @power: since 2.6
871 # @hiragana: since 2.9
873 # @henkan: since 2.9
875 # @yen: since 2.9
877 # @sleep: since 2.10
879 # @wake: since 2.10
881 # @audionext: since 2.10
883 # @audioprev: since 2.10
885 # @audiostop: since 2.10
887 # @audioplay: since 2.10
889 # @audiomute: since 2.10
891 # @volumeup: since 2.10
893 # @volumedown: since 2.10
895 # @mediaselect: since 2.10
897 # @mail: since 2.10
899 # @calculator: since 2.10
901 # @computer: since 2.10
903 # @ac_home: since 2.10
905 # @ac_back: since 2.10
907 # @ac_forward: since 2.10
909 # @ac_refresh: since 2.10
911 # @ac_bookmarks: since 2.10
913 # @muhenkan: since 2.12
915 # @katakanahiragana: since 2.12
917 # @lang1: since 6.1
919 # @lang2: since 6.1
921 # @f13: since 8.0
923 # @f14: since 8.0
925 # @f15: since 8.0
927 # @f16: since 8.0
929 # @f17: since 8.0
931 # @f18: since 8.0
933 # @f19: since 8.0
935 # @f20: since 8.0
937 # @f21: since 8.0
939 # @f22: since 8.0
941 # @f23: since 8.0
943 # @f24: since 8.0
945 # 'sysrq' was mistakenly added to hack around the fact that the ps2
946 # driver was not generating correct scancodes sequences when
947 # 'alt+print' was pressed.  This flaw is now fixed and the 'sysrq' key
948 # serves no further purpose.  Any further use of 'sysrq' will be
949 # transparently changed to 'print', so they are effectively synonyms.
951 # Since: 1.3
953 { 'enum': 'QKeyCode',
954   'data': [ 'unmapped',
955             'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
956             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
957             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
958             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
959             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
960             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
961             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
962             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
963             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
964             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
965             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
966             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
967             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
968             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
969             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
970             'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
971             'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
972             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
973             'volumeup', 'volumedown', 'mediaselect',
974             'mail', 'calculator', 'computer',
975             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
976             'lang1', 'lang2','f13','f14','f15','f16','f17','f18','f19','f20','f21','f22','f23','f24' ] }
979 # @KeyValueKind:
981 # Since: 1.3
983 { 'enum': 'KeyValueKind',
984   'data': [ 'number', 'qcode' ] }
987 # @IntWrapper:
989 # @data: a numeric key code
991 # Since: 1.3
993 { 'struct': 'IntWrapper',
994   'data': { 'data': 'int' } }
997 # @QKeyCodeWrapper:
999 # @data: An enumeration of key name
1001 # Since: 1.3
1003 { 'struct': 'QKeyCodeWrapper',
1004   'data': { 'data': 'QKeyCode' } }
1007 # @KeyValue:
1009 # Represents a keyboard key.
1011 # @type: key encoding
1013 # Since: 1.3
1015 { 'union': 'KeyValue',
1016   'base': { 'type': 'KeyValueKind' },
1017   'discriminator': 'type',
1018   'data': {
1019     'number': 'IntWrapper',
1020     'qcode': 'QKeyCodeWrapper' } }
1023 # @send-key:
1025 # Send keys to guest.
1027 # @keys: An array of @KeyValue elements.  All @KeyValues in this array
1028 #     are simultaneously sent to the guest.  A @KeyValue.number value
1029 #     is sent directly to the guest, while @KeyValue.qcode must be a
1030 #     valid @QKeyCode value
1032 # @hold-time: time to delay key up events, milliseconds.  Defaults to
1033 #     100
1035 # Errors:
1036 #     - If key is unknown or redundant, GenericError
1038 # Since: 1.3
1040 # Example:
1042 #     -> { "execute": "send-key",
1043 #          "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
1044 #                                   { "type": "qcode", "data": "alt" },
1045 #                                   { "type": "qcode", "data": "delete" } ] } }
1046 #     <- { "return": {} }
1048 { 'command': 'send-key',
1049   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
1052 # @InputButton:
1054 # Button of a pointer input device (mouse, tablet).
1056 # @side: front side button of a 5-button mouse (since 2.9)
1058 # @extra: rear side button of a 5-button mouse (since 2.9)
1060 # @touch: screen contact on a multi-touch device (since 8.1)
1062 # Since: 2.0
1064 { 'enum'  : 'InputButton',
1065   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
1066   'extra', 'wheel-left', 'wheel-right', 'touch' ] }
1069 # @InputAxis:
1071 # Position axis of a pointer input device (mouse, tablet).
1073 # Since: 2.0
1075 { 'enum'  : 'InputAxis',
1076   'data'  : [ 'x', 'y' ] }
1079 # @InputMultiTouchType:
1081 # Type of a multi-touch event.
1083 # Since: 8.1
1085 { 'enum'  : 'InputMultiTouchType',
1086   'data'  : [ 'begin', 'update', 'end', 'cancel', 'data' ] }
1090 # @InputKeyEvent:
1092 # Keyboard input event.
1094 # @key: Which key this event is for.
1096 # @down: True for key-down and false for key-up events.
1098 # Since: 2.0
1100 { 'struct'  : 'InputKeyEvent',
1101   'data'  : { 'key'     : 'KeyValue',
1102               'down'    : 'bool' } }
1105 # @InputBtnEvent:
1107 # Pointer button input event.
1109 # @button: Which button this event is for.
1111 # @down: True for key-down and false for key-up events.
1113 # Since: 2.0
1115 { 'struct'  : 'InputBtnEvent',
1116   'data'  : { 'button'  : 'InputButton',
1117               'down'    : 'bool' } }
1120 # @InputMoveEvent:
1122 # Pointer motion input event.
1124 # @axis: Which axis is referenced by @value.
1126 # @value: Pointer position.  For absolute coordinates the valid range
1127 #     is 0 -> 0x7ffff
1129 # Since: 2.0
1131 { 'struct'  : 'InputMoveEvent',
1132   'data'  : { 'axis'    : 'InputAxis',
1133               'value'   : 'int' } }
1136 # @InputMultiTouchEvent:
1138 # MultiTouch input event.
1140 # @slot: Which slot has generated the event.
1142 # @tracking-id: ID to correlate this event with previously generated
1143 #     events.
1145 # @axis: Which axis is referenced by @value.
1147 # @value: Contact position.
1149 # Since: 8.1
1151 { 'struct'  : 'InputMultiTouchEvent',
1152   'data'  : { 'type'       : 'InputMultiTouchType',
1153               'slot'       : 'int',
1154               'tracking-id': 'int',
1155               'axis'       : 'InputAxis',
1156               'value'      : 'int' } }
1159 # @InputEventKind:
1161 # @key: a keyboard input event
1163 # @btn: a pointer button input event
1165 # @rel: a relative pointer motion input event
1167 # @abs: an absolute pointer motion input event
1169 # @mtt: a multi-touch input event
1171 # Since: 2.0
1173 { 'enum': 'InputEventKind',
1174   'data': [ 'key', 'btn', 'rel', 'abs', 'mtt' ] }
1177 # @InputKeyEventWrapper:
1179 # @data: Keyboard input event
1181 # Since: 2.0
1183 { 'struct': 'InputKeyEventWrapper',
1184   'data': { 'data': 'InputKeyEvent' } }
1187 # @InputBtnEventWrapper:
1189 # @data: Pointer button input event
1191 # Since: 2.0
1193 { 'struct': 'InputBtnEventWrapper',
1194   'data': { 'data': 'InputBtnEvent' } }
1197 # @InputMoveEventWrapper:
1199 # @data: Pointer motion input event
1201 # Since: 2.0
1203 { 'struct': 'InputMoveEventWrapper',
1204   'data': { 'data': 'InputMoveEvent' } }
1207 # @InputMultiTouchEventWrapper:
1209 # @data: MultiTouch input event
1211 # Since: 8.1
1213 { 'struct': 'InputMultiTouchEventWrapper',
1214   'data': { 'data': 'InputMultiTouchEvent' } }
1217 # @InputEvent:
1219 # Input event union.
1221 # @type: the type of input event
1223 # Since: 2.0
1225 { 'union' : 'InputEvent',
1226   'base': { 'type': 'InputEventKind' },
1227   'discriminator': 'type',
1228   'data'  : { 'key'     : 'InputKeyEventWrapper',
1229               'btn'     : 'InputBtnEventWrapper',
1230               'rel'     : 'InputMoveEventWrapper',
1231               'abs'     : 'InputMoveEventWrapper',
1232               'mtt'     : 'InputMultiTouchEventWrapper' } }
1235 # @input-send-event:
1237 # Send input event(s) to guest.
1239 # The @device and @head parameters can be used to send the input event
1240 # to specific input devices in case (a) multiple input devices of the
1241 # same kind are added to the virtual machine and (b) you have
1242 # configured input routing (see docs/multiseat.txt) for those input
1243 # devices.  The parameters work exactly like the device and head
1244 # properties of input devices.  If @device is missing, only devices
1245 # that have no input routing config are admissible.  If @device is
1246 # specified, both input devices with and without input routing config
1247 # are admissible, but devices with input routing config take
1248 # precedence.
1250 # @device: display device to send event(s) to.
1252 # @head: head to send event(s) to, in case the display device supports
1253 #     multiple scanouts.
1255 # @events: List of InputEvent union.
1257 # Since: 2.6
1259 # Note: The consoles are visible in the qom tree, under
1260 #     /backend/console[$index]. They have a device link and head
1261 #     property, so it is possible to map which console belongs to
1262 #     which device and display.
1264 # Examples:
1266 #     1. Press left mouse button.
1268 #     -> { "execute": "input-send-event",
1269 #         "arguments": { "device": "video0",
1270 #                        "events": [ { "type": "btn",
1271 #                        "data" : { "down": true, "button": "left" } } ] } }
1272 #     <- { "return": {} }
1274 #     -> { "execute": "input-send-event",
1275 #         "arguments": { "device": "video0",
1276 #                        "events": [ { "type": "btn",
1277 #                        "data" : { "down": false, "button": "left" } } ] } }
1278 #     <- { "return": {} }
1280 #     2. Press ctrl-alt-del.
1282 #     -> { "execute": "input-send-event",
1283 #          "arguments": { "events": [
1284 #             { "type": "key", "data" : { "down": true,
1285 #               "key": {"type": "qcode", "data": "ctrl" } } },
1286 #             { "type": "key", "data" : { "down": true,
1287 #               "key": {"type": "qcode", "data": "alt" } } },
1288 #             { "type": "key", "data" : { "down": true,
1289 #               "key": {"type": "qcode", "data": "delete" } } } ] } }
1290 #     <- { "return": {} }
1292 #     3. Move mouse pointer to absolute coordinates (20000, 400).
1294 #     -> { "execute": "input-send-event" ,
1295 #       "arguments": { "events": [
1296 #                    { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1297 #                    { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1298 #     <- { "return": {} }
1300 { 'command': 'input-send-event',
1301   'data': { '*device': 'str',
1302             '*head'  : 'int',
1303             'events' : [ 'InputEvent' ] } }
1306 # @DisplayGTK:
1308 # GTK display options.
1310 # @grab-on-hover: Grab keyboard input on mouse hover.
1312 # @zoom-to-fit: Zoom guest display to fit into the host window.  When
1313 #     turned off the host window will be resized instead.  In case the
1314 #     display device can notify the guest on window resizes
1315 #     (virtio-gpu) this will default to "on", assuming the guest will
1316 #     resize the display to match the window size then.  Otherwise it
1317 #     defaults to "off". (Since 3.1)
1319 # @show-tabs: Display the tab bar for switching between the various
1320 #     graphical interfaces (e.g. VGA and virtual console character
1321 #     devices) by default.  (Since 7.1)
1323 # @show-menubar: Display the main window menubar.  Defaults to "on".
1324 #     (Since 8.0)
1326 # Since: 2.12
1328 { 'struct'  : 'DisplayGTK',
1329   'data'    : { '*grab-on-hover' : 'bool',
1330                 '*zoom-to-fit'   : 'bool',
1331                 '*show-tabs'     : 'bool',
1332                 '*show-menubar'  : 'bool'  } }
1335 # @DisplayEGLHeadless:
1337 # EGL headless display options.
1339 # @rendernode: Which DRM render node should be used.  Default is the
1340 #     first available node on the host.
1342 # Since: 3.1
1344 { 'struct'  : 'DisplayEGLHeadless',
1345   'data'    : { '*rendernode' : 'str' } }
1348 # @DisplayDBus:
1350 # DBus display options.
1352 # @addr: The D-Bus bus address (default to the session bus).
1354 # @rendernode: Which DRM render node should be used.  Default is the
1355 #     first available node on the host.
1357 # @p2p: Whether to use peer-to-peer connections (accepted through
1358 #     @add_client).
1360 # @audiodev: Use the specified DBus audiodev to export audio.
1362 # Since: 7.0
1364 { 'struct'  : 'DisplayDBus',
1365   'data'    : { '*rendernode' : 'str',
1366                 '*addr': 'str',
1367                 '*p2p': 'bool',
1368                 '*audiodev': 'str' } }
1371 # @DisplayGLMode:
1373 # Display OpenGL mode.
1375 # @off: Disable OpenGL (default).
1377 # @on: Use OpenGL, pick context type automatically.  Would better be
1378 #     named 'auto' but is called 'on' for backward compatibility with
1379 #     bool type.
1381 # @core: Use OpenGL with Core (desktop) Context.
1383 # @es: Use OpenGL with ES (embedded systems) Context.
1385 # Since: 3.0
1387 { 'enum'    : 'DisplayGLMode',
1388   'data'    : [ 'off', 'on', 'core', 'es' ] }
1391 # @DisplayCurses:
1393 # Curses display options.
1395 # @charset: Font charset used by guest (default: CP437).
1397 # Since: 4.0
1399 { 'struct'  : 'DisplayCurses',
1400   'data'    : { '*charset'       : 'str' } }
1403 # @DisplayCocoa:
1405 # Cocoa display options.
1407 # @left-command-key: Enable/disable forwarding of left command key to
1408 #     guest.  Allows command-tab window switching on the host without
1409 #     sending this key to the guest when "off". Defaults to "on"
1411 # @full-grab: Capture all key presses, including system combos.  This
1412 #     requires accessibility permissions, since it performs a global
1413 #     grab on key events.  (default: off) See
1414 #     https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1416 # @swap-opt-cmd: Swap the Option and Command keys so that their key
1417 #     codes match their position on non-Mac keyboards and you can use
1418 #     Meta/Super and Alt where you expect them.  (default: off)
1420 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1421 #     turned off the host window will be resized instead. Defaults to
1422 #     "off". (Since 8.2)
1424 # @zoom-interpolation: Apply interpolation to smooth output when
1425 #     zoom-to-fit is enabled. Defaults to "off". (Since 9.0)
1427 # Since: 7.0
1429 { 'struct': 'DisplayCocoa',
1430   'data': {
1431       '*left-command-key': 'bool',
1432       '*full-grab': 'bool',
1433       '*swap-opt-cmd': 'bool',
1434       '*zoom-to-fit': 'bool',
1435       '*zoom-interpolation': 'bool'
1436   } }
1439 # @HotKeyMod:
1441 # Set of modifier keys that need to be held for shortcut key actions.
1443 # Since: 7.1
1445 { 'enum'  : 'HotKeyMod',
1446   'data'  : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
1449 # @DisplaySDL:
1451 # SDL2 display options.
1453 # @grab-mod: Modifier keys that should be pressed together with the
1454 #     "G" key to release the mouse grab.
1456 # Since: 7.1
1458 { 'struct'  : 'DisplaySDL',
1459   'data'    : { '*grab-mod'   : 'HotKeyMod' } }
1462 # @DisplayType:
1464 # Display (user interface) type.
1466 # @default: The default user interface, selecting from the first
1467 #     available of gtk, sdl, cocoa, and vnc.
1469 # @none: No user interface or video output display.  The guest will
1470 #     still see an emulated graphics card, but its output will not be
1471 #     displayed to the QEMU user.
1473 # @gtk: The GTK user interface.
1475 # @sdl: The SDL user interface.
1477 # @egl-headless: No user interface, offload GL operations to a local
1478 #     DRI device.  Graphical display need to be paired with VNC or
1479 #     Spice.  (Since 3.1)
1481 # @curses: Display video output via curses.  For graphics device
1482 #     models which support a text mode, QEMU can display this output
1483 #     using a curses/ncurses interface.  Nothing is displayed when the
1484 #     graphics device is in graphical mode or if the graphics device
1485 #     does not support a text mode.  Generally only the VGA device
1486 #     models support text mode.
1488 # @cocoa: The Cocoa user interface.
1490 # @spice-app: Set up a Spice server and run the default associated
1491 #     application to connect to it.  The server will redirect the
1492 #     serial console and QEMU monitors.  (Since 4.0)
1494 # @dbus: Start a D-Bus service for the display.  (Since 7.0)
1496 # Since: 2.12
1498 { 'enum'    : 'DisplayType',
1499   'data'    : [
1500     { 'name': 'default' },
1501     { 'name': 'none' },
1502     { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1503     { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1504     { 'name': 'egl-headless', 'if': 'CONFIG_OPENGL' },
1505     { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1506     { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1507     { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1508     { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1509   ]
1513 # @DisplayOptions:
1515 # Display (user interface) options.
1517 # @type: Which DisplayType qemu should use.
1519 # @full-screen: Start user interface in fullscreen mode
1520 #     (default: off).
1522 # @window-close: Allow to quit qemu with window close button
1523 #     (default: on).
1525 # @show-cursor: Force showing the mouse cursor (default: off).
1526 #     (since: 5.0)
1528 # @gl: Enable OpenGL support (default: off).
1530 # Since: 2.12
1532 { 'union'   : 'DisplayOptions',
1533   'base'    : { 'type'           : 'DisplayType',
1534                 '*full-screen'   : 'bool',
1535                 '*window-close'  : 'bool',
1536                 '*show-cursor'   : 'bool',
1537                 '*gl'            : 'DisplayGLMode' },
1538   'discriminator' : 'type',
1539   'data'    : {
1540       'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1541       'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1542       'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1543       'egl-headless': { 'type': 'DisplayEGLHeadless',
1544                         'if': 'CONFIG_OPENGL' },
1545       'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' },
1546       'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' }
1547   }
1551 # @query-display-options:
1553 # Returns information about display configuration
1555 # Returns: @DisplayOptions
1557 # Since: 3.1
1559 { 'command': 'query-display-options',
1560   'returns': 'DisplayOptions' }
1563 # @DisplayReloadType:
1565 # Available DisplayReload types.
1567 # @vnc: VNC display
1569 # Since: 6.0
1571 { 'enum': 'DisplayReloadType',
1572   'data': ['vnc'] }
1575 # @DisplayReloadOptionsVNC:
1577 # Specify the VNC reload options.
1579 # @tls-certs: reload tls certs or not.
1581 # Since: 6.0
1583 { 'struct': 'DisplayReloadOptionsVNC',
1584   'data': { '*tls-certs': 'bool' } }
1587 # @DisplayReloadOptions:
1589 # Options of the display configuration reload.
1591 # @type: Specify the display type.
1593 # Since: 6.0
1595 { 'union': 'DisplayReloadOptions',
1596   'base': {'type': 'DisplayReloadType'},
1597   'discriminator': 'type',
1598   'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1601 # @display-reload:
1603 # Reload display configuration.
1605 # Since: 6.0
1607 # Example:
1609 #     -> { "execute": "display-reload",
1610 #          "arguments": { "type": "vnc", "tls-certs": true  } }
1611 #     <- { "return": {} }
1613 { 'command': 'display-reload',
1614   'data': 'DisplayReloadOptions',
1615   'boxed' : true }
1618 # @DisplayUpdateType:
1620 # Available DisplayUpdate types.
1622 # @vnc: VNC display
1624 # Since: 7.1
1626 { 'enum': 'DisplayUpdateType',
1627   'data': ['vnc'] }
1630 # @DisplayUpdateOptionsVNC:
1632 # Specify the VNC reload options.
1634 # @addresses: If specified, change set of addresses to listen for
1635 #     connections.  Addresses configured for websockets are not
1636 #     touched.
1638 # Since: 7.1
1640 { 'struct': 'DisplayUpdateOptionsVNC',
1641   'data': { '*addresses': ['SocketAddress'] } }
1644 # @DisplayUpdateOptions:
1646 # Options of the display configuration reload.
1648 # @type: Specify the display type.
1650 # Since: 7.1
1652 { 'union': 'DisplayUpdateOptions',
1653   'base': {'type': 'DisplayUpdateType'},
1654   'discriminator': 'type',
1655   'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1658 # @display-update:
1660 # Update display configuration.
1662 # Since: 7.1
1664 # Example:
1666 #     -> { "execute": "display-update",
1667 #          "arguments": { "type": "vnc", "addresses":
1668 #                         [ { "type": "inet", "host": "0.0.0.0",
1669 #                             "port": "5901" } ] } }
1670 #     <- { "return": {} }
1672 { 'command': 'display-update',
1673   'data': 'DisplayUpdateOptions',
1674   'boxed' : true }
1677 # @client_migrate_info:
1679 # Set migration information for remote display.  This makes the server
1680 # ask the client to automatically reconnect using the new parameters
1681 # once migration finished successfully.  Only implemented for SPICE.
1683 # @protocol: must be "spice"
1685 # @hostname: migration target hostname
1687 # @port: spice tcp port for plaintext channels
1689 # @tls-port: spice tcp port for tls-secured channels
1691 # @cert-subject: server certificate subject
1693 # Since: 0.14
1695 # Example:
1697 #     -> { "execute": "client_migrate_info",
1698 #          "arguments": { "protocol": "spice",
1699 #                         "hostname": "virt42.lab.kraxel.org",
1700 #                         "port": 1234 } }
1701 #     <- { "return": {} }
1703 { 'command': 'client_migrate_info',
1704   'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1705             '*tls-port': 'int', '*cert-subject': 'str' } }