TextProxy: don't re-press Ctrl after a paste if it was released meanwhile (stuck Ctrl)
Build & Release / build (push) Canceled after 0s
Build & Release / build (push) Canceled after 0s
This commit is contained in:
1 parent
e1c4ea96d7
commit
fdbf6d5583
3 files changed
+11
-3
No files matched your search
@@ -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
|
||||
|
||||
Generated
+1
-1
@@ -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"]]
|
||||
[[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"]]
|
||||
Generated
+5
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user