diff --git a/plugins/builtin/source/content/views/view_data_inspector.cpp b/plugins/builtin/source/content/views/view_data_inspector.cpp index 683479184..7822e00fc 100644 --- a/plugins/builtin/source/content/views/view_data_inspector.cpp +++ b/plugins/builtin/source/content/views/view_data_inspector.cpp @@ -433,6 +433,10 @@ namespace hex::plugin::builtin { ImGui::SameLine(); + if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { + m_selectedEntryName.reset(); + } + // Handle copying the value to the clipboard when clicking the row if (ImGui::Selectable("##InspectorLine", m_selectedEntryName == entry.unlocalizedName, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap)) { m_selectedEntryName = entry.unlocalizedName; @@ -469,6 +473,10 @@ namespace hex::plugin::builtin { return; } + if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { + entry.editing = false; + } + // Handle editing mode ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0)); ImGui::SetNextItemWidth(-1);