]> Git Repo - qemu.git/blame - qapi/ui.json
qapi: add conditions to VNC type/commands/events on the schema
[qemu.git] / qapi / ui.json
CommitLineData
608cfed6
MA
1# -*- Mode: Python -*-
2#
3
4##
5# = Remote desktop
6##
7
8{ 'include': 'sockets.json' }
9
10##
11# @set_password:
12#
13# Sets the password of a remote display session.
14#
15# @protocol: `vnc' to modify the VNC server password
16# `spice' to modify the Spice server password
17#
18# @password: the new password
19#
20# @connected: how to handle existing clients when changing the
21# password. If nothing is specified, defaults to `keep'
22# `fail' to fail the command if clients are connected
23# `disconnect' to disconnect existing clients
24# `keep' to maintain existing clients
25#
26# Returns: Nothing on success
27# If Spice is not enabled, DeviceNotFound
28#
29# Since: 0.14.0
30#
31# Example:
32#
33# -> { "execute": "set_password", "arguments": { "protocol": "vnc",
34# "password": "secret" } }
35# <- { "return": {} }
36#
37##
38{ 'command': 'set_password',
39 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
40
41##
42# @expire_password:
43#
44# Expire the password of a remote display server.
45#
46# @protocol: the name of the remote display protocol `vnc' or `spice'
47#
48# @time: when to expire the password.
49# `now' to expire the password immediately
50# `never' to cancel password expiration
51# `+INT' where INT is the number of seconds from now (integer)
52# `INT' where INT is the absolute time in seconds
53#
54# Returns: Nothing on success
55# If @protocol is `spice' and Spice is not active, DeviceNotFound
56#
57# Since: 0.14.0
58#
59# Notes: Time is relative to the server and currently there is no way to
60# coordinate server time with client time. It is not recommended to
61# use the absolute time version of the @time parameter unless you're
62# sure you are on the same machine as the QEMU instance.
63#
64# Example:
65#
66# -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
67# "time": "+60" } }
68# <- { "return": {} }
69#
70##
71{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
72
73##
74# @screendump:
75#
76# Write a PPM of the VGA screen to a file.
77#
78# @filename: the path of a new PPM file to store the image
79#
f771c544
TH
80# @device: ID of the display device that should be dumped. If this parameter
81# is missing, the primary display will be used. (Since 2.12)
82#
83# @head: head to use in case the device supports multiple heads. If this
84# parameter is missing, head #0 will be used. Also note that the head
85# can only be specified in conjunction with the device ID. (Since 2.12)
86#
608cfed6
MA
87# Returns: Nothing on success
88#
89# Since: 0.14.0
90#
91# Example:
92#
93# -> { "execute": "screendump",
94# "arguments": { "filename": "/tmp/image" } }
95# <- { "return": {} }
96#
97##
f771c544
TH
98{ 'command': 'screendump',
99 'data': {'filename': 'str', '*device': 'str', '*head': 'int'} }
608cfed6
MA
100
101##
102# == Spice
103##
104
105##
106# @SpiceBasicInfo:
107#
108# The basic information for SPICE network connection
109#
110# @host: IP address
111#
112# @port: port number
113#
114# @family: address family
115#
116# Since: 2.1
117##
118{ 'struct': 'SpiceBasicInfo',
119 'data': { 'host': 'str',
120 'port': 'str',
121 'family': 'NetworkAddressFamily' } }
122
123##
124# @SpiceServerInfo:
125#
126# Information about a SPICE server
127#
128# @auth: authentication method
129#
130# Since: 2.1
131##
132{ 'struct': 'SpiceServerInfo',
133 'base': 'SpiceBasicInfo',
134 'data': { '*auth': 'str' } }
135
136##
137# @SpiceChannel:
138#
139# Information about a SPICE client channel.
140#
141# @connection-id: SPICE connection id number. All channels with the same id
142# belong to the same SPICE session.
143#
144# @channel-type: SPICE channel type number. "1" is the main control
145# channel, filter for this one if you want to track spice
146# sessions only
147#
148# @channel-id: SPICE channel ID number. Usually "0", might be different when
149# multiple channels of the same type exist, such as multiple
150# display channels in a multihead setup
151#
152# @tls: true if the channel is encrypted, false otherwise.
153#
154# Since: 0.14.0
155##
156{ 'struct': 'SpiceChannel',
157 'base': 'SpiceBasicInfo',
158 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
159 'tls': 'bool'} }
160
161##
162# @SpiceQueryMouseMode:
163#
164# An enumeration of Spice mouse states.
165#
166# @client: Mouse cursor position is determined by the client.
167#
168# @server: Mouse cursor position is determined by the server.
169#
170# @unknown: No information is available about mouse mode used by
171# the spice server.
172#
173# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
174#
175# Since: 1.1
176##
177{ 'enum': 'SpiceQueryMouseMode',
178 'data': [ 'client', 'server', 'unknown' ] }
179
180##
181# @SpiceInfo:
182#
183# Information about the SPICE session.
184#
185# @enabled: true if the SPICE server is enabled, false otherwise
186#
187# @migrated: true if the last guest migration completed and spice
188# migration had completed as well. false otherwise. (since 1.4)
189#
190# @host: The hostname the SPICE server is bound to. This depends on
191# the name resolution on the host and may be an IP address.
192#
193# @port: The SPICE server's port number.
194#
195# @compiled-version: SPICE server version.
196#
197# @tls-port: The SPICE server's TLS port number.
198#
199# @auth: the current authentication type used by the server
200# 'none' if no authentication is being used
201# 'spice' uses SASL or direct TLS authentication, depending on command
202# line options
203#
204# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
205# be determined by the client or the server, or unknown if spice
206# server doesn't provide this information. (since: 1.1)
207#
208# @channels: a list of @SpiceChannel for each active spice channel
209#
210# Since: 0.14.0
211##
212{ 'struct': 'SpiceInfo',
213 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
214 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
215 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
216
217##
218# @query-spice:
219#
220# Returns information about the current SPICE server
221#
222# Returns: @SpiceInfo
223#
224# Since: 0.14.0
225#
226# Example:
227#
228# -> { "execute": "query-spice" }
229# <- { "return": {
230# "enabled": true,
231# "auth": "spice",
232# "port": 5920,
233# "tls-port": 5921,
234# "host": "0.0.0.0",
235# "channels": [
236# {
237# "port": "54924",
238# "family": "ipv4",
239# "channel-type": 1,
240# "connection-id": 1804289383,
241# "host": "127.0.0.1",
242# "channel-id": 0,
243# "tls": true
244# },
245# {
246# "port": "36710",
247# "family": "ipv4",
248# "channel-type": 4,
249# "connection-id": 1804289383,
250# "host": "127.0.0.1",
251# "channel-id": 0,
252# "tls": false
253# },
254# [ ... more channels follow ... ]
255# ]
256# }
257# }
258#
259##
260{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
261
262##
263# @SPICE_CONNECTED:
264#
265# Emitted when a SPICE client establishes a connection
266#
267# @server: server information
268#
269# @client: client information
270#
271# Since: 0.14.0
272#
273# Example:
274#
275# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
276# "event": "SPICE_CONNECTED",
277# "data": {
278# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
279# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
280# }}
281#
282##
283{ 'event': 'SPICE_CONNECTED',
284 'data': { 'server': 'SpiceBasicInfo',
285 'client': 'SpiceBasicInfo' } }
286
287##
288# @SPICE_INITIALIZED:
289#
290# Emitted after initial handshake and authentication takes place (if any)
291# and the SPICE channel is up and running
292#
293# @server: server information
294#
295# @client: client information
296#
297# Since: 0.14.0
298#
299# Example:
300#
301# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
302# "event": "SPICE_INITIALIZED",
303# "data": {"server": {"auth": "spice", "port": "5921",
304# "family": "ipv4", "host": "127.0.0.1"},
305# "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
306# "connection-id": 1804289383, "host": "127.0.0.1",
307# "channel-id": 0, "tls": true}
308# }}
309#
310##
311{ 'event': 'SPICE_INITIALIZED',
312 'data': { 'server': 'SpiceServerInfo',
313 'client': 'SpiceChannel' } }
314
315##
316# @SPICE_DISCONNECTED:
317#
318# Emitted when the SPICE connection is closed
319#
320# @server: server information
321#
322# @client: client information
323#
324# Since: 0.14.0
325#
326# Example:
327#
328# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
329# "event": "SPICE_DISCONNECTED",
330# "data": {
331# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
332# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
333# }}
334#
335##
336{ 'event': 'SPICE_DISCONNECTED',
337 'data': { 'server': 'SpiceBasicInfo',
338 'client': 'SpiceBasicInfo' } }
339
340##
341# @SPICE_MIGRATE_COMPLETED:
342#
343# Emitted when SPICE migration has completed
344#
345# Since: 1.3
346#
347# Example:
348#
349# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
350# "event": "SPICE_MIGRATE_COMPLETED" }
351#
352##
353{ 'event': 'SPICE_MIGRATE_COMPLETED' }
354
355##
356# == VNC
357##
358
359##
360# @VncBasicInfo:
361#
362# The basic information for vnc network connection
363#
364# @host: IP address
365#
366# @service: The service name of the vnc port. This may depend on the host
367# system's service database so symbolic names should not be relied
368# on.
369#
370# @family: address family
371#
372# @websocket: true in case the socket is a websocket (since 2.3).
373#
374# Since: 2.1
375##
376{ 'struct': 'VncBasicInfo',
377 'data': { 'host': 'str',
378 'service': 'str',
379 'family': 'NetworkAddressFamily',
05eb4a25
MAL
380 'websocket': 'bool' },
381 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
382
383##
384# @VncServerInfo:
385#
386# The network connection information for server
387#
388# @auth: authentication method used for
389# the plain (non-websocket) VNC server
390#
391# Since: 2.1
392##
393{ 'struct': 'VncServerInfo',
394 'base': 'VncBasicInfo',
05eb4a25
MAL
395 'data': { '*auth': 'str' },
396 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
397
398##
399# @VncClientInfo:
400#
401# Information about a connected VNC client.
402#
403# @x509_dname: If x509 authentication is in use, the Distinguished
404# Name of the client.
405#
406# @sasl_username: If SASL authentication is in use, the SASL username
407# used for authentication.
408#
409# Since: 0.14.0
410##
411{ 'struct': 'VncClientInfo',
412 'base': 'VncBasicInfo',
05eb4a25
MAL
413 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
414 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
415
416##
417# @VncInfo:
418#
419# Information about the VNC session.
420#
421# @enabled: true if the VNC server is enabled, false otherwise
422#
423# @host: The hostname the VNC server is bound to. This depends on
424# the name resolution on the host and may be an IP address.
425#
426# @family: 'ipv6' if the host is listening for IPv6 connections
427# 'ipv4' if the host is listening for IPv4 connections
428# 'unix' if the host is listening on a unix domain socket
429# 'unknown' otherwise
430#
431# @service: The service name of the server's port. This may depends
432# on the host system's service database so symbolic names should not
433# be relied on.
434#
435# @auth: the current authentication type used by the server
436# 'none' if no authentication is being used
437# 'vnc' if VNC authentication is being used
438# 'vencrypt+plain' if VEncrypt is used with plain text authentication
439# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
440# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
441# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
442# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
443# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
444# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
445# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
446# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
447#
448# @clients: a list of @VncClientInfo of all currently connected clients
449#
450# Since: 0.14.0
451##
452{ 'struct': 'VncInfo',
453 'data': {'enabled': 'bool', '*host': 'str',
454 '*family': 'NetworkAddressFamily',
05eb4a25
MAL
455 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
456 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
457
458##
459# @VncPrimaryAuth:
460#
461# vnc primary authentication method.
462#
463# Since: 2.3
464##
465{ 'enum': 'VncPrimaryAuth',
466 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
05eb4a25
MAL
467 'tls', 'vencrypt', 'sasl' ],
468 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
469
470##
471# @VncVencryptSubAuth:
472#
473# vnc sub authentication method with vencrypt.
474#
475# Since: 2.3
476##
477{ 'enum': 'VncVencryptSubAuth',
478 'data': [ 'plain',
479 'tls-none', 'x509-none',
480 'tls-vnc', 'x509-vnc',
481 'tls-plain', 'x509-plain',
05eb4a25
MAL
482 'tls-sasl', 'x509-sasl' ],
483 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
484
485##
486# @VncServerInfo2:
487#
488# The network connection information for server
489#
490# @auth: The current authentication type used by the servers
491#
492# @vencrypt: The vencrypt sub authentication type used by the
493# servers, only specified in case auth == vencrypt.
494#
495# Since: 2.9
496##
497{ 'struct': 'VncServerInfo2',
498 'base': 'VncBasicInfo',
499 'data': { 'auth' : 'VncPrimaryAuth',
05eb4a25
MAL
500 '*vencrypt' : 'VncVencryptSubAuth' },
501 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
502
503##
504# @VncInfo2:
505#
506# Information about a vnc server
507#
508# @id: vnc server name.
509#
510# @server: A list of @VncBasincInfo describing all listening sockets.
511# The list can be empty (in case the vnc server is disabled).
512# It also may have multiple entries: normal + websocket,
513# possibly also ipv4 + ipv6 in the future.
514#
515# @clients: A list of @VncClientInfo of all currently connected clients.
516# The list can be empty, for obvious reasons.
517#
518# @auth: The current authentication type used by the non-websockets servers
519#
520# @vencrypt: The vencrypt authentication type used by the servers,
521# only specified in case auth == vencrypt.
522#
523# @display: The display device the vnc server is linked to.
524#
525# Since: 2.3
526##
527{ 'struct': 'VncInfo2',
528 'data': { 'id' : 'str',
529 'server' : ['VncServerInfo2'],
530 'clients' : ['VncClientInfo'],
531 'auth' : 'VncPrimaryAuth',
532 '*vencrypt' : 'VncVencryptSubAuth',
05eb4a25
MAL
533 '*display' : 'str' },
534 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
535
536##
537# @query-vnc:
538#
539# Returns information about the current VNC server
540#
541# Returns: @VncInfo
542#
543# Since: 0.14.0
544#
545# Example:
546#
547# -> { "execute": "query-vnc" }
548# <- { "return": {
549# "enabled":true,
550# "host":"0.0.0.0",
551# "service":"50402",
552# "auth":"vnc",
553# "family":"ipv4",
554# "clients":[
555# {
556# "host":"127.0.0.1",
557# "service":"50401",
558# "family":"ipv4"
559# }
560# ]
561# }
562# }
563#
564##
05eb4a25
MAL
565{ 'command': 'query-vnc', 'returns': 'VncInfo',
566 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
567##
568# @query-vnc-servers:
569#
570# Returns a list of vnc servers. The list can be empty.
571#
572# Returns: a list of @VncInfo2
573#
574# Since: 2.3
575##
05eb4a25
MAL
576{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
577 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
578
579##
580# @change-vnc-password:
581#
582# Change the VNC server password.
583#
584# @password: the new password to use with VNC authentication
585#
586# Since: 1.1
587#
588# Notes: An empty password in this command will set the password to the empty
589# string. Existing clients are unaffected by executing this command.
590##
05eb4a25
MAL
591{ 'command': 'change-vnc-password', 'data': {'password': 'str'},
592 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
593
594##
595# @VNC_CONNECTED:
596#
597# Emitted when a VNC client establishes a connection
598#
599# @server: server information
600#
601# @client: client information
602#
603# Note: This event is emitted before any authentication takes place, thus
604# the authentication ID is not provided
605#
606# Since: 0.13.0
607#
608# Example:
609#
610# <- { "event": "VNC_CONNECTED",
611# "data": {
612# "server": { "auth": "sasl", "family": "ipv4",
613# "service": "5901", "host": "0.0.0.0" },
614# "client": { "family": "ipv4", "service": "58425",
615# "host": "127.0.0.1" } },
616# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
617#
618##
619{ 'event': 'VNC_CONNECTED',
620 'data': { 'server': 'VncServerInfo',
05eb4a25
MAL
621 'client': 'VncBasicInfo' },
622 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
623
624##
625# @VNC_INITIALIZED:
626#
627# Emitted after authentication takes place (if any) and the VNC session is
628# made active
629#
630# @server: server information
631#
632# @client: client information
633#
634# Since: 0.13.0
635#
636# Example:
637#
638# <- { "event": "VNC_INITIALIZED",
639# "data": {
640# "server": { "auth": "sasl", "family": "ipv4",
641# "service": "5901", "host": "0.0.0.0"},
642# "client": { "family": "ipv4", "service": "46089",
643# "host": "127.0.0.1", "sasl_username": "luiz" } },
644# "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
645#
646##
647{ 'event': 'VNC_INITIALIZED',
648 'data': { 'server': 'VncServerInfo',
05eb4a25
MAL
649 'client': 'VncClientInfo' },
650 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
651
652##
653# @VNC_DISCONNECTED:
654#
655# Emitted when the connection is closed
656#
657# @server: server information
658#
659# @client: client information
660#
661# Since: 0.13.0
662#
663# Example:
664#
665# <- { "event": "VNC_DISCONNECTED",
666# "data": {
667# "server": { "auth": "sasl", "family": "ipv4",
668# "service": "5901", "host": "0.0.0.0" },
669# "client": { "family": "ipv4", "service": "58425",
670# "host": "127.0.0.1", "sasl_username": "luiz" } },
671# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
672#
673##
674{ 'event': 'VNC_DISCONNECTED',
675 'data': { 'server': 'VncServerInfo',
05eb4a25
MAL
676 'client': 'VncClientInfo' },
677 'if': 'defined(CONFIG_VNC)' }
608cfed6
MA
678
679##
680# = Input
681##
682
683##
684# @MouseInfo:
685#
686# Information about a mouse device.
687#
688# @name: the name of the mouse device
689#
690# @index: the index of the mouse device
691#
692# @current: true if this device is currently receiving mouse events
693#
694# @absolute: true if this device supports absolute coordinates as input
695#
696# Since: 0.14.0
697##
698{ 'struct': 'MouseInfo',
699 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
700 'absolute': 'bool'} }
701
702##
703# @query-mice:
704#
705# Returns information about each active mouse device
706#
707# Returns: a list of @MouseInfo for each device
708#
709# Since: 0.14.0
710#
711# Example:
712#
713# -> { "execute": "query-mice" }
714# <- { "return": [
715# {
716# "name":"QEMU Microsoft Mouse",
717# "index":0,
718# "current":false,
719# "absolute":false
720# },
721# {
722# "name":"QEMU PS/2 Mouse",
723# "index":1,
724# "current":true,
725# "absolute":true
726# }
727# ]
728# }
729#
730##
731{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
732
733##
734# @QKeyCode:
735#
736# An enumeration of key name.
737#
738# This is used by the @send-key command.
739#
740# @unmapped: since 2.0
741# @pause: since 2.0
742# @ro: since 2.4
743# @kp_comma: since 2.4
744# @kp_equals: since 2.6
745# @power: since 2.6
746# @hiragana: since 2.9
747# @henkan: since 2.9
748# @yen: since 2.9
749#
750# @sleep: since 2.10
751# @wake: since 2.10
752# @audionext: since 2.10
753# @audioprev: since 2.10
754# @audiostop: since 2.10
755# @audioplay: since 2.10
756# @audiomute: since 2.10
757# @volumeup: since 2.10
758# @volumedown: since 2.10
759# @mediaselect: since 2.10
760# @mail: since 2.10
761# @calculator: since 2.10
762# @computer: since 2.10
763# @ac_home: since 2.10
764# @ac_back: since 2.10
765# @ac_forward: since 2.10
766# @ac_refresh: since 2.10
767# @ac_bookmarks: since 2.10
768# altgr, altgr_r: dropped in 2.10
769#
280b8da3
M
770# @muhenkan: since 2.12
771# @katakanahiragana: since 2.12
772#
80b857f0
DB
773# 'sysrq' was mistakenly added to hack around the fact that
774# the ps2 driver was not generating correct scancodes sequences
775# when 'alt+print' was pressed. This flaw is now fixed and the
776# 'sysrq' key serves no further purpose. Any further use of
777# 'sysrq' will be transparently changed to 'print', so they
778# are effectively synonyms.
779#
608cfed6
MA
780# Since: 1.3.0
781#
782##
783{ 'enum': 'QKeyCode',
784 'data': [ 'unmapped',
785 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
786 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
787 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
788 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
789 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
790 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
791 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
792 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
793 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
794 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
795 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
796 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
797 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
798 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
799 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
280b8da3 800 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
608cfed6
MA
801 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
802 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
803 'volumeup', 'volumedown', 'mediaselect',
804 'mail', 'calculator', 'computer',
805 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
806
807##
808# @KeyValue:
809#
810# Represents a keyboard key.
811#
812# Since: 1.3.0
813##
814{ 'union': 'KeyValue',
815 'data': {
816 'number': 'int',
817 'qcode': 'QKeyCode' } }
818
819##
820# @send-key:
821#
822# Send keys to guest.
823#
824# @keys: An array of @KeyValue elements. All @KeyValues in this array are
825# simultaneously sent to the guest. A @KeyValue.number value is sent
826# directly to the guest, while @KeyValue.qcode must be a valid
827# @QKeyCode value
828#
829# @hold-time: time to delay key up events, milliseconds. Defaults
830# to 100
831#
832# Returns: Nothing on success
833# If key is unknown or redundant, InvalidParameter
834#
835# Since: 1.3.0
836#
837# Example:
838#
839# -> { "execute": "send-key",
840# "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
841# { "type": "qcode", "data": "alt" },
842# { "type": "qcode", "data": "delete" } ] } }
843# <- { "return": {} }
844#
845##
846{ 'command': 'send-key',
847 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
848
849##
850# @InputButton:
851#
852# Button of a pointer input device (mouse, tablet).
853#
854# @side: front side button of a 5-button mouse (since 2.9)
855#
856# @extra: rear side button of a 5-button mouse (since 2.9)
857#
858# Since: 2.0
859##
860{ 'enum' : 'InputButton',
861 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
862 'extra' ] }
863
864##
865# @InputAxis:
866#
867# Position axis of a pointer input device (mouse, tablet).
868#
869# Since: 2.0
870##
871{ 'enum' : 'InputAxis',
872 'data' : [ 'x', 'y' ] }
873
874##
875# @InputKeyEvent:
876#
877# Keyboard input event.
878#
879# @key: Which key this event is for.
880# @down: True for key-down and false for key-up events.
881#
882# Since: 2.0
883##
884{ 'struct' : 'InputKeyEvent',
885 'data' : { 'key' : 'KeyValue',
886 'down' : 'bool' } }
887
888##
889# @InputBtnEvent:
890#
891# Pointer button input event.
892#
893# @button: Which button this event is for.
894# @down: True for key-down and false for key-up events.
895#
896# Since: 2.0
897##
898{ 'struct' : 'InputBtnEvent',
899 'data' : { 'button' : 'InputButton',
900 'down' : 'bool' } }
901
902##
903# @InputMoveEvent:
904#
905# Pointer motion input event.
906#
907# @axis: Which axis is referenced by @value.
908# @value: Pointer position. For absolute coordinates the
909# valid range is 0 -> 0x7ffff
910#
911# Since: 2.0
912##
913{ 'struct' : 'InputMoveEvent',
914 'data' : { 'axis' : 'InputAxis',
915 'value' : 'int' } }
916
917##
918# @InputEvent:
919#
920# Input event union.
921#
922# @type: the input type, one of:
923# - 'key': Input event of Keyboard
924# - 'btn': Input event of pointer buttons
925# - 'rel': Input event of relative pointer motion
926# - 'abs': Input event of absolute pointer motion
927#
928# Since: 2.0
929##
930{ 'union' : 'InputEvent',
931 'data' : { 'key' : 'InputKeyEvent',
932 'btn' : 'InputBtnEvent',
933 'rel' : 'InputMoveEvent',
934 'abs' : 'InputMoveEvent' } }
935
936##
937# @input-send-event:
938#
939# Send input event(s) to guest.
940#
941# @device: display device to send event(s) to.
942# @head: head to send event(s) to, in case the
943# display device supports multiple scanouts.
944# @events: List of InputEvent union.
945#
946# Returns: Nothing on success.
947#
948# The @device and @head parameters can be used to send the input event
949# to specific input devices in case (a) multiple input devices of the
950# same kind are added to the virtual machine and (b) you have
951# configured input routing (see docs/multiseat.txt) for those input
952# devices. The parameters work exactly like the device and head
953# properties of input devices. If @device is missing, only devices
954# that have no input routing config are admissible. If @device is
955# specified, both input devices with and without input routing config
956# are admissible, but devices with input routing config take
957# precedence.
958#
959# Since: 2.6
960#
961# Note: The consoles are visible in the qom tree, under
962# /backend/console[$index]. They have a device link and head property,
963# so it is possible to map which console belongs to which device and
964# display.
965#
966# Example:
967#
968# 1. Press left mouse button.
969#
970# -> { "execute": "input-send-event",
971# "arguments": { "device": "video0",
972# "events": [ { "type": "btn",
973# "data" : { "down": true, "button": "left" } } ] } }
974# <- { "return": {} }
975#
976# -> { "execute": "input-send-event",
977# "arguments": { "device": "video0",
978# "events": [ { "type": "btn",
979# "data" : { "down": false, "button": "left" } } ] } }
980# <- { "return": {} }
981#
982# 2. Press ctrl-alt-del.
983#
984# -> { "execute": "input-send-event",
985# "arguments": { "events": [
986# { "type": "key", "data" : { "down": true,
987# "key": {"type": "qcode", "data": "ctrl" } } },
988# { "type": "key", "data" : { "down": true,
989# "key": {"type": "qcode", "data": "alt" } } },
990# { "type": "key", "data" : { "down": true,
991# "key": {"type": "qcode", "data": "delete" } } } ] } }
992# <- { "return": {} }
993#
994# 3. Move mouse pointer to absolute coordinates (20000, 400).
995#
996# -> { "execute": "input-send-event" ,
997# "arguments": { "events": [
998# { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
999# { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1000# <- { "return": {} }
1001#
1002##
1003{ 'command': 'input-send-event',
1004 'data': { '*device': 'str',
1005 '*head' : 'int',
1006 'events' : [ 'InputEvent' ] } }
0c8d7065
GH
1007
1008
0c8d7065
GH
1009##
1010# @DisplayGTK:
1011#
1012# GTK display options.
1013#
1014# @grab-on-hover: Grab keyboard input on mouse hover.
1015#
1016# Since: 2.12
1017#
1018##
1019{ 'struct' : 'DisplayGTK',
1020 'data' : { '*grab-on-hover' : 'bool' } }
1021
62f27922
ET
1022 ##
1023 # @DisplayGLMode:
1024 #
1025 # Display OpenGL mode.
1026 #
1027 # @off: Disable OpenGL (default).
1028 # @on: Use OpenGL, pick context type automatically.
1029 # Would better be named 'auto' but is called 'on' for backward
1030 # compatibility with bool type.
1031 # @core: Use OpenGL with Core (desktop) Context.
1032 # @es: Use OpenGL with ES (embedded systems) Context.
1033 #
51f63ec7 1034 # Since: 3.0
62f27922
ET
1035 #
1036 ##
1037 { 'enum' : 'DisplayGLMode',
1038 'data' : [ 'off', 'on', 'core', 'es' ] }
1039
0c8d7065
GH
1040##
1041# @DisplayType:
1042#
1043# Display (user interface) type.
1044#
1045# Since: 2.12
1046#
1047##
1048{ 'enum' : 'DisplayType',
e3af9f9a 1049 'data' : [ 'default', 'none', 'gtk', 'sdl',
767f9bf3 1050 'egl-headless', 'curses', 'cocoa' ] }
0c8d7065
GH
1051
1052##
1053# @DisplayOptions:
1054#
1055# Display (user interface) options.
1056#
1057# @type: Which DisplayType qemu should use.
1058# @full-screen: Start user interface in fullscreen mode (default: off).
1059# @window-close: Allow to quit qemu with window close button (default: on).
1060# @gl: Enable OpenGL support (default: off).
1061#
1062# Since: 2.12
1063#
1064##
1065{ 'union' : 'DisplayOptions',
1066 'base' : { 'type' : 'DisplayType',
1067 '*full-screen' : 'bool',
1068 '*window-close' : 'bool',
62f27922 1069 '*gl' : 'DisplayGLMode' },
0c8d7065 1070 'discriminator' : 'type',
29cd0403 1071 'data' : { 'gtk' : 'DisplayGTK' } }
This page took 0.211541 seconds and 4 git commands to generate.