1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-17 21:27:08 +00:00

osc.lua: bind middle button down instead of up for tracks

This makes it consistent with most other bindings and lets you cancel
the operation by moving the cursor away (the seekbar bind mouse down so
you can keep seeking to different timestamps).
This commit is contained in:
Guido Cella 2024-10-16 16:14:27 +02:00 committed by Kacper Michajłow
parent cd2acb477c
commit c24c9027af

View File

@ -1728,9 +1728,8 @@ local function osc_init()
end end
ne.eventresponder["shift+mbtn_left_up"] = ne.eventresponder["shift+mbtn_left_up"] =
function () mp.command("show-text ${playlist} 3000") end function () mp.command("show-text ${playlist} 3000") end
ne.eventresponder["mbtn_right_up"] = function () ne.eventresponder["mbtn_right_up"] =
mp.command("show-text ${playlist} 3000") function () mp.command("show-text ${playlist} 3000") end
end
--next --next
ne = new_element("pl_next", "button") ne = new_element("pl_next", "button")
@ -1746,9 +1745,8 @@ local function osc_init()
end end
ne.eventresponder["shift+mbtn_left_up"] = ne.eventresponder["shift+mbtn_left_up"] =
function () mp.command("show-text ${playlist} 3000") end function () mp.command("show-text ${playlist} 3000") end
ne.eventresponder["mbtn_right_up"] = function () ne.eventresponder["mbtn_right_up"] =
mp.command("show-text ${playlist} 3000") function () mp.command("show-text ${playlist} 3000") end
end
-- big buttons -- big buttons
@ -1844,7 +1842,7 @@ local function osc_init()
ne.eventresponder["mbtn_left_up"] = function () ne.eventresponder["mbtn_left_up"] = function ()
mp.command("script-binding select/select-aid; script-message-to osc osc-hide") mp.command("script-binding select/select-aid; script-message-to osc osc-hide")
end end
ne.eventresponder["shift+mbtn_left_down"] = ne.eventresponder["shift+mbtn_left_up"] =
function () mp.command("show-text ${track-list/audio} 2000") end function () mp.command("show-text ${track-list/audio} 2000") end
ne.eventresponder["shift+mbtn_right_up"] = ne.eventresponder["shift+mbtn_right_up"] =
function () mp.command("show-text ${track-list/sub} 2000") end function () mp.command("show-text ${track-list/sub} 2000") end
@ -1867,7 +1865,7 @@ local function osc_init()
ne.eventresponder["mbtn_left_up"] = function () ne.eventresponder["mbtn_left_up"] = function ()
mp.command("script-binding select/select-sid; script-message-to osc osc-hide") mp.command("script-binding select/select-sid; script-message-to osc osc-hide")
end end
ne.eventresponder["shift+mbtn_left_down"] = ne.eventresponder["shift+mbtn_left_up"] =
function () mp.command("show-text ${track-list/sub} 2000") end function () mp.command("show-text ${track-list/sub} 2000") end
ne.eventresponder["shift+mbtn_right_up"] = ne.eventresponder["shift+mbtn_right_up"] =
function () mp.command("show-text ${track-list/sub} 2000") end function () mp.command("show-text ${track-list/sub} 2000") end