mirror of https://github.com/mpv-player/mpv
957e9a37db
mpv's mouse button numbering is based on X11 button numbering, which allows for an arbitrary number of buttons and includes mouse wheel input as buttons 3-6. This button numbering was used throughout the codebase and exposed in input.conf, and it was difficult to remember which physical button each number actually referred to and which referred to the scroll wheel. In practice, PC mice only have between two and five buttons and one or two scroll wheel axes, which are more or less in the same location and have more or less the same function. This allows us to use names to refer to the buttons instead of numbers, which makes input.conf syntax a lot easier to remember. It also makes the syntax robust to changes in mpv's underlying numbering. The old MOUSE_BTNx names are still understood as deprecated aliases of the named buttons. This changes both the input.conf syntax and the MP_MOUSE_BTNx symbols in the codebase, since I think both would benefit from using names over numbers, especially since some platforms don't use X11 button numbering and handle different mouse buttons in different windowing system events. This also makes the names shorter, since otherwise they would be pretty long, and it removes the high-numbered MOUSE_BTNx_DBL names, since they weren't used. Names are the same as used in Qt: https://doc.qt.io/qt-5/qt.html#MouseButton-enum |
||
---|---|---|
.. | ||
cocoa | ||
opengl | ||
wayland | ||
win32 | ||
aspect.c | ||
aspect.h | ||
bitmap_packer.c | ||
bitmap_packer.h | ||
cocoa_common.h | ||
cocoa_common.m | ||
d3d_shader_420p.h | ||
d3d_shader_yuv.hlsl | ||
dither.c | ||
dither.h | ||
drm_common.c | ||
drm_common.h | ||
filter_kernels.c | ||
filter_kernels.h | ||
vo.c | ||
vo.h | ||
vo_caca.c | ||
vo_direct3d.c | ||
vo_drm.c | ||
vo_image.c | ||
vo_lavc.c | ||
vo_null.c | ||
vo_opengl.c | ||
vo_opengl_cb.c | ||
vo_rpi.c | ||
vo_sdl.c | ||
vo_tct.c | ||
vo_vaapi.c | ||
vo_vdpau.c | ||
vo_wayland.c | ||
vo_x11.c | ||
vo_xv.c | ||
w32_common.c | ||
w32_common.h | ||
wayland_common.c | ||
wayland_common.h | ||
win_state.c | ||
win_state.h | ||
x11_common.c | ||
x11_common.h |