From c24c9027af67bbad5ad2c8471d7abbfc6d6eea8e Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Wed, 16 Oct 2024 16:14:27 +0200 Subject: [PATCH] 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). --- player/lua/osc.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 39d5c2fb90..60dd2d8612 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -1728,9 +1728,8 @@ local function osc_init() end ne.eventresponder["shift+mbtn_left_up"] = function () mp.command("show-text ${playlist} 3000") end - ne.eventresponder["mbtn_right_up"] = function () - mp.command("show-text ${playlist} 3000") - end + ne.eventresponder["mbtn_right_up"] = + function () mp.command("show-text ${playlist} 3000") end --next ne = new_element("pl_next", "button") @@ -1746,9 +1745,8 @@ local function osc_init() end ne.eventresponder["shift+mbtn_left_up"] = function () mp.command("show-text ${playlist} 3000") end - ne.eventresponder["mbtn_right_up"] = function () - mp.command("show-text ${playlist} 3000") - end + ne.eventresponder["mbtn_right_up"] = + function () mp.command("show-text ${playlist} 3000") end -- big buttons @@ -1844,7 +1842,7 @@ local function osc_init() ne.eventresponder["mbtn_left_up"] = function () mp.command("script-binding select/select-aid; script-message-to osc osc-hide") end - ne.eventresponder["shift+mbtn_left_down"] = + ne.eventresponder["shift+mbtn_left_up"] = function () mp.command("show-text ${track-list/audio} 2000") end ne.eventresponder["shift+mbtn_right_up"] = function () mp.command("show-text ${track-list/sub} 2000") end @@ -1867,7 +1865,7 @@ local function osc_init() ne.eventresponder["mbtn_left_up"] = function () mp.command("script-binding select/select-sid; script-message-to osc osc-hide") end - ne.eventresponder["shift+mbtn_left_down"] = + ne.eventresponder["shift+mbtn_left_up"] = function () mp.command("show-text ${track-list/sub} 2000") end ne.eventresponder["shift+mbtn_right_up"] = function () mp.command("show-text ${track-list/sub} 2000") end