From fdbf6d5583f3a87f33e5a3ec13adf8f1bc27bfd7 Mon Sep 17 00:00:00 2001 From: 4DBug <4DBug@github.com> Date: Sat, 17 Oct 2026 07:09:25 -0500 Subject: [PATCH] TextProxy: don't re-press Ctrl after a paste if it was released meanwhile (stuck Ctrl) --- backends/roblox/imgui_impl_roblox.lua | 6 +++++- build/ImGui.linemap.json | 2 +- build/ImGui.luau | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/backends/roblox/imgui_impl_roblox.lua b/backends/roblox/imgui_impl_roblox.lua index 8ffac63..eeac370 100644 --- a/backends/roblox/imgui_impl_roblox.lua +++ b/backends/roblox/imgui_impl_roblox.lua @@ -360,7 +360,11 @@ function ImGui_ImplRoblox_NewFrame() for _, cp in utf8.codes(text:sub(#prev + 1)) do io:AddInputCharacter(cp) end end end - if ctrl then io:AddKeyEvent(ImGuiMod_Ctrl, true) end + -- re-press only if still physically held: the text can arrive after Ctrl's InputEnded, and re-pressing + -- then left Ctrl stuck down in imgui (typing ignored, shortcuts broken until Ctrl was pressed again) + if ctrl and (UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.RightControl)) then + io:AddKeyEvent(ImGuiMod_Ctrl, true) + end used_proxy_text = true BackendData.ProxyText = nil end diff --git a/build/ImGui.linemap.json b/build/ImGui.linemap.json index 89d433a..03ba5c9 100644 --- a/build/ImGui.linemap.json +++ b/build/ImGui.linemap.json @@ -1 +1 @@ -[[46, "imgui.lua"], [22648, "imgui_demo.lua"], [34505, "imgui_draw.lua"], [42835, "imgui_h.lua"], [45838, "roblox/raster.lua"], [46314, "roblox/textures.lua"], [46485, "roblox/layers.lua"], [46822, "roblox/overlays.lua"], [46903, "roblox/render.lua"], [47748, "roblox/parallel.lua"], [48147, "imgui_impl_roblox.lua"], [48644, "imgui_impl_roblox_fonts.lua"], [55047, "imgui_internal.lua"], [59013, "imgui_tables.lua"], [64105, "imgui_widgets.lua"], [76343, "imstb_rectpack.lua"], [77007, "imstb_textedit.lua"], [78549, "imstb_truetype.lua"], [81337, "imstd_minstdio.lua"]] \ No newline at end of file +[[46, "imgui.lua"], [22648, "imgui_demo.lua"], [34505, "imgui_draw.lua"], [42835, "imgui_h.lua"], [45838, "roblox/raster.lua"], [46314, "roblox/textures.lua"], [46485, "roblox/layers.lua"], [46822, "roblox/overlays.lua"], [46903, "roblox/render.lua"], [47748, "roblox/parallel.lua"], [48147, "imgui_impl_roblox.lua"], [48648, "imgui_impl_roblox_fonts.lua"], [55051, "imgui_internal.lua"], [59017, "imgui_tables.lua"], [64109, "imgui_widgets.lua"], [76347, "imstb_rectpack.lua"], [77011, "imstb_textedit.lua"], [78553, "imstb_truetype.lua"], [81341, "imstd_minstdio.lua"]] \ No newline at end of file diff --git a/build/ImGui.luau b/build/ImGui.luau index 6e18070..0465d94 100644 --- a/build/ImGui.luau +++ b/build/ImGui.luau @@ -48506,7 +48506,11 @@ function ImGui_ImplRoblox_NewFrame() for _, cp in utf8.codes(text:sub(#prev + 1)) do io:AddInputCharacter(cp) end end end - if ctrl then io:AddKeyEvent(4096 --[[ImGuiMod_Ctrl]], true) end + -- re-press only if still physically held: the text can arrive after Ctrl's InputEnded, and re-pressing + -- then left Ctrl stuck down in imgui (typing ignored, shortcuts broken until Ctrl was pressed again) + if ctrl and (UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.RightControl)) then + io:AddKeyEvent(4096 --[[ImGuiMod_Ctrl]], true) + end used_proxy_text = true BackendData.ProxyText = nil end