(KeyboardKeys key)
| 272 | |
| 273 | /// <inheritdoc /> |
| 274 | public override bool OnKeyDown(KeyboardKeys key) |
| 275 | { |
| 276 | // Prevent closing the editor window when using RMB + Ctrl + W to slow down the camera flight |
| 277 | if (Editor.Options.Options.Input.CloseTab.Process(this, key)) |
| 278 | { |
| 279 | if (Root.GetMouseButton(MouseButton.Right)) |
| 280 | return true; |
| 281 | } |
| 282 | |
| 283 | if (base.OnKeyDown(key)) |
| 284 | return true; |
| 285 | |
| 286 | switch (key) |
| 287 | { |
| 288 | case KeyboardKeys.Return: |
| 289 | if (CanUseNavigation && Root?.FocusedControl != null) |
| 290 | { |
| 291 | Root.SubmitFocused(); |
| 292 | return true; |
| 293 | } |
| 294 | break; |
| 295 | case KeyboardKeys.Tab: |
| 296 | if (CanUseNavigation && Root != null) |
| 297 | { |
| 298 | bool shiftDown = Root.GetKey(KeyboardKeys.Shift); |
| 299 | Root.Navigate(shiftDown ? NavDirection.Previous : NavDirection.Next); |
| 300 | return true; |
| 301 | } |
| 302 | break; |
| 303 | } |
| 304 | return false; |
| 305 | } |
| 306 | |
| 307 | /// <inheritdoc /> |
| 308 | public override void OnDestroy() |
nothing calls this directly
no test coverage detected