summaryrefslogtreecommitdiffstats
path: root/input/input.h
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossy@jrg.systems>2017-09-03 00:00:52 +1000
committerJames Ross-Gowan <rossy@jrg.systems>2017-09-03 20:31:44 +1000
commit7897f79217af1e04e6e65bd72e938058e84c451a (patch)
tree0a0a6434ddcf5f97b3eebfd159d01647ee1f3ffa /input/input.h
parent8fe4aa94ee7e5400450c124397c8edabfd6d726b (diff)
downloadmpv-7897f79217af1e04e6e65bd72e938058e84c451a.tar.bz2
mpv-7897f79217af1e04e6e65bd72e938058e84c451a.tar.xz
input: merge mouse wheel and axis keycodes
Mouse wheel bindings have always been a cause of user confusion. Previously, on Wayland and macOS, precise touchpads would generate AXIS keycodes and notched mouse wheels would generate mouse button keycodes. On Windows, both types of device would generate AXIS keycodes and on X11, both types of device would generate mouse button keycodes. This made it pretty difficult for users to modify their mouse-wheel bindings, since it differed between platforms and in some cases, between devices. To make it more confusing, the keycodes used on Windows were changed in 18a45a42d524 without a deprecation period or adequate communication to users. This change aims to make mouse wheel binds less confusing. Both the mouse button and AXIS keycodes are now deprecated aliases of the new WHEEL keycodes. This will technically break input configs on Wayland and macOS that assign different commands to precise and non-precise scroll events, but this is probably uncommon (if anyone does it at all) and I think it's a fair tradeoff for finally fixing mouse wheel-related confusion on other platforms.
Diffstat (limited to 'input/input.h')
-rw-r--r--input/input.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/input.h b/input/input.h
index 0ea054d21b..f00eb9b0e2 100644
--- a/input/input.h
+++ b/input/input.h
@@ -143,7 +143,7 @@ void mp_input_put_key_utf8(struct input_ctx *ictx, int mods, struct bstr t);
// Process scrolling input. Support for precise scrolling. Scales the given
// scroll amount add multiplies it with the command (seeking, sub-delay, etc)
-void mp_input_put_axis(struct input_ctx *ictx, int direction, double value);
+void mp_input_put_wheel(struct input_ctx *ictx, int direction, double value);
// Update mouse position (in window coordinates).
void mp_input_set_mouse_pos(struct input_ctx *ictx, int x, int y);