From f2298344a37ed1c9797f99d5f2048fbdd45f2d70 Mon Sep 17 00:00:00 2001 From: enescevik Date: Tue, 17 Feb 2026 19:07:32 +0300 Subject: [PATCH] feat: add h/l nav keys in addition to tab --- src/handler.rs | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/handler.rs b/src/handler.rs index 9be3b0f..491e4d5 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -383,8 +383,7 @@ pub async fn handle_key_events( { app.reset.enable = true; } - - KeyCode::Tab => match app.focused_block { + KeyCode::Tab | KeyCode::Char('l') => match app.focused_block { FocusedBlock::Device => { app.focused_block = FocusedBlock::KnownNetworks; } @@ -396,7 +395,7 @@ pub async fn handle_key_events( } _ => {} }, - KeyCode::BackTab => match app.focused_block { + KeyCode::BackTab | KeyCode::Char('h') => match app.focused_block { FocusedBlock::Device => { app.focused_block = FocusedBlock::NewNetworks; } @@ -690,24 +689,26 @@ pub async fn handle_key_events( app.reset.enable = true; } - KeyCode::Tab => match app.focused_block { - FocusedBlock::Device => { - app.focused_block = FocusedBlock::AccessPoint; - } - FocusedBlock::AccessPoint => { - if ap.connected_devices.is_empty() { + KeyCode::Tab | KeyCode::Char('h') | KeyCode::Char('l') => { + match app.focused_block { + FocusedBlock::Device => { + app.focused_block = FocusedBlock::AccessPoint; + } + FocusedBlock::AccessPoint => { + if ap.connected_devices.is_empty() { + app.focused_block = FocusedBlock::Device; + } else { + app.focused_block = + FocusedBlock::AccessPointConnectedDevices; + } + } + FocusedBlock::AccessPointConnectedDevices => { app.focused_block = FocusedBlock::Device; - } else { - app.focused_block = - FocusedBlock::AccessPointConnectedDevices; } - } - FocusedBlock::AccessPointConnectedDevices => { - app.focused_block = FocusedBlock::Device; - } - _ => {} - }, + _ => {} + } + } _ => { if app.focused_block == FocusedBlock::Device {