Skip to content

Issue with ImGui 1.90.1 #35

Open
Open

Description

@sphaero

Had make a slight change handling the ESC key in order to build. Not sure what the escapeKey >= 0 was doing?

diff --git a/ImFileDialog.cpp b/ImFileDialog.cpp
index 53832d9..439f0e9 100644
--- a/ImFileDialog.cpp
+++ b/ImFileDialog.cpp
@@ -1406,9 +1406,9 @@ namespace ifd {
                                m_finalize();
                }
 
-               int escapeKey = ImGui::GetIO().KeyMap[ImGuiKey_Escape];
                if (ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) &&
-                        escapeKey >= 0 && ImGui::IsKeyPressed(escapeKey))
+                        ImGui::IsKeyPressed(ImGuiKey_Escape))
                        m_isOpen = false;
        }
 }

Activity

  1. colesnicov commented on Sep 3, 2025

    @colesnicov

    Imgui doesn't remember which key was pressed, you have to write it down in a variable. Otherwise it won't work.

    Had make a slight change handling the ESC key in order to build. Not sure what the escapeKey >= 0 was doing?

    Maybe it will be due to a different keyboard layout/mapping. For example, a gamer's pad does not have an escape key, but it has arrow keys and asdw keys and some others...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions