0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

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.
This commit is contained in:
Ricardo Constantino 2017-04-25 14:50:58 +01:00
parent 6d65ab3a7d
commit 18703b55d8
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -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"},