History | View | Annotate | Download (13.3 kB)
input: index_from_key(): drop unused code
The hex key conversion is unused since last commit.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
qmp: qmp_send_key(): accept key codes in hex
Before the qapi conversion, the sendkey command could be used tosend key codes in hex directly to the guest. In HMP, this wouldbe like:
(qemu) sendkey 0xdc
However, the qapi conversion broke this, as it only supports sending...
input: qmp_send_key(): simplify
The current code duplicates the QKeyCodeList keys in order to storethe key values for release_keys() late run. This is a bit complicatedthough, as we have to care about correct ordering and then release_keys()will have to index key_defs[] over again....
qapi: convert sendkey
Convert 'sendkey' to use QAPI.
QAPI passes key's index of mapping table to qmp_send_key(),not keycode. So we use help functions to convert key/code toindex of key_defs, and 'index' will be converted to 'keycode'inside qmp_send_key()....
monitor: move key_defs[] table and introduce two help functions
This patch added two help functions to convert key/code to index ofmapping table, those functions will return Q_KEY_CODE_MAX if thecode/key is invalid.
Patch also moved key_defs[] to input.c, and removed useless KeyDef struct....
runstate: introduce suspended state
QEMU enters in this state when the guest suspends to ram (S3).
This is important so that HMP users and QMP clients can know thatthe guest is suspended. QMP also has an event for this, but eventsare not reliable and are limited (ie. a client can connect to QEMU...
input: send kbd+mouse events only to running guests.
Trying to interact with a stopped guest will queue up the events,then send them all at once when the guest continues running, witha high chance to have them cause unwanted actions.
Avoid that by only injecting the input events only when the guest...
notifier: switch to QLIST
Notifiers do not need to access both ends of the list, and usinga QLIST also simplifies the API.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qapi: Convert query-mice
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
notifier: Pass data argument to callback
This allows to pass additional information to the notifier callbackwhich is useful if sender and receiver do not share any other distinctdata structure.
Will be used first for the clock reset notifier.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
pxa2xx_lcd: add proper rotation support
Until now, pxa2xx_lcd only supported 90deg rotation, butsome machines (for example Zipit Z2) needs 270deg rotation.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
event: trivial coding style fixes
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
un-register kbd driver in case of USB kbd unplug.
If a USB keyboard is unplugged, the keyboard eventhandler is neverremoved, and events will continue to be passed through to the device,causing crashes or memory corruption.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
Monitor: Drop QMP documentation from code
Previous commit added QMP documentation to the qemu-monitor.hxfile, it's is a copy of this information.
While it's good to keep it near code, maintaining two copies ofthe same information is too hard and has little benefit as we...
Rewrite mouse handlers to use QTAILQ and to have an activation function
And convert usb-hid to use it (to avoid regression with bisection)
Right now, when we do info mice and we've added a usb tablet, we don't see ituntil the guest starts using the tablet. We implement this behavior in order...
Add kbd_mouse_has_absolute()
kbd_mouse_is_absolute tells us whether the current mouse handler is an absolutedevice. kbd_mouse_has_absolute tells us whether we have any device that iscapable of absolute input.
This lets us tell a user that they have configured an absolute device but that...
Add notifier for mouse mode changes
Right now, DisplayState clients rely on polling the mouse mode to determinewhen the device is changed to an absolute device. Use a notification list toadd an explicit notification.
Expose whether a mouse is an absolute device via QMP and the human monitor.
For QMP, we just add an attribute which is backwards compatible. For the humanmonitor, we add (absolute) to the end of the line.
kbd leds: infrastructure
Adds infrastructure for keyboard led status tracking to qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
move kbd/mouse handling to input.c
Move 200 lines out of vl.c already into common code that only needs tobe compiled once.