diff --git a/src/uosc/lib/menus.lua b/src/uosc/lib/menus.lua index a202b222..2cad37c2 100644 --- a/src/uosc/lib/menus.lua +++ b/src/uosc/lib/menus.lua @@ -19,7 +19,10 @@ function open_command_menu(data, opts) ---@diagnostic disable-next-line: deprecated mp.commandv(unpack(itable_join({'script-message-to'}, menu.root.callback, {utils.format_json(event)}))) elseif event.type == 'activate' then - run_command(event.value) + -- Modifiers and actions are not available on basic non-callback mode menus + if not event.modifiers and not event.action then + run_command(event.value) + end -- Convention: Only pure item activations should close the menu. -- Using modifiers or triggering item actions should not. if not event.keep_open and not event.modifiers and not event.action then