(KeyboardKeys key)
| 279 | |
| 280 | /// <inheritdoc /> |
| 281 | public override bool OnKeyDown(KeyboardKeys key) |
| 282 | { |
| 283 | if (base.OnKeyDown(key)) |
| 284 | return true; |
| 285 | |
| 286 | switch (key) |
| 287 | { |
| 288 | case KeyboardKeys.Return: |
| 289 | if (Root?.FocusedControl != null) |
| 290 | Root.SubmitFocused(); |
| 291 | else |
| 292 | OnSubmit(); |
| 293 | return true; |
| 294 | case KeyboardKeys.Escape: |
| 295 | OnCancel(); |
| 296 | return true; |
| 297 | case KeyboardKeys.Tab: |
| 298 | if (Root != null) |
| 299 | { |
| 300 | bool shiftDown = Root.GetKey(KeyboardKeys.Shift); |
| 301 | Root.Navigate(shiftDown ? NavDirection.Previous : NavDirection.Next); |
| 302 | } |
| 303 | return true; |
| 304 | } |
| 305 | return false; |
| 306 | } |
| 307 | } |
| 308 | } |
nothing calls this directly
no test coverage detected