target/ppc: init 'sregs' in kvmppc_put_books_sregs()
[qemu.git] / qapi / ui.json
blob059302a5efcb5cfef8fb8ee2e95e49ff8a6d100c
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
20 { 'enum': 'DisplayProtocol',
21   'data': [ 'vnc', 'spice' ] }
24 # @SetPasswordAction:
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
34 # Since: 7.0
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.
54 # Since: 7.0
57 { 'union': 'SetPasswordOptions',
58   'base': { 'protocol': 'DisplayProtocol',
59             'password': 'str',
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.
72 # Since: 7.0
75 { 'struct': 'SetPasswordOptionsVnc',
76   'data': { '*display': 'str' } }
79 # @set_password:
81 # Set the password of a remote display server.
83 # Returns: - Nothing on success
84 #          - If Spice is not enabled, DeviceNotFound
86 # Since: 0.14
88 # Example:
90 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
91 #                                                "password": "secret" } }
92 # <- { "return": {} }
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.
117 # Since: 7.0
120 { 'union': 'ExpirePasswordOptions',
121   'base': { 'protocol': 'DisplayProtocol',
122             'time': 'str' },
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.
134 # Since: 7.0
138 { 'struct': 'ExpirePasswordOptionsVnc',
139   'data': { '*display': 'str' } }
142 # @expire_password:
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
149 # Since: 0.14
151 # Example:
153 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
154 #                                                   "time": "+60" } }
155 # <- { "return": {} }
158 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
161 # @ImageFormat:
163 # Supported image format types.
165 # @png: PNG format
167 # @ppm: PPM format
169 # Since: 7.1
172 { 'enum': 'ImageFormat',
173   'data': ['ppm', 'png'] }
176 # @screendump:
178 # Capture the contents of a screen and write it to a file.
180 # @filename: the path of a new file to store the image
182 # @device: ID of the display device that should be dumped. If this parameter
183 #          is missing, the primary display will be used. (Since 2.12)
185 # @head: head to use in case the device supports multiple heads. If this
186 #        parameter is missing, head #0 will be used. Also note that the head
187 #        can only be specified in conjunction with the device ID. (Since 2.12)
189 # @format: image format for screendump. (default: ppm) (Since 7.1)
191 # Returns: Nothing on success
193 # Since: 0.14
195 # Example:
197 # -> { "execute": "screendump",
198 #      "arguments": { "filename": "/tmp/image" } }
199 # <- { "return": {} }
202 { 'command': 'screendump',
203   'data': {'filename': 'str', '*device': 'str', '*head': 'int',
204            '*format': 'ImageFormat'},
205   'coroutine': true }
208 # == Spice
212 # @SpiceBasicInfo:
214 # The basic information for SPICE network connection
216 # @host: IP address
218 # @port: port number
220 # @family: address family
222 # Since: 2.1
224 { 'struct': 'SpiceBasicInfo',
225   'data': { 'host': 'str',
226             'port': 'str',
227             'family': 'NetworkAddressFamily' },
228   'if': 'CONFIG_SPICE' }
231 # @SpiceServerInfo:
233 # Information about a SPICE server
235 # @auth: authentication method
237 # Since: 2.1
239 { 'struct': 'SpiceServerInfo',
240   'base': 'SpiceBasicInfo',
241   'data': { '*auth': 'str' },
242   'if': 'CONFIG_SPICE' }
245 # @SpiceChannel:
247 # Information about a SPICE client channel.
249 # @connection-id: SPICE connection id number.  All channels with the same id
250 #                 belong to the same SPICE session.
252 # @channel-type: SPICE channel type number.  "1" is the main control
253 #                channel, filter for this one if you want to track spice
254 #                sessions only
256 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
257 #              multiple channels of the same type exist, such as multiple
258 #              display channels in a multihead setup
260 # @tls: true if the channel is encrypted, false otherwise.
262 # Since: 0.14
264 { 'struct': 'SpiceChannel',
265   'base': 'SpiceBasicInfo',
266   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
267            'tls': 'bool'},
268   'if': 'CONFIG_SPICE' }
271 # @SpiceQueryMouseMode:
273 # An enumeration of Spice mouse states.
275 # @client: Mouse cursor position is determined by the client.
277 # @server: Mouse cursor position is determined by the server.
279 # @unknown: No information is available about mouse mode used by
280 #           the spice server.
282 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
284 # Since: 1.1
286 { 'enum': 'SpiceQueryMouseMode',
287   'data': [ 'client', 'server', 'unknown' ],
288   'if': 'CONFIG_SPICE' }
291 # @SpiceInfo:
293 # Information about the SPICE session.
295 # @enabled: true if the SPICE server is enabled, false otherwise
297 # @migrated: true if the last guest migration completed and spice
298 #            migration had completed as well. false otherwise. (since 1.4)
300 # @host: The hostname the SPICE server is bound to.  This depends on
301 #        the name resolution on the host and may be an IP address.
303 # @port: The SPICE server's port number.
305 # @compiled-version: SPICE server version.
307 # @tls-port: The SPICE server's TLS port number.
309 # @auth: the current authentication type used by the server
311 #        - 'none'  if no authentication is being used
312 #        - 'spice' uses SASL or direct TLS authentication, depending on command
313 #          line options
315 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
316 #              be determined by the client or the server, or unknown if spice
317 #              server doesn't provide this information. (since: 1.1)
319 # @channels: a list of @SpiceChannel for each active spice channel
321 # Since: 0.14
323 { 'struct': 'SpiceInfo',
324   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
325            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
326            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
327   'if': 'CONFIG_SPICE' }
330 # @query-spice:
332 # Returns information about the current SPICE server
334 # Returns: @SpiceInfo
336 # Since: 0.14
338 # Example:
340 # -> { "execute": "query-spice" }
341 # <- { "return": {
342 #          "enabled": true,
343 #          "auth": "spice",
344 #          "port": 5920,
345 #          "migrated":false,
346 #          "tls-port": 5921,
347 #          "host": "0.0.0.0",
348 #          "mouse-mode":"client",
349 #          "channels": [
350 #             {
351 #                "port": "54924",
352 #                "family": "ipv4",
353 #                "channel-type": 1,
354 #                "connection-id": 1804289383,
355 #                "host": "127.0.0.1",
356 #                "channel-id": 0,
357 #                "tls": true
358 #             },
359 #             {
360 #                "port": "36710",
361 #                "family": "ipv4",
362 #                "channel-type": 4,
363 #                "connection-id": 1804289383,
364 #                "host": "127.0.0.1",
365 #                "channel-id": 0,
366 #                "tls": false
367 #             },
368 #             [ ... more channels follow ... ]
369 #          ]
370 #       }
371 #    }
374 { 'command': 'query-spice', 'returns': 'SpiceInfo',
375   'if': 'CONFIG_SPICE' }
378 # @SPICE_CONNECTED:
380 # Emitted when a SPICE client establishes a connection
382 # @server: server information
384 # @client: client information
386 # Since: 0.14
388 # Example:
390 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
391 #      "event": "SPICE_CONNECTED",
392 #      "data": {
393 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
394 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
395 #    }}
398 { 'event': 'SPICE_CONNECTED',
399   'data': { 'server': 'SpiceBasicInfo',
400             'client': 'SpiceBasicInfo' },
401   'if': 'CONFIG_SPICE' }
404 # @SPICE_INITIALIZED:
406 # Emitted after initial handshake and authentication takes place (if any)
407 # and the SPICE channel is up and running
409 # @server: server information
411 # @client: client information
413 # Since: 0.14
415 # Example:
417 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
418 #      "event": "SPICE_INITIALIZED",
419 #      "data": {"server": {"auth": "spice", "port": "5921",
420 #                          "family": "ipv4", "host": "127.0.0.1"},
421 #               "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
422 #                          "connection-id": 1804289383, "host": "127.0.0.1",
423 #                          "channel-id": 0, "tls": true}
424 #    }}
427 { 'event': 'SPICE_INITIALIZED',
428   'data': { 'server': 'SpiceServerInfo',
429             'client': 'SpiceChannel' },
430   'if': 'CONFIG_SPICE' }
433 # @SPICE_DISCONNECTED:
435 # Emitted when the SPICE connection is closed
437 # @server: server information
439 # @client: client information
441 # Since: 0.14
443 # Example:
445 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
446 #      "event": "SPICE_DISCONNECTED",
447 #      "data": {
448 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
449 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
450 #    }}
453 { 'event': 'SPICE_DISCONNECTED',
454   'data': { 'server': 'SpiceBasicInfo',
455             'client': 'SpiceBasicInfo' },
456   'if': 'CONFIG_SPICE' }
459 # @SPICE_MIGRATE_COMPLETED:
461 # Emitted when SPICE migration has completed
463 # Since: 1.3
465 # Example:
467 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
468 #      "event": "SPICE_MIGRATE_COMPLETED" }
471 { 'event': 'SPICE_MIGRATE_COMPLETED',
472   'if': 'CONFIG_SPICE' }
475 # == VNC
479 # @VncBasicInfo:
481 # The basic information for vnc network connection
483 # @host: IP address
485 # @service: The service name of the vnc port. This may depend on the host
486 #           system's service database so symbolic names should not be relied
487 #           on.
489 # @family: address family
491 # @websocket: true in case the socket is a websocket (since 2.3).
493 # Since: 2.1
495 { 'struct': 'VncBasicInfo',
496   'data': { 'host': 'str',
497             'service': 'str',
498             'family': 'NetworkAddressFamily',
499             'websocket': 'bool' },
500   'if': 'CONFIG_VNC' }
503 # @VncServerInfo:
505 # The network connection information for server
507 # @auth: authentication method used for
508 #        the plain (non-websocket) VNC server
510 # Since: 2.1
512 { 'struct': 'VncServerInfo',
513   'base': 'VncBasicInfo',
514   'data': { '*auth': 'str' },
515   'if': 'CONFIG_VNC' }
518 # @VncClientInfo:
520 # Information about a connected VNC client.
522 # @x509_dname: If x509 authentication is in use, the Distinguished
523 #              Name of the client.
525 # @sasl_username: If SASL authentication is in use, the SASL username
526 #                 used for authentication.
528 # Since: 0.14
530 { 'struct': 'VncClientInfo',
531   'base': 'VncBasicInfo',
532   'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
533   'if': 'CONFIG_VNC' }
536 # @VncInfo:
538 # Information about the VNC session.
540 # @enabled: true if the VNC server is enabled, false otherwise
542 # @host: The hostname the VNC server is bound to.  This depends on
543 #        the name resolution on the host and may be an IP address.
545 # @family: - 'ipv6' if the host is listening for IPv6 connections
546 #          - 'ipv4' if the host is listening for IPv4 connections
547 #          - 'unix' if the host is listening on a unix domain socket
548 #          - 'unknown' otherwise
550 # @service: The service name of the server's port.  This may depends
551 #           on the host system's service database so symbolic names should not
552 #           be relied on.
554 # @auth: the current authentication type used by the server
556 #        - 'none' if no authentication is being used
557 #        - 'vnc' if VNC authentication is being used
558 #        - 'vencrypt+plain' if VEncrypt is used with plain text authentication
559 #        - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
560 #        - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
561 #        - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
562 #        - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
563 #        - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
564 #        - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
565 #        - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
566 #        - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
568 # @clients: a list of @VncClientInfo of all currently connected clients
570 # Since: 0.14
572 { 'struct': 'VncInfo',
573   'data': {'enabled': 'bool', '*host': 'str',
574            '*family': 'NetworkAddressFamily',
575            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
576   'if': 'CONFIG_VNC' }
579 # @VncPrimaryAuth:
581 # vnc primary authentication method.
583 # Since: 2.3
585 { 'enum': 'VncPrimaryAuth',
586   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
587             'tls', 'vencrypt', 'sasl' ],
588   'if': 'CONFIG_VNC' }
591 # @VncVencryptSubAuth:
593 # vnc sub authentication method with vencrypt.
595 # Since: 2.3
597 { 'enum': 'VncVencryptSubAuth',
598   'data': [ 'plain',
599             'tls-none',  'x509-none',
600             'tls-vnc',   'x509-vnc',
601             'tls-plain', 'x509-plain',
602             'tls-sasl',  'x509-sasl' ],
603   'if': 'CONFIG_VNC' }
606 # @VncServerInfo2:
608 # The network connection information for server
610 # @auth: The current authentication type used by the servers
612 # @vencrypt: The vencrypt sub authentication type used by the
613 #            servers, only specified in case auth == vencrypt.
615 # Since: 2.9
617 { 'struct': 'VncServerInfo2',
618   'base': 'VncBasicInfo',
619   'data': { 'auth'      : 'VncPrimaryAuth',
620             '*vencrypt' : 'VncVencryptSubAuth' },
621   'if': 'CONFIG_VNC' }
624 # @VncInfo2:
626 # Information about a vnc server
628 # @id: vnc server name.
630 # @server: A list of @VncBasincInfo describing all listening sockets.
631 #          The list can be empty (in case the vnc server is disabled).
632 #          It also may have multiple entries: normal + websocket,
633 #          possibly also ipv4 + ipv6 in the future.
635 # @clients: A list of @VncClientInfo of all currently connected clients.
636 #           The list can be empty, for obvious reasons.
638 # @auth: The current authentication type used by the non-websockets 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 #    }
686 { 'command': 'query-vnc', 'returns': 'VncInfo',
687   'if': 'CONFIG_VNC' }
689 # @query-vnc-servers:
691 # Returns a list of vnc servers.  The list can be empty.
693 # Returns: a list of @VncInfo2
695 # Since: 2.3
697 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
698   'if': 'CONFIG_VNC' }
701 # @change-vnc-password:
703 # Change the VNC server password.
705 # @password: the new password to use with VNC authentication
707 # Since: 1.1
709 # Notes: An empty password in this command will set the password to the empty
710 #        string.  Existing clients are unaffected by executing 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, thus
726 #       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 } }
741 { 'event': 'VNC_CONNECTED',
742   'data': { 'server': 'VncServerInfo',
743             'client': 'VncBasicInfo' },
744   'if': 'CONFIG_VNC' }
747 # @VNC_INITIALIZED:
749 # Emitted after authentication takes place (if any) and the VNC session is
750 # made active
752 # @server: server information
754 # @client: client information
756 # Since: 0.13
758 # Example:
760 # <-  { "event": "VNC_INITIALIZED",
761 #       "data": {
762 #            "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
763 #                        "service": "5901", "host": "0.0.0.0"},
764 #            "client": { "family": "ipv4", "service": "46089", "websocket": false,
765 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
766 #       "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
769 { 'event': 'VNC_INITIALIZED',
770   'data': { 'server': 'VncServerInfo',
771             'client': 'VncClientInfo' },
772   'if': 'CONFIG_VNC' }
775 # @VNC_DISCONNECTED:
777 # Emitted when the connection is closed
779 # @server: server information
781 # @client: client information
783 # Since: 0.13
785 # Example:
787 # <- { "event": "VNC_DISCONNECTED",
788 #      "data": {
789 #            "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
790 #                        "service": "5901", "host": "0.0.0.0" },
791 #            "client": { "family": "ipv4", "service": "58425", "websocket": false,
792 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
793 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
796 { 'event': 'VNC_DISCONNECTED',
797   'data': { 'server': 'VncServerInfo',
798             'client': 'VncClientInfo' },
799   'if': 'CONFIG_VNC' }
802 # = Input
806 # @MouseInfo:
808 # Information about a mouse device.
810 # @name: the name of the mouse device
812 # @index: the index of the mouse device
814 # @current: true if this device is currently receiving mouse events
816 # @absolute: true if this device supports absolute coordinates as input
818 # Since: 0.14
820 { 'struct': 'MouseInfo',
821   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
822            'absolute': 'bool'} }
825 # @query-mice:
827 # Returns information about each active mouse device
829 # Returns: a list of @MouseInfo for each device
831 # Since: 0.14
833 # Example:
835 # -> { "execute": "query-mice" }
836 # <- { "return": [
837 #          {
838 #             "name":"QEMU Microsoft Mouse",
839 #             "index":0,
840 #             "current":false,
841 #             "absolute":false
842 #          },
843 #          {
844 #             "name":"QEMU PS/2 Mouse",
845 #             "index":1,
846 #             "current":true,
847 #             "absolute":true
848 #          }
849 #       ]
850 #    }
853 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
856 # @QKeyCode:
858 # An enumeration of key name.
860 # This is used by the @send-key command.
862 # @unmapped: since 2.0
863 # @pause: since 2.0
864 # @ro: since 2.4
865 # @kp_comma: since 2.4
866 # @kp_equals: since 2.6
867 # @power: since 2.6
868 # @hiragana: since 2.9
869 # @henkan: since 2.9
870 # @yen: since 2.9
872 # @sleep: since 2.10
873 # @wake: since 2.10
874 # @audionext: since 2.10
875 # @audioprev: since 2.10
876 # @audiostop: since 2.10
877 # @audioplay: since 2.10
878 # @audiomute: since 2.10
879 # @volumeup: since 2.10
880 # @volumedown: since 2.10
881 # @mediaselect: since 2.10
882 # @mail: since 2.10
883 # @calculator: since 2.10
884 # @computer: since 2.10
885 # @ac_home: since 2.10
886 # @ac_back: since 2.10
887 # @ac_forward: since 2.10
888 # @ac_refresh: since 2.10
889 # @ac_bookmarks: since 2.10
891 # @muhenkan: since 2.12
892 # @katakanahiragana: since 2.12
894 # @lang1: since 6.1
895 # @lang2: since 6.1
897 # 'sysrq' was mistakenly added to hack around the fact that
898 # the ps2 driver was not generating correct scancodes sequences
899 # when 'alt+print' was pressed. This flaw is now fixed and the
900 # 'sysrq' key serves no further purpose. Any further use of
901 # 'sysrq' will be transparently changed to 'print', so they
902 # are effectively synonyms.
904 # Since: 1.3
907 { 'enum': 'QKeyCode',
908   'data': [ 'unmapped',
909             'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
910             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
911             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
912             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
913             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
914             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
915             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
916             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
917             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
918             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
919             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
920             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
921             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
922             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
923             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
924             'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
925             'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
926             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
927             'volumeup', 'volumedown', 'mediaselect',
928             'mail', 'calculator', 'computer',
929             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
930             'lang1', 'lang2' ] }
933 # @KeyValueKind:
935 # Since: 1.3
937 { 'enum': 'KeyValueKind',
938   'data': [ 'number', 'qcode' ] }
941 # @IntWrapper:
943 # Since: 1.3
945 { 'struct': 'IntWrapper',
946   'data': { 'data': 'int' } }
949 # @QKeyCodeWrapper:
951 # Since: 1.3
953 { 'struct': 'QKeyCodeWrapper',
954   'data': { 'data': 'QKeyCode' } }
957 # @KeyValue:
959 # Represents a keyboard key.
961 # Since: 1.3
963 { 'union': 'KeyValue',
964   'base': { 'type': 'KeyValueKind' },
965   'discriminator': 'type',
966   'data': {
967     'number': 'IntWrapper',
968     'qcode': 'QKeyCodeWrapper' } }
971 # @send-key:
973 # Send keys to guest.
975 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
976 #        simultaneously sent to the guest. A @KeyValue.number value is sent
977 #        directly to the guest, while @KeyValue.qcode must be a valid
978 #        @QKeyCode value
980 # @hold-time: time to delay key up events, milliseconds. Defaults
981 #             to 100
983 # Returns: - Nothing on success
984 #          - If key is unknown or redundant, InvalidParameter
986 # Since: 1.3
988 # Example:
990 # -> { "execute": "send-key",
991 #      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
992 #                               { "type": "qcode", "data": "alt" },
993 #                               { "type": "qcode", "data": "delete" } ] } }
994 # <- { "return": {} }
997 { 'command': 'send-key',
998   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
1001 # @InputButton:
1003 # Button of a pointer input device (mouse, tablet).
1005 # @side: front side button of a 5-button mouse (since 2.9)
1007 # @extra: rear side button of a 5-button mouse (since 2.9)
1009 # Since: 2.0
1011 { 'enum'  : 'InputButton',
1012   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
1013   'extra', 'wheel-left', 'wheel-right' ] }
1016 # @InputAxis:
1018 # Position axis of a pointer input device (mouse, tablet).
1020 # Since: 2.0
1022 { 'enum'  : 'InputAxis',
1023   'data'  : [ 'x', 'y' ] }
1026 # @InputKeyEvent:
1028 # Keyboard input event.
1030 # @key:    Which key this event is for.
1031 # @down:   True for key-down and false for key-up events.
1033 # Since: 2.0
1035 { 'struct'  : 'InputKeyEvent',
1036   'data'  : { 'key'     : 'KeyValue',
1037               'down'    : 'bool' } }
1040 # @InputBtnEvent:
1042 # Pointer button input event.
1044 # @button: Which button this event is for.
1045 # @down:   True for key-down and false for key-up events.
1047 # Since: 2.0
1049 { 'struct'  : 'InputBtnEvent',
1050   'data'  : { 'button'  : 'InputButton',
1051               'down'    : 'bool' } }
1054 # @InputMoveEvent:
1056 # Pointer motion input event.
1058 # @axis: Which axis is referenced by @value.
1059 # @value: Pointer position.  For absolute coordinates the
1060 #         valid range is 0 -> 0x7ffff
1062 # Since: 2.0
1064 { 'struct'  : 'InputMoveEvent',
1065   'data'  : { 'axis'    : 'InputAxis',
1066               'value'   : 'int' } }
1069 # @InputEventKind:
1071 # Since: 2.0
1073 { 'enum': 'InputEventKind',
1074   'data': [ 'key', 'btn', 'rel', 'abs' ] }
1077 # @InputKeyEventWrapper:
1079 # Since: 2.0
1081 { 'struct': 'InputKeyEventWrapper',
1082   'data': { 'data': 'InputKeyEvent' } }
1085 # @InputBtnEventWrapper:
1087 # Since: 2.0
1089 { 'struct': 'InputBtnEventWrapper',
1090   'data': { 'data': 'InputBtnEvent' } }
1093 # @InputMoveEventWrapper:
1095 # Since: 2.0
1097 { 'struct': 'InputMoveEventWrapper',
1098   'data': { 'data': 'InputMoveEvent' } }
1101 # @InputEvent:
1103 # Input event union.
1105 # @type: the input type, one of:
1107 #        - 'key': Input event of Keyboard
1108 #        - 'btn': Input event of pointer buttons
1109 #        - 'rel': Input event of relative pointer motion
1110 #        - 'abs': Input event of absolute pointer motion
1112 # Since: 2.0
1114 { 'union' : 'InputEvent',
1115   'base': { 'type': 'InputEventKind' },
1116   'discriminator': 'type',
1117   'data'  : { 'key'     : 'InputKeyEventWrapper',
1118               'btn'     : 'InputBtnEventWrapper',
1119               'rel'     : 'InputMoveEventWrapper',
1120               'abs'     : 'InputMoveEventWrapper' } }
1123 # @input-send-event:
1125 # Send input event(s) to guest.
1127 # The @device and @head parameters can be used to send the input event
1128 # to specific input devices in case (a) multiple input devices of the
1129 # same kind are added to the virtual machine and (b) you have
1130 # configured input routing (see docs/multiseat.txt) for those input
1131 # devices.  The parameters work exactly like the device and head
1132 # properties of input devices.  If @device is missing, only devices
1133 # that have no input routing config are admissible.  If @device is
1134 # specified, both input devices with and without input routing config
1135 # are admissible, but devices with input routing config take
1136 # precedence.
1138 # @device: display device to send event(s) to.
1139 # @head: head to send event(s) to, in case the
1140 #        display device supports multiple scanouts.
1141 # @events: List of InputEvent union.
1143 # Returns: Nothing on success.
1145 # Since: 2.6
1147 # Note: The consoles are visible in the qom tree, under
1148 #       /backend/console[$index]. They have a device link and head property,
1149 #       so it is possible to map which console belongs to which device and
1150 #       display.
1152 # Example:
1154 # 1. Press left mouse button.
1156 # -> { "execute": "input-send-event",
1157 #     "arguments": { "device": "video0",
1158 #                    "events": [ { "type": "btn",
1159 #                    "data" : { "down": true, "button": "left" } } ] } }
1160 # <- { "return": {} }
1162 # -> { "execute": "input-send-event",
1163 #     "arguments": { "device": "video0",
1164 #                    "events": [ { "type": "btn",
1165 #                    "data" : { "down": false, "button": "left" } } ] } }
1166 # <- { "return": {} }
1168 # 2. Press ctrl-alt-del.
1170 # -> { "execute": "input-send-event",
1171 #      "arguments": { "events": [
1172 #         { "type": "key", "data" : { "down": true,
1173 #           "key": {"type": "qcode", "data": "ctrl" } } },
1174 #         { "type": "key", "data" : { "down": true,
1175 #           "key": {"type": "qcode", "data": "alt" } } },
1176 #         { "type": "key", "data" : { "down": true,
1177 #           "key": {"type": "qcode", "data": "delete" } } } ] } }
1178 # <- { "return": {} }
1180 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1182 # -> { "execute": "input-send-event" ,
1183 #   "arguments": { "events": [
1184 #                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1185 #                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1186 # <- { "return": {} }
1189 { 'command': 'input-send-event',
1190   'data': { '*device': 'str',
1191             '*head'  : 'int',
1192             'events' : [ 'InputEvent' ] } }
1195 # @DisplayGTK:
1197 # GTK display options.
1199 # @grab-on-hover: Grab keyboard input on mouse hover.
1200 # @zoom-to-fit: Zoom guest display to fit into the host window.  When
1201 #               turned off the host window will be resized instead.
1202 #               In case the display device can notify the guest on
1203 #               window resizes (virtio-gpu) this will default to "on",
1204 #               assuming the guest will resize the display to match
1205 #               the window size then.  Otherwise it defaults to "off".
1206 #               Since 3.1
1208 # Since: 2.12
1211 { 'struct'  : 'DisplayGTK',
1212   'data'    : { '*grab-on-hover' : 'bool',
1213                 '*zoom-to-fit'   : 'bool'  } }
1216 # @DisplayEGLHeadless:
1218 # EGL headless display options.
1220 # @rendernode: Which DRM render node should be used. Default is the first
1221 #              available node on the host.
1223 # Since: 3.1
1226 { 'struct'  : 'DisplayEGLHeadless',
1227   'data'    : { '*rendernode' : 'str' } }
1230 # @DisplayDBus:
1232 # DBus display options.
1234 # @addr: The D-Bus bus address (default to the session bus).
1236 # @rendernode: Which DRM render node should be used. Default is the first
1237 #              available node on the host.
1239 # @p2p: Whether to use peer-to-peer connections (accepted through
1240 #       ``add_client``).
1242 # @audiodev: Use the specified DBus audiodev to export audio.
1244 # Since: 7.0
1247 { 'struct'  : 'DisplayDBus',
1248   'data'    : { '*rendernode' : 'str',
1249                 '*addr': 'str',
1250                 '*p2p': 'bool',
1251                 '*audiodev': 'str' } }
1253  ##
1254  # @DisplayGLMode:
1256  # Display OpenGL mode.
1258  # @off: Disable OpenGL (default).
1259  # @on: Use OpenGL, pick context type automatically.
1260  #      Would better be named 'auto' but is called 'on' for backward
1261  #      compatibility with bool type.
1262  # @core: Use OpenGL with Core (desktop) Context.
1263  # @es: Use OpenGL with ES (embedded systems) Context.
1265  # Since: 3.0
1267  ##
1268 { 'enum'    : 'DisplayGLMode',
1269   'data'    : [ 'off', 'on', 'core', 'es' ] }
1272 # @DisplayCurses:
1274 # Curses display options.
1276 # @charset:       Font charset used by guest (default: CP437).
1278 # Since: 4.0
1281 { 'struct'  : 'DisplayCurses',
1282   'data'    : { '*charset'       : 'str' } }
1285 # @DisplayCocoa:
1287 # Cocoa display options.
1289 # @left-command-key: Enable/disable forwarding of left command key to
1290 #                    guest. Allows command-tab window switching on the
1291 #                    host without sending this key to the guest when
1292 #                    "off". Defaults to "on"
1294 # @full-grab: Capture all key presses, including system combos. This
1295 #             requires accessibility permissions, since it performs
1296 #             a global grab on key events. (default: off)
1297 #             See https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1299 # @swap-opt-cmd: Swap the Option and Command keys so that their key codes match
1300 #                their position on non-Mac keyboards and you can use Meta/Super
1301 #                and Alt where you expect them. (default: off)
1303 # Since: 7.0
1305 { 'struct': 'DisplayCocoa',
1306   'data': {
1307       '*left-command-key': 'bool',
1308       '*full-grab': 'bool',
1309       '*swap-opt-cmd': 'bool'
1310   } }
1313 # @DisplayType:
1315 # Display (user interface) type.
1317 # @default: The default user interface, selecting from the first available
1318 #           of gtk, sdl, cocoa, and vnc.
1320 # @none: No user interface or video output display. The guest will
1321 #        still see an emulated graphics card, but its output will not
1322 #        be displayed to the QEMU user.
1324 # @gtk: The GTK user interface.
1326 # @sdl: The SDL user interface.
1328 # @egl-headless: No user interface, offload GL operations to a local
1329 #                DRI device. Graphical display need to be paired with
1330 #                VNC or Spice. (Since 3.1)
1332 # @curses: Display video output via curses.  For graphics device
1333 #          models which support a text mode, QEMU can display this
1334 #          output using a curses/ncurses interface. Nothing is
1335 #          displayed when the graphics device is in graphical mode or
1336 #          if the graphics device does not support a text
1337 #          mode. Generally only the VGA device models support text
1338 #          mode.
1340 # @cocoa: The Cocoa user interface.
1342 # @spice-app: Set up a Spice server and run the default associated
1343 #             application to connect to it. The server will redirect
1344 #             the serial console and QEMU monitors. (Since 4.0)
1346 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1348 # Since: 2.12
1351 { 'enum'    : 'DisplayType',
1352   'data'    : [
1353     { 'name': 'default' },
1354     { 'name': 'none' },
1355     { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1356     { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1357     { 'name': 'egl-headless',
1358               'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1359     { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1360     { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1361     { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1362     { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1363   ]
1367 # @DisplayOptions:
1369 # Display (user interface) options.
1371 # @type:          Which DisplayType qemu should use.
1372 # @full-screen:   Start user interface in fullscreen mode (default: off).
1373 # @window-close:  Allow to quit qemu with window close button (default: on).
1374 # @show-cursor:   Force showing the mouse cursor (default: off).
1375 #                 (since: 5.0)
1376 # @gl:            Enable OpenGL support (default: off).
1378 # Since: 2.12
1381 { 'union'   : 'DisplayOptions',
1382   'base'    : { 'type'           : 'DisplayType',
1383                 '*full-screen'   : 'bool',
1384                 '*window-close'  : 'bool',
1385                 '*show-cursor'   : 'bool',
1386                 '*gl'            : 'DisplayGLMode' },
1387   'discriminator' : 'type',
1388   'data'    : {
1389       'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1390       'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1391       'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1392       'egl-headless': { 'type': 'DisplayEGLHeadless',
1393                         'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1394       'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' }
1395   }
1399 # @query-display-options:
1401 # Returns information about display configuration
1403 # Returns: @DisplayOptions
1405 # Since: 3.1
1408 { 'command': 'query-display-options',
1409   'returns': 'DisplayOptions' }
1412 # @DisplayReloadType:
1414 # Available DisplayReload types.
1416 # @vnc: VNC display
1418 # Since: 6.0
1421 { 'enum': 'DisplayReloadType',
1422   'data': ['vnc'] }
1425 # @DisplayReloadOptionsVNC:
1427 # Specify the VNC reload options.
1429 # @tls-certs: reload tls certs or not.
1431 # Since: 6.0
1434 { 'struct': 'DisplayReloadOptionsVNC',
1435   'data': { '*tls-certs': 'bool' } }
1438 # @DisplayReloadOptions:
1440 # Options of the display configuration reload.
1442 # @type: Specify the display type.
1444 # Since: 6.0
1447 { 'union': 'DisplayReloadOptions',
1448   'base': {'type': 'DisplayReloadType'},
1449   'discriminator': 'type',
1450   'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1453 # @display-reload:
1455 # Reload display configuration.
1457 # Returns: Nothing on success.
1459 # Since: 6.0
1461 # Example:
1463 # -> { "execute": "display-reload",
1464 #      "arguments": { "type": "vnc", "tls-certs": true  } }
1465 # <- { "return": {} }
1468 { 'command': 'display-reload',
1469   'data': 'DisplayReloadOptions',
1470   'boxed' : true }
1473 # @DisplayUpdateType:
1475 # Available DisplayUpdate types.
1477 # @vnc: VNC display
1479 # Since: 7.1
1482 { 'enum': 'DisplayUpdateType',
1483   'data': ['vnc'] }
1486 # @DisplayUpdateOptionsVNC:
1488 # Specify the VNC reload options.
1490 # @addresses: If specified, change set of addresses
1491 #             to listen for connections. Addresses configured
1492 #             for websockets are not touched.
1494 # Since: 7.1
1497 { 'struct': 'DisplayUpdateOptionsVNC',
1498   'data': { '*addresses': ['SocketAddress'] } }
1501 # @DisplayUpdateOptions:
1503 # Options of the display configuration reload.
1505 # @type: Specify the display type.
1507 # Since: 7.1
1510 { 'union': 'DisplayUpdateOptions',
1511   'base': {'type': 'DisplayUpdateType'},
1512   'discriminator': 'type',
1513   'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1516 # @display-update:
1518 # Update display configuration.
1520 # Returns: Nothing on success.
1522 # Since: 7.1
1524 # Example:
1526 # -> { "execute": "display-update",
1527 #      "arguments": { "type": "vnc", "addresses":
1528 #                     [ { "type": "inet", "host": "0.0.0.0",
1529 #                         "port": "5901" } ] } }
1530 # <- { "return": {} }
1533 { 'command': 'display-update',
1534   'data': 'DisplayUpdateOptions',
1535   'boxed' : true }