[vfio-users] Fwd: [PATCH v2 1/3] input: add qemu_input_qcode_to_linux + qemu_input_linux_to_qcode

sL1pKn07 SpinFlo sl1pkn07 at gmail.com
Fri Jan 15 18:06:16 UTC 2016


---------- Forwarded message ----------
From: Gerd Hoffmann <kraxel at redhat.com>
Date: 2016-01-15 14:24 GMT+01:00
Subject: Re: [vfio-users] [PATCH v2 1/3] input: add
qemu_input_qcode_to_linux + qemu_input_linux_to_qcode
To: sL1pKn07 SpinFlo <sl1pkn07 at gmail.com>


> --- a/include/standard-headers/linux/input-event-codes.h
> +++ b/include/standard-headers/linux/input-event-codes.h
> @@ -416,6 +416,11 @@
>  #define BTN_WHEEL 0x150
>  #define BTN_GEAR_DOWN 0x150
>  #define BTN_GEAR_UP 0x151
> +#define BTN_GEAR_LEFT 0x???   /* FIXME! */
> +#define BTN_GEAR_RIGHT 0x???   /* FIXME! */
> +#define BTN_FUNCTION_1 0x???   /* FIXME! */
> +#define BTN_FUNCTION_2 0x???   /* FIXME! */

The ones sent by your mouse most likely already in the list.

Add "log=on" to the mouse, then qemu will log all mouse events it gets
from the kernel to stderr, including the ones it doesn't handle.  That
should show which wheel and button events the mouse sends.  Lets
continue from there.

More buttons can be defined by adding them to InputButton in
qapi-schema.json

Most tricky part is probably getting the mouse events to the guest os.
quick look as the ps/2 emulation looks like there are no unused bits for
more buttons.  Possibly we have to extend the usb mouse emulation for
that.  Need to google a bit on that (any hints are welcome ;) ...

cheers,
  Gerd




More information about the vfio-users mailing list