From 1b46aa2f13b3c54800b8865bcf7bfb595830d5f3 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 23 Oct 2025 20:41:48 +0200 Subject: [PATCH] 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. --- dashboard/src/app.rs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/dashboard/src/app.rs b/dashboard/src/app.rs index 10ed9a2..5d171a8 100644 --- a/dashboard/src/app.rs +++ b/dashboard/src/app.rs @@ -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.)