SelectionInTreeView.st
changeset 6155 e9c26927269a
parent 6153 9764ae6e3c19
child 6157 61702e8cceb7
--- a/SelectionInTreeView.st	Tue Sep 17 11:12:39 2019 +0200
+++ b/SelectionInTreeView.st	Tue Sep 17 11:17:29 2019 +0200
@@ -1600,6 +1600,29 @@
         ].
     ].
 
+    key == #Escape ifTrue:[
+        editorWidget notNil ifTrue:[
+            self closeEditor.
+            ^ self.
+        ].
+    ].
+    key == #CursorUp ifTrue:[
+        editorWidget notNil ifTrue:[
+            self closeEditor.
+            self selectPrevious.
+            self openEditor.
+            ^ self.
+        ].
+    ].
+    key == #CursorDown ifTrue:[
+        editorWidget notNil ifTrue:[
+            self closeEditor.
+            self selectNext.
+            self openEditor.
+            ^ self.
+        ].
+    ].
+
     "/ search fwd/bwd for a node with children
 
 "/    (key == #CursorLeft or:[key == #CursorRight]) ifTrue:[
@@ -2062,6 +2085,11 @@
                     self openEditor.
                 ].
             ].
+            (key == #Escape) ifTrue:[
+                self sensor pushAction:[
+                    self closeEditor.
+                ].
+            ].
         ] 
         ifNotUnderstood:[].