LibVNC / x11vnc

a VNC server for real X displays
GNU General Public License v2.0
717 stars 139 forks source link

src: uinput: Add mousewheel support #243

Closed StefanMayrhofer closed 2 months ago

StefanMayrhofer commented 9 months ago

Currently, x11vnc does not forward mousewheel events to uinput correctly. Using evtest shows that a USB mouse sends EV_REL events with REL_WHEEL and REL_WHEEL_HI_RES codes but x11vnc uinput injector sends different commands.

According to https://datatracker.ietf.org/doc/html/rfc6143#section-7.5.5, mouse buttons 4 and 5 are the mousewheel and thus should be treated as such.

The value "120" for REL_WHEEL_HI_RES is what I measured using evtest.

I have tested this and it works for me. I am open to feedback.