summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2017-04-25 14:50:58 +0100
committerRicardo Constantino <wiiaboo@gmail.com>2017-04-25 15:42:09 +0100
commit18703b55d8db35cf8db2f4342f1b5880014d0a28 (patch)
treed482731759dd3ad17c097c09ffd49f96b3e09646 /player/lua
parent6d65ab3a7d4057c844327adfe8e81dcf5ecbaea5 (diff)
downloadmpv-18703b55d8db35cf8db2f4342f1b5880014d0a28.tar.bz2
mpv-18703b55d8db35cf8db2f4342f1b5880014d0a28.tar.xz
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.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/osc.lua10
1 files changed, 6 insertions, 4 deletions
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"},