From 18703b55d8db35cf8db2f4342f1b5880014d0a28 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Tue, 25 Apr 2017 14:50:58 +0100 Subject: osc: also add processing for axis_up/down events Considered semantically equivalent with mouse_btn3/4. This is a preemptive fix for upcoming changes to AXIS_* events. --- player/lua/osc.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'player/lua') diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 276e34f785..093f4e3020 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -1851,9 +1851,9 @@ function osc_init() ne.eventresponder["mouse_btn0_up"] = function () mp.commandv("cycle", "mute") end - ne.eventresponder["mouse_btn3_press"] = + ne.eventresponder["mouse_wheel_up_press"] = function () mp.commandv("osd-auto", "add", "volume", 5) end - ne.eventresponder["mouse_btn4_press"] = + ne.eventresponder["mouse_wheel_down_press"] = function () mp.commandv("osd-auto", "add", "volume", -5) end @@ -2302,8 +2302,10 @@ mp.set_key_bindings({ function(e) process_event("shift+mouse_btn0", "down") end}, {"mouse_btn2", function(e) process_event("mouse_btn2", "up") end, function(e) process_event("mouse_btn2", "down") end}, - {"mouse_btn3", function(e) process_event("mouse_btn3", "press") end}, - {"mouse_btn4", function(e) process_event("mouse_btn4", "press") end}, + {"mouse_btn3", function(e) process_event("mouse_wheel_up", "press") end}, + {"mouse_btn4", function(e) process_event("mouse_wheel_down", "press") end}, + {"axis_up", function(e) process_event("mouse_wheel_up", "press") end}, + {"axis_down", function(e) process_event("mouse_wheel_down", "press") end}, {"mouse_btn0_dbl", "ignore"}, {"shift+mouse_btn0_dbl", "ignore"}, {"mouse_btn2_dbl", "ignore"}, -- cgit v1.2.3