pub struct KeyboardNavigator {
pub areas: Vec<NavigationArea>,
pub current_area: usize,
}Expand description
Keyboard-driven navigation controller.
Supports F6 for area cycling, Tab/Shift-Tab for intra-area focus, Arrow keys for directional movement, Enter for activation, Escape for cancel.
Fields§
§areas: Vec<NavigationArea>Navigation areas.
current_area: usizeIndex of the currently active area.
Implementations§
Sourcepub fn add_area(&mut self, area: NavigationArea)
pub fn add_area(&mut self, area: NavigationArea)
Add a navigation area.
Sourcepub fn cycle_area(&mut self) -> NavResult
pub fn cycle_area(&mut self) -> NavResult
Cycle to the next area (F6).
Sourcepub fn focus_next(&mut self) -> NavResult
pub fn focus_next(&mut self) -> NavResult
Move focus to the next node in the current area.
Sourcepub fn focus_prev(&mut self) -> NavResult
pub fn focus_prev(&mut self) -> NavResult
Move focus to the previous node in the current area.
Sourcepub fn handle_key(&mut self, key: NavKey) -> NavResult
pub fn handle_key(&mut self, key: NavKey) -> NavResult
Handle a navigation key event.
Sourcepub fn current_focused_node(&self) -> Option<A11yNodeId>
pub fn current_focused_node(&self) -> Option<A11yNodeId>
Get the currently focused node ID.