ferroui_base/input/keyboard_navigation_mode.rs
1/// Describes how focus should be moved by directional or tab keys.
2#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
3pub enum KeyboardNavigationMode {
4 /// Items in the container will be cycled through, and focus will be
5 /// moved to the previous/next container after the first/last control in
6 /// the container.
7 #[default]
8 Continue,
9 /// Items in the container will be cycled through, and moving past the
10 /// first or last control in the container will cause the last/first
11 /// control to be focused.
12 Cycle,
13 /// Items in the container will be cycled through and focus will stop
14 /// moving when the edge of the container is reached.
15 Contained,
16 /// When focus is moved into the container, the control described by the
17 /// `TabOnceActiveElement` attached property on the container will be
18 /// focused. When focus moves away from this control, focus will move to
19 /// the previous/next container.
20 Once,
21 /// The container's children will not be focused when using the tab key.
22 None,
23 /// TabIndexes are considered on local subtree only inside this container.
24 Local,
25}