mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 07:18:17 +00: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:
parent
6d65ab3a7d
commit
18703b55d8
@ -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"},
|
||||
|
Loading…
Reference in New Issue
Block a user