From bee91678d61f2ca905e5fd70ae466a986dcf1b19 Mon Sep 17 00:00:00 2001 From: SlowRiot Date: Sun, 8 Dec 2024 15:57:41 +0000 Subject: [PATCH] prevent "Delete" getting printed in text input --- backends/imgui_impl_emscripten.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/imgui_impl_emscripten.cpp b/backends/imgui_impl_emscripten.cpp index e1d199e6d..05b6de3d8 100644 --- a/backends/imgui_impl_emscripten.cpp +++ b/backends/imgui_impl_emscripten.cpp @@ -456,6 +456,7 @@ void ImGui_ImplEmscripten_Init() { case ImGuiKey_Tab: // consuming tab prevents the user tabbing to other parts of the browser interface outside the window content return imgui_io.WantCaptureKeyboard; // the event was consumed only if imgui wants to capture the keyboard case ImGuiKey_Enter: // consuming enter prevents the word "Enter" appearing in text input via the keypress callback + case ImGuiKey_Delete: // consuming enter prevents the word "Delete" appearing in text input via the keypress callback return imgui_io.WantTextInput; // the event was consumed only if we're currently accepting text input default: return false; // the event was not consumed