From 1d30c43e178552a77a977111607cdd7e0349441c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Th=C3=A9ry?= Date: Mon, 27 Apr 2020 15:58:55 +0200 Subject: [PATCH] Press Esc to close and cancel RenamePopup --- Scripts/Editor/RenamePopup.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Scripts/Editor/RenamePopup.cs b/Scripts/Editor/RenamePopup.cs index 5429270..b1ebab6 100644 --- a/Scripts/Editor/RenamePopup.cs +++ b/Scripts/Editor/RenamePopup.cs @@ -1,4 +1,4 @@ -using UnityEditor; +using UnityEditor; using UnityEngine; namespace XNodeEditor { @@ -67,6 +67,10 @@ namespace XNodeEditor { target.TriggerOnValidate(); } } + + if (e.isKey && e.keyCode == KeyCode.Escape) { + Close(); + } } } } \ No newline at end of file