feat: vim movement keys

This commit is contained in:
siph
2022-05-08 11:37:14 -06:00
parent 06bb13848f
commit d30dabae50
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -158,13 +158,13 @@ impl InputHandler {
SelectablePanel::Commands => locked_data.docker_command_end(), SelectablePanel::Commands => locked_data.docker_command_end(),
} }
} }
KeyCode::Up => self.previous(), KeyCode::Up | KeyCode::Char('k') => self.previous(),
KeyCode::PageUp => { KeyCode::PageUp => {
for _ in 0..=6 { for _ in 0..=6 {
self.previous() self.previous()
} }
} }
KeyCode::Down => self.next(), KeyCode::Down | KeyCode::Char('j')=> self.next(),
KeyCode::PageDown => { KeyCode::PageDown => {
for _ in 0..=6 { for _ in 0..=6 {
self.next() self.next()
+1 -1
View File
@@ -475,7 +475,7 @@ pub fn draw_help_box<B: Backend>(f: &mut Frame<'_, B>) {
let description_text = format!("\n{}", DESCRIPTION); let description_text = format!("\n{}", DESCRIPTION);
let mut help_text = String::from("\n ( tab ) or ( alt+tab ) to change panels"); 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 ( enter ) to send docker container commands");
help_text.push_str("\n ( h ) to toggle this help information"); help_text.push_str("\n ( h ) to toggle this help information");
help_text.push_str( help_text.push_str(