1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00
mpv/DOCS
James Ross-Gowan 957e9a37db input: use mnemonic names for mouse buttons
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
2017-09-03 20:31:44 +10:00
..
man video: change --deinterlace behavior 2017-08-22 19:08:07 +02:00
client-api-changes.rst client API: drop old "no-" option emulation 2017-06-26 20:07:20 +02:00
compile-windows.md wscript_build: install shared libmpv to BINDIR for Win32 2017-04-24 15:11:32 +01:00
contribute.md DOCS/contribute.md: coding style exception 2017-08-30 10:34:16 +02:00
edl-mpv.rst DOCS/edl-mpv.rst: fix typo 2017-02-05 16:02:58 +01:00
encoding.rst player: change default section when loading encoding-profiles.conf 2017-07-12 13:11:14 +02:00
interface-changes.rst input: use mnemonic names for mouse buttons 2017-09-03 20:31:44 +10:00
mplayer-changes.rst af_drc: remove 2017-03-25 12:57:10 +01:00
release-policy.md Release 0.25.0 2017-04-23 01:57:53 +02:00
tech-overview.txt DOCS/tech-overview.txt: updates 2017-06-29 17:31:55 +02:00
waf-buildsystem.rst DOCS/waf-buildsystem.rst: fix typo 2017-02-15 10:41:26 +01:00