diff options
Diffstat (limited to 'src/tui/commands.rs')
| -rw-r--r-- | src/tui/commands.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tui/commands.rs b/src/tui/commands.rs index a3049ee..0e00f95 100644 --- a/src/tui/commands.rs +++ b/src/tui/commands.rs @@ -69,6 +69,8 @@ pub enum CmdAction { Exit, // Show keybindings ShowHelp, + // Add new entry + AddEntry, // Do nothing. Nothing, } @@ -110,7 +112,6 @@ impl From<KeyEvent> for CmdAction { Self::SelectPrevRow(5) } else { Self::Nothing - // Self::Open(OpenRessource::WebLink) } } // Scroll info/preview area @@ -118,6 +119,8 @@ impl From<KeyEvent> for CmdAction { KeyCode::PageUp => Self::ScrollInfoUp, // Exit App KeyCode::Char('q') => Self::Exit, + // Add new entry + KeyCode::Char('a') => Self::AddEntry, KeyCode::Char('c') | KeyCode::Char('C') => { if key_event.modifiers == KeyModifiers::CONTROL { Self::Exit @@ -129,15 +132,14 @@ impl From<KeyEvent> for CmdAction { KeyCode::Tab => Self::ToggleArea, KeyCode::BackTab => Self::ToggleArea, // 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 |
