From 8b63cce87640f9f8877c11d0d012452361b0a81c Mon Sep 17 00:00:00 2001
From: trickssss <132118845+trickssss@users.noreply.github.com>
Date: Sat, 29 Apr 2023 16:51:25 -0600
Subject: [PATCH] fix textbox listeners, check flags for Ctrl-A (#406)

---
 .../PropertyPrefabs/StringPropertyPrefab.cs           |  5 +++++
 Assets/Scripts/LevelEditor/Selections.cs              | 11 +++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/StringPropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/StringPropertyPrefab.cs
index 58607befa..4a112b8d0 100644
--- a/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/StringPropertyPrefab.cs
+++ b/Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/StringPropertyPrefab.cs
@@ -32,6 +32,11 @@ namespace HeavenStudio.Editor
                 _ =>
                 {;
                     parameterManager.entity[propertyName] = inputFieldString.text;
+                }
+            );
+            inputFieldString.onEndEdit.AddListener(
+                _ =>
+                {;
                     Editor.instance.editingInputField = false;
                 }
             );
diff --git a/Assets/Scripts/LevelEditor/Selections.cs b/Assets/Scripts/LevelEditor/Selections.cs
index a901a1302..c21c9449d 100644
--- a/Assets/Scripts/LevelEditor/Selections.cs
+++ b/Assets/Scripts/LevelEditor/Selections.cs
@@ -24,11 +24,14 @@ namespace HeavenStudio.Editor
             if (buggedSelections.Count > 0)
             {
                 for (int i = 0; i < buggedSelections.Count; i++)
-                Deselect(buggedSelections[i]);
+                    Deselect(buggedSelections[i]);
+            }
+            if (Editor.instance.isShortcutsEnabled)
+            {
+                if (Input.GetKey(KeyCode.LeftControl))
+                    if (Input.GetKeyDown(KeyCode.A))
+                        SelectAll();
             }
-            if (Input.GetKey(KeyCode.LeftControl))
-                if (Input.GetKeyDown(KeyCode.A))
-                    SelectAll();
         }
 
         public void ClickSelect(TimelineEventObj eventToAdd)