mpv/player
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
..
javascript js: add javascript scripting support using MuJS 2017-06-14 12:29:32 +02:00
lua input: use mnemonic names for mouse buttons 2017-09-03 20:31:44 +10:00
audio.c audio: introduce a new type to hold audio frames 2017-08-16 21:10:54 +02:00
client.c client API: change mpv_create() behavior, run init always on mpv thread 2017-06-30 13:14:39 +02:00
client.h client API: turn mpv_suspend() and mpv_resume() into stubs 2016-11-22 15:54:44 +01:00
command.c input: use mnemonic names for mouse buttons 2017-09-03 20:31:44 +10:00
command.h player: change license of most core files to LGPL 2017-06-23 16:55:02 +02:00
configfiles.c player: change default section when loading encoding-profiles.conf 2017-07-12 13:11:14 +02:00
core.h video: change --deinterlace behavior 2017-08-22 19:08:07 +02:00
external_files.c player: readd smi subtitle extension 2017-08-08 11:37:04 +02:00
external_files.h external_files: change license to LGPL 2017-06-20 14:22:10 +02:00
javascript.c js: utils.getenv(): fix crash on undefined var 2017-07-06 18:11:24 +03:00
lavfi.c audio: introduce a new type to hold audio frames 2017-08-16 21:10:54 +02:00
lavfi.h audio: introduce a new type to hold audio frames 2017-08-16 21:10:54 +02:00
loadfile.c audio: introduce a new type to hold audio frames 2017-08-16 21:10:54 +02:00
lua.c scripting: expand --script filename for C plugins 2017-06-09 19:42:12 +02:00
main.c player: change license of most core files to LGPL 2017-06-23 16:55:02 +02:00
misc.c player: make refresh seeks slightly more robust 2017-08-14 14:02:13 +02:00
osd.c player: change license of most core files to LGPL 2017-06-23 16:55:02 +02:00
playloop.c audio: introduce a new type to hold audio frames 2017-08-16 21:10:54 +02:00
screenshot.c screenshot: cleanup: use normal MSGL_ defines 2017-04-01 20:47:36 +02:00
screenshot.h player: make screenshot commands honor the async flag 2017-04-01 20:47:23 +02:00
scripting.c scripting: add wrapper to load scripts with user paths 2017-06-30 15:03:10 +01:00
sub.c player: change license of most core files to LGPL 2017-06-23 16:55:02 +02:00
video.c video: change --deinterlace behavior 2017-08-22 19:08:07 +02:00