From 571b719a263026bc8f46a9afb29b9df73e82adb3 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Sun, 24 Nov 2024 13:30:21 -0700 Subject: [PATCH] refactor(tui): move vim keybinds for task list in handle list. --- crates/turborepo-ui/src/tui/input.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/turborepo-ui/src/tui/input.rs b/crates/turborepo-ui/src/tui/input.rs index f2215b2adbc05..f4c853eeae58c 100644 --- a/crates/turborepo-ui/src/tui/input.rs +++ b/crates/turborepo-ui/src/tui/input.rs @@ -76,9 +76,6 @@ fn translate_key_event(options: InputOptions, key_event: KeyEvent) -> Option Some(Event::Input { bytes: encode_key(key_event), }), - // Vim keybinds - KeyCode::Char('j') => Some(Event::Down), - KeyCode::Char('k') => Some(Event::Up), // If we're on the list and user presses `/` enter search mode KeyCode::Char('/') if matches!(options.focus, LayoutSections::TaskList) => { Some(Event::SearchEnter) @@ -115,8 +112,8 @@ fn translate_key_event(options: InputOptions, key_event: KeyEvent) -> Option { Some(Event::ScrollDown) } - KeyCode::Up => Some(Event::Up), - KeyCode::Down => Some(Event::Down), + KeyCode::Up | KeyCode::Char('j') => Some(Event::Up), + KeyCode::Down | KeyCode::Char('k') => Some(Event::Down), KeyCode::Enter | KeyCode::Char('i') => Some(Event::EnterInteractive), _ => None, }