Mpv: Mouse wheel bindings are controlled by MOUSE_BTN3 and 4 instead of AXIS_UP and AXIS_DOWN

Created on 29 Sep 2016  路  4Comments  路  Source: mpv-player/mpv

mpv verion

0.20.0 64 bit, Windows 7

Reproduction steps

Try to bind mouse wheel to a different action (or none):

# Volume on mouse wheel
AXIS_UP   add volume 2
AXIS_DOWN add volume -2

Expected behavior

On scrolling, volume should get changed.

Actual behavior

Scrolling still seeks.

Most helpful comment

Wheel up and down is MOUSE_BTN3 and MOUSE_BTN4, respectively, not AXIS_UP and AXIS_DOWN.

All 4 comments

Wheel up and down is MOUSE_BTN3 and MOUSE_BTN4, respectively, not AXIS_UP and AXIS_DOWN.

Uh, okay, thanks. It does work indeed.

But this is stupid because the mouse buttons 3 and 4 actually exist and get pushed to 5 and 6 instead, it seems. And because the comments in the default input.conf specifically mention that AXIS_* handles the mouse wheel.

Yeah, this should be fixed. It seems like only the macOS and Wayland backends emit AXIS_UP and AXIS_DOWN. macOS seems to emit AXIS_UP and AXIS_DOWN for touchpads that support precise scrolling and MOUSE_BTN3 and MOUSE_BTN4 for normal scroll wheels. The Windows backend could be changed to support AXIS_UP and AXIS_DOWN, but then MOUSE_BTN3 and MOUSE_BTN4 would stop working because there's no easy way to tell if a scroll event was generated from a device that supports precise scrolling or not. Maybe MOUSE_BTN3 and MOUSE_BTN4 should be deprecated or emulated on top of AXIS_UP and AXIS_DOWN?

957e9a37db6611fe0879bd2097131df5e09afd47

Was this page helpful?
0 / 5 - 0 ratings