| 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 | } |