From b892bc9a66e65cb73901d719c83768face67941d Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sun, 15 Dec 2024 12:29:00 +0100 Subject: use specific search command for entering search input mode --- src/tui/commands.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/tui/commands.rs') diff --git a/src/tui/commands.rs b/src/tui/commands.rs index 626b11b..f7fd75b 100644 --- a/src/tui/commands.rs +++ b/src/tui/commands.rs @@ -132,16 +132,24 @@ impl From for CmdAction { // Switch selected area KeyCode::Tab => Self::ToggleArea, KeyCode::BackTab => Self::ToggleArea, + // // Enter search mode + // KeyCode::Char('/') => Self::Input(InputCmdAction::Enter), + // KeyCode::Char('f') => { + // if key_event.modifiers == KeyModifiers::CONTROL { + // Self::Input(InputCmdAction::Enter) + // } else { + // Self::Nothing + // } + // } // Enter search mode - KeyCode::Char('/') => Self::Input(InputCmdAction::Enter), + KeyCode::Char('/') => Self::SearchList, KeyCode::Char('f') => { if key_event.modifiers == KeyModifiers::CONTROL { - Self::Input(InputCmdAction::Enter) + Self::SearchList } else { Self::Nothing } } - // KeyCode::Backspace => Self::Input(InputCommand::Resume(Event::Key(key_event))), // Confirm selection KeyCode::Enter => Self::Confirm, // Reset lists/tables -- cgit v1.2.3