Fix keybinding handling in main event loop
The new keybindings (Shift+Tab, Up, Down, BackTab) weren't working because the main app.rs event loop was only passing specific keys to the TUI app. Added handling for: - KeyCode::BackTab (Shift+Tab panel switching) - KeyCode::Up (scroll up in focused panel) - KeyCode::Down (scroll down in focused panel) Now all keyboard navigation features work correctly.
This commit is contained in:
parent
8cb5650fbb
commit
1b46aa2f13
@ -184,13 +184,37 @@ impl Dashboard {
|
||||
}
|
||||
}
|
||||
KeyCode::Tab => {
|
||||
debug!("Tab pressed - next host");
|
||||
debug!("Tab pressed - next host or panel switch");
|
||||
if let Some(ref mut tui_app) = self.tui_app {
|
||||
if let Err(e) = tui_app.handle_input(Event::Key(key)) {
|
||||
error!("Error handling tab navigation: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
KeyCode::BackTab => {
|
||||
debug!("BackTab pressed - panel switch");
|
||||
if let Some(ref mut tui_app) = self.tui_app {
|
||||
if let Err(e) = tui_app.handle_input(Event::Key(key)) {
|
||||
error!("Error handling backtab navigation: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
KeyCode::Up => {
|
||||
debug!("Up arrow pressed - scroll up");
|
||||
if let Some(ref mut tui_app) = self.tui_app {
|
||||
if let Err(e) = tui_app.handle_input(Event::Key(key)) {
|
||||
error!("Error handling up navigation: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
KeyCode::Down => {
|
||||
debug!("Down arrow pressed - scroll down");
|
||||
if let Some(ref mut tui_app) = self.tui_app {
|
||||
if let Err(e) = tui_app.handle_input(Event::Key(key)) {
|
||||
error!("Error handling down navigation: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
Ok(_) => {} // Other events (mouse, resize, etc.)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user