# `wxNavigationKeyEvent`
[🔗](https://github.com/erlang/otp/blob/master/lib/wx/src/gen/wxNavigationKeyEvent.erl#L58)

This event class contains information about navigation events, generated by navigation
keys such as tab and page down.

This event is mainly used by wxWidgets implementations. A `m:wxNavigationKeyEvent`
handler is automatically provided by wxWidgets when you enable keyboard navigation inside
a window by inheriting it from wxNavigationEnabled<>.

See: `wxWindow:navigate/2`

This class is derived, and can use functions, from:

* `m:wxEvent`

wxWidgets docs: [wxNavigationKeyEvent](https://docs.wxwidgets.org/3.2/classwx_navigation_key_event.html)

## Events

Use `wxEvtHandler:connect/3` with `wxNavigationKeyEventType` to subscribe to events of this type.

# `wxNavigationKey`

```elixir
-type wxNavigationKey() ::
          #wxNavigationKey{type :: wxNavigationKeyEvent:wxNavigationKeyEventType(),
                           dir :: boolean(),
                           focus :: wxWindow:wxWindow()}.
```

# `wxNavigationKeyEvent`

```elixir
-type wxNavigationKeyEvent() :: wx:wx_object().
```

# `wxNavigationKeyEventType`

```elixir
-type wxNavigationKeyEventType() :: navigation_key.
```

# `getCurrentFocus`

```elixir
-spec getCurrentFocus(This) -> wxWindow:wxWindow() when This :: wxNavigationKeyEvent().
```

Returns the child that has the focus, or NULL.

# `getDirection`

```elixir
-spec getDirection(This) -> boolean() when This :: wxNavigationKeyEvent().
```

Returns true if the navigation was in the forward direction.

# `isFromTab`

```elixir
-spec isFromTab(This) -> boolean() when This :: wxNavigationKeyEvent().
```

Returns true if the navigation event was from a tab key.

This is required for proper navigation over radio buttons.

# `isWindowChange`

```elixir
-spec isWindowChange(This) -> boolean() when This :: wxNavigationKeyEvent().
```

Returns true if the navigation event represents a window change (for example, from
Ctrl-Page Down in a notebook).

# `setCurrentFocus`

```elixir
-spec setCurrentFocus(This, CurrentFocus) -> ok
                         when This :: wxNavigationKeyEvent(), CurrentFocus :: wxWindow:wxWindow().
```

Sets the current focus window member.

# `setDirection`

```elixir
-spec setDirection(This, Direction) -> ok when This :: wxNavigationKeyEvent(), Direction :: boolean().
```

Sets the direction to forward if `direction` is true, or backward if false.

# `setFromTab`

```elixir
-spec setFromTab(This, FromTab) -> ok when This :: wxNavigationKeyEvent(), FromTab :: boolean().
```

Marks the navigation event as from a tab key.

# `setWindowChange`

```elixir
-spec setWindowChange(This, WindowChange) -> ok
                         when This :: wxNavigationKeyEvent(), WindowChange :: boolean().
```

Marks the event as a window change event.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
