# KeyboardNavigationHandler

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/struct-keyboardnavigationhandler/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct KeyboardNavigationHandler
```

Handles keyboard navigation for a window.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/keyboard_navigation_handler.rs#L14)

## Members

- [`new`](#function-new)
- [`get_next`](#function-get_next)

<a id="function-new"></a>

### new

```rust
fn new() -> Rc<Self>
```

Creates a keyboard navigation handler without an owner.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/keyboard_navigation_handler.rs#L22)

<a id="function-get_next"></a>

### get_next

```rust
fn get_next(element: &crate::Ref<super::InputElement>, direction: NavigationDirection) -> Option<crate::Ref<super::InputElement>>
```

Gets the next control in the specified navigation direction.

Returns the next element in the specified direction, or `None` if
`element` was the last in the requested direction.

Panics for directions other than next, previous, up, down, left and
right.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/keyboard_navigation_handler.rs#L37)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`IKeyboardNavigationHandler`](/docs/0.5.0/api/ferroui-base/input/trait-ikeyboardnavigationhandler/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
