From b35c9341ecd2db0b3aa4ad634da8c0033c880f05 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Thu, 7 May 2026 09:20:01 -0700 Subject: [PATCH] fix(editor): WASD/QE flycam works while hovering ImGui panels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Camera key events were gated on io.WantCaptureKeyboard, which goes true whenever any ImGui panel has focus — not just when typing into a text widget. Hovering the cursor over a side panel silently disabled the flycam, which read as "WASD doesn't move the camera." Switched the gate to io.WantTextInput, which is true only while a text widget is actively accepting input. Now WASD/QE/Shift work exactly when they should: always, except while you're typing into a field. --- tools/editor/editor_app.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_app.cpp b/tools/editor/editor_app.cpp index 3426b4c8..57ad1a49 100644 --- a/tools/editor/editor_app.cpp +++ b/tools/editor/editor_app.cpp @@ -442,7 +442,11 @@ void EditorApp::processEvents() { } } } - if (!io.WantCaptureKeyboard) + // Use WantTextInput (true only while typing into a text widget) + // instead of WantCaptureKeyboard (true whenever any ImGui panel + // has focus). Otherwise hovering over a panel silently disables + // the WASD/QE flycam, which was the practical user complaint. + if (!io.WantTextInput) camera_.processKeyEvent(event.key); }