From f3c35afe0790057d09bd33cf3e47e299f4ff1ac5 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sun, 22 Mar 2026 04:09:10 -0400 Subject: [PATCH] Add debug inspector toggle for control-shift mouse click in UI --- sys/modules/opus/ui.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/modules/opus/ui.lua b/sys/modules/opus/ui.lua index 8451e1d..ad399b3 100644 --- a/sys/modules/opus/ui.lua +++ b/sys/modules/opus/ui.lua @@ -115,12 +115,16 @@ function UI:init() local ie = Input:translate('mouse_up', button, x, y) local currentPage = self:getActivePage() - if ie.code == 'control-shift-mouse_click' then -- hack - local event = currentPage:pointToChild(x, y) - _ENV.multishell.openTab(_ENV, { - path = 'sys/apps/Lua.lua', - args = { event.element, self, _ENV }, - focused = true }) + if ie.code == 'control-shift-mouse_click' then -- debug inspector + local Config = require('opus.config') + local debugCfg = Config.load('os', { debug_inspector = false }) + if debugCfg.debug_inspector then + local event = currentPage:pointToChild(x, y) + _ENV.multishell.openTab(_ENV, { + path = 'sys/apps/Lua.lua', + args = { event.element, self, _ENV }, + focused = true }) + end elseif ie and currentPage and currentPage.parent.device.side == side then self:click(currentPage, ie)