Statistics
| Branch: | Revision:

root / input.c @ e2134eb9

History | View | Annotate | Download (13.3 kB)

# Date Author Comment
9d537c90 09/27/2012 03:50 pm Luiz Capitulino

input: index_from_key(): drop unused code

The hex key conversion is unused since last commit.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>
Reviewed-by: Markus Armbruster <>

9f328977 09/27/2012 03:50 pm Luiz Capitulino

qmp: qmp_send_key(): accept key codes in hex

Before the qapi conversion, the sendkey command could be used to
send key codes in hex directly to the guest. In HMP, this would
be like:

(qemu) sendkey 0xdc

However, the qapi conversion broke this, as it only supports sending...

05a3543d 09/27/2012 03:48 pm Luiz Capitulino

input: qmp_send_key(): simplify

The current code duplicates the QKeyCodeList keys in order to store
the key values for release_keys() late run. This is a bit complicated
though, as we have to care about correct ordering and then release_keys()
will have to index key_defs[] over again....

e4c8f004 09/05/2012 09:48 pm Amos Kong

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 to
index of key_defs, and 'index' will be converted to 'keycode'
inside qmp_send_key()....

1048c88f 09/05/2012 09:48 pm Amos Kong

monitor: move key_defs[] table and introduce two help functions

This patch added two help functions to convert key/code to index of
mapping table, those functions will return Q_KEY_CODE_MAX if the
code/key is invalid.

Patch also moved key_defs[] to input.c, and removed useless KeyDef struct....

ad02b96a 05/08/2012 08:30 pm Luiz Capitulino

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 that
the guest is suspended. QMP also has an event for this, but events
are not reliable and are limited (ie. a client can connect to QEMU...

99c7f878 02/17/2012 07:02 pm Gerd Hoffmann

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, with
a high chance to have them cause unwanted actions.

Avoid that by only injecting the input events only when the guest...

31552529 02/17/2012 04:33 pm Paolo Bonzini

notifier: switch to QLIST

Notifiers do not need to access both ends of the list, and using
a QLIST also simplifies the API.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

e235cec3 10/27/2011 04:48 pm Luiz Capitulino

qapi: Convert query-mice

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

9e8dd451 07/23/2011 07:26 pm Jan Kiszka

notifier: Pass data argument to callback

This allows to pass additional information to the notifier callback
which is useful if sender and receiver do not share any other distinct
data structure.

Will be used first for the clock reset notifier.

Signed-off-by: Jan Kiszka <>...

9312805d 07/04/2011 11:12 pm Vasily Khoruzhick

pxa2xx_lcd: add proper rotation support

Until now, pxa2xx_lcd only supported 90deg rotation, but
some machines (for example Zipit Z2) needs 270deg rotation.

Signed-off-by: Vasily Khoruzhick <>
Signed-off-by: Andrzej Zaborowski <>

97697373 04/09/2011 12:56 pm Brad Hards

event: trivial coding style fixes

Signed-off-by: Brad Hards <>
Signed-off-by: Stefan Hajnoczi <>

46aaebff 06/14/2010 11:46 pm Jes Sorensen

un-register kbd driver in case of USB kbd unplug.

If a USB keyboard is unplugged, the keyboard eventhandler is never
removed, and events will continue to be passed through to the device,
causing crashes or memory corruption.

Signed-off-by: Jes Sorensen <>...

637503d1 06/01/2010 09:48 pm Luiz Capitulino

Monitor: Drop QMP documentation from code

Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.

While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we...

6fef28ee 03/19/2010 10:27 pm Anthony Liguori

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 it
until the guest starts using the tablet. We implement this behavior in order...

eb2e259d 03/19/2010 10:27 pm Anthony Liguori

Add kbd_mouse_has_absolute()

kbd_mouse_is_absolute tells us whether the current mouse handler is an absolute
device. kbd_mouse_has_absolute tells us whether we have any device that is
capable of absolute input.

This lets us tell a user that they have configured an absolute device but that...

7e581fb3 03/19/2010 10:27 pm Anthony Liguori

Add notifier for mouse mode changes

Right now, DisplayState clients rely on polling the mouse mode to determine
when the device is changed to an absolute device. Use a notification list to
add an explicit notification.

Signed-off-by: Anthony Liguori <>

1aaee43c 03/19/2010 10:27 pm Anthony Liguori

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 human
monitor, we add (absolute) to the end of the line.

Signed-off-by: Anthony Liguori <>

03a23a85 03/09/2010 04:47 pm Gerd Hoffmann

kbd leds: infrastructure

Adds infrastructure for keyboard led status tracking to qemu.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

8f0056b7 01/14/2010 01:14 am Paolo Bonzini

move kbd/mouse handling to input.c

Move 200 lines out of vl.c already into common code that only needs to
be compiled once.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>