MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnKeyDown

Method OnKeyDown

Source/Editor/Content/Tree/TreeViewPanel.cs:186–209  ·  view source on GitHub ↗

(KeyboardKeys key)

Source from the content-addressed store, hash-verified

184
185 /// <inheritdoc />
186 public override bool OnKeyDown(KeyboardKeys key)
187 {
188 if (!Visible)
189 return false;
190 if (ContentTree == null)
191 return base.OnKeyDown(key);
192
193 if (_inputActions.Process(Editor.Instance, this, key))
194 return true;
195
196 var selection = ContentTree.Selection;
197 if (selection.Count > 0)
198 {
199 if (key == KeyboardKeys.Return)
200 {
201 foreach (var node in selection)
202 {
203 if (node is ContentItemTreeNode contentNode)
204 Editor.Instance.Windows.ContentWin.Open(contentNode.Item);
205 }
206 }
207 }
208 return base.OnKeyDown(key);
209 }
210}

Callers

nothing calls this directly

Calls 2

ProcessMethod · 0.45
OpenMethod · 0.45

Tested by

no test coverage detected