From d30dabae50e1cd9ac617feb9e9df7d1f3e7c1a65 Mon Sep 17 00:00:00 2001 From: siph Date: Sun, 8 May 2022 11:37:14 -0600 Subject: [PATCH] feat: vim movement keys --- src/input_handler/mod.rs | 4 ++-- src/ui/draw_blocks.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/input_handler/mod.rs b/src/input_handler/mod.rs index 0dfead7..7461561 100644 --- a/src/input_handler/mod.rs +++ b/src/input_handler/mod.rs @@ -158,13 +158,13 @@ impl InputHandler { SelectablePanel::Commands => locked_data.docker_command_end(), } } - KeyCode::Up => self.previous(), + KeyCode::Up | KeyCode::Char('k') => self.previous(), KeyCode::PageUp => { for _ in 0..=6 { self.previous() } } - KeyCode::Down => self.next(), + KeyCode::Down | KeyCode::Char('j')=> self.next(), KeyCode::PageDown => { for _ in 0..=6 { self.next() diff --git a/src/ui/draw_blocks.rs b/src/ui/draw_blocks.rs index 182462c..b880073 100644 --- a/src/ui/draw_blocks.rs +++ b/src/ui/draw_blocks.rs @@ -475,7 +475,7 @@ pub fn draw_help_box(f: &mut Frame<'_, B>) { let description_text = format!("\n{}", DESCRIPTION); let mut help_text = String::from("\n ( tab ) or ( alt+tab ) to change panels"); - help_text.push_str("\n ( ↑ ↓ ← → ) to change selected line"); + help_text.push_str("\n ( ↑ ↓ ← → ) or ( j k ) to change selected line"); help_text.push_str("\n ( enter ) to send docker container commands"); help_text.push_str("\n ( h ) to toggle this help information"); help_text.push_str(