#579968 Emulated mice should support a horizontal scroll wheel

Package:
qemu-kvm
Source:
qemu
Submitter:
Brad Jorsch
Date:
2025-07-28 19:57:02 UTC
Severity:
wishlist
Tags:
#579968#5
Date:
2010-05-02 17:40:55 UTC
From:
To:
Where possible, the emulated mice should support a horizontal wheel. The
attached patch series does the following:

01: Add parameters for the horizontal wheel delta to the relevant
    functions and typedefs. The hwheel delta is passed as 0 in all
    calls.
02: Allow input of the horizontal wheel delta in the mouse_move command.
03: Pass on the horizontal wheel events from sdl.c (if SDL_BUTTON_X1 is
    defined) and vnc.c (assuming that the horizontal wheel is reported
    in the same way as the veritcal wheel).
04: Adjust hw/usb-hid.c to report a mouse with a horizontal wheel, and
    report the horizontal wheel events.
05: Adjust hw/ps2.c to report horizontal wheel events when emulating an
    exps/2 mouse.

With this patch, both the usb and ps/2 mice correctly report horizontal
wheel events in xev using the Ububtu 10.04 desktop cd image. If you try
to repeat this, make sure vmmouse isn't being used since the vmmouse
protocol doesn't seem to support a horizontal wheel.

#579968#10
Date:
2010-05-03 17:14:53 UTC
From:
To:
02.05.2010 21:40, Brad Jorsch wrote:
[..snip..]

Brad, thank you very much for your excellent work on
this.  I tried your patches and the horisontal scrolling
appears to work here, this is something I wanted to check
for quite some time but didn't.

But please, don't post your work as patches for debian
package.  The patches should be sent and applied upstream,
to qemu (not even to qemu-kvm) source tree, there's no
reason to keep them in debian.

I can forward your patches upstream, that's not a big
deal, but I wont help you this way, because I'll be
acting as a "broken phone", or it will be just unwise
to do so, not fair for your good efforts.

Please add proper Signed-Off-By line to each of the
patches, and resend the whole lot to qemu-devel@nongnu.org.
You can add my

  Tested-By: Michael Tokarev <mjt@tls.msk.ru>

if you wish.

But if you prefer me to handle all this, just indicate
that, and I'll happily do what I can.

Thank you very much!

/mjt

#579968#15
Date:
2010-05-04 16:54:04 UTC
From:
To:
tags 579968 + upstream
forwarded 579968 qemu-devel@nongnu.org
thanks

I have subscribed to that list, thanks for the pointer. Watch for the
patches there momentarily.

I left that out, as I took the opportunity to add a horizontal wheel to
the USB tablet and I noticed a bug in the exps/2 wheel. So the version
you tested isn't exactly the version being submitted upstream.

I went ahead and marked this bug as forwarded upstream (or tried to,
anyway). Please do whatever else needs doing to it.

#579968#24
Date:
2010-05-22 10:08:32 UTC
From:
To:
I opened a bugreport against upstream qemu, see
https://bugs.launchpad.net/qemu/+bug/584155

Apparently upstream is _very_ interested in this... :(

/mjt

#579968#31
Date:
2014-11-03 17:04:03 UTC
From:
To:
(This is about http://bugs.debian.org/579968 or
https://bugs.launchpad.net/qemu/+bug/584155 )

Upstream somewhat commented on this patch stating that
there should be more generic mechanism to pass more
mouse events to the guest, and adding new argument for
every of them does not really work.

The suggested patch does not apply upstream for a
long time, for many releases.  So untagging this
bugreport.

However, it might be that some missing mouse events
work now.  Not sure about horizontal scroll...

Thanks,

/mjt