From 353dd2d093742885fbc8c868ed40c85e30e05bb9 Mon Sep 17 00:00:00 2001 From: Nose Date: Tue, 3 Feb 2026 18:29:29 -0800 Subject: [PATCH] Fix menu routing: use input.conf to bypass UOSC's mbtn_right claim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove mbtn_right keybinding from Lua (UOSC claims it globally with force flag) - Add input.conf with mbtn_right → script-message medios-show-menu routing - Add medios-show-menu handler in Lua to trigger M.show_menu() - Keep 'm' key binding as Lua keybinding for redundancy --- MPV/LUA/main.lua | 14 ++++++++------ MPV/portable_config/input.conf | 6 ++++++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 MPV/portable_config/input.conf diff --git a/MPV/LUA/main.lua b/MPV/LUA/main.lua index 793fe97..65b7657 100644 --- a/MPV/LUA/main.lua +++ b/MPV/LUA/main.lua @@ -2899,14 +2899,12 @@ end -- Keybindings with logging wrappers mp.add_key_binding("m", "medios-menu", function() - _lua_log('[KEY] mbtn m pressed') + _lua_log('[KEY] m pressed') M.show_menu() end) -mp.add_key_binding("mbtn_right", "medios-menu-right-click", function() - _lua_log('[KEY] mbtn_right pressed (right-click)') - M.show_menu() -end) +-- NOTE: mbtn_right is claimed by UOSC globally, so we can't override it here. +-- Instead, use script-message handler below for alternative routing. mp.add_key_binding("ctrl+i", "medios-info", M.get_file_info) mp.add_key_binding("ctrl+del", "medios-delete", M.delete_current_file) @@ -2914,7 +2912,11 @@ mp.add_key_binding("ctrl+del", "medios-delete", M.delete_current_file) mp.add_key_binding("l", "medeia-lyric-toggle", lyric_toggle) mp.add_key_binding("L", "medeia-lyric-toggle-shift", lyric_toggle) - +-- Script message handler for input.conf routing (right-click via input.conf) +mp.register_script_message('medios-show-menu', function() + _lua_log('[input.conf] medios-show-menu called') + M.show_menu() +end) -- Start the persistent pipeline helper eagerly at launch. -- This avoids spawning Python per command and works cross-platform via MPV IPC. diff --git a/MPV/portable_config/input.conf b/MPV/portable_config/input.conf new file mode 100644 index 0000000..ca5b8a9 --- /dev/null +++ b/MPV/portable_config/input.conf @@ -0,0 +1,6 @@ +# Medios Macina keybindings +# Route right-click to our menu handler (before UOSC can claim it) +mbtn_right script-message medios-show-menu + +# Route 'm' key (alternative to keybinding, in case keybinding doesn't work) +m script-message medios-show-menu