aboutsummaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorAmos Kong <akong@redhat.com>2014-11-07 12:41:25 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-11-13 11:06:40 +0100
commit51fc44768a5b71ad78fa40e609a58f71ed62775a (patch)
tree7c991d2c094a1a0293a7848eae03a457f6dd92ee /qapi-schema.json
parent935fb9152208fd98d99ffb91e719606b0c8e76b5 (diff)
downloadqemu-arm-51fc44768a5b71ad78fa40e609a58f71ed62775a.tar.gz
QMP/input-send-event: make console parameter optional
The 'QemuConsole' is the input source for handler, we share some input handlers to process the input events from different QemuConsole. Normally we only have one set of keyboard, mouse, usbtablet, etc. The devices have different mask, it's fine to just checking mask to insure that the handler has the ability to process the event. I saw we try to bind console to handler in usb/dev-hid.c, but display always isn't available at that time. If we have multiseat setup (as Gerd said), we only have 'problem' in this case. Actually event from different devices have the same effect for system, it's fine to always use the first available handler without caring about the console. For send-key command, we just pass a NULL for console parameter in calling qemu_input_event_send_key(NULL, ..), but 'input-send-event' needs to care more devices. Conclusion: Generally assigning the special console is meanless, and we can't directly remove the QMP parameter for compatibility. So we can make the parameter optional. The parameter might be useful for some special condition: we have multiple devices without binding console and they all have the ability(mask) to process events, and we don't want to use the first one. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json4
1 files changed, 2 insertions, 2 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index 7e7468f0de..d0926d95f6 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3249,7 +3249,7 @@
#
# Send input event(s) to guest.
#
-# @console: Which console to send event(s) to.
+# @console: #optional console to send event(s) to.
#
# @events: List of InputEvent union.
#
@@ -3259,7 +3259,7 @@
#
##
{ 'command': 'input-send-event',
- 'data': { 'console':'int', 'events': [ 'InputEvent' ] } }
+ 'data': { '*console':'int', 'events': [ 'InputEvent' ] } }
##
# @NumaOptions