aboutsummaryrefslogtreecommitdiff
path: root/src/tui
diff options
context:
space:
mode:
authorlukeflo2024-12-15 12:29:00 +0100
committerlukeflo2024-12-23 21:03:19 +0100
commitb892bc9a66e65cb73901d719c83768face67941d (patch)
tree61d64d320056caa636814b692fa19b1ef2283008 /src/tui
parentbe72bac936515007b4fd9a30632f62ee19839bf8 (diff)
downloadbibiman-b892bc9a66e65cb73901d719c83768face67941d.tar.gz
bibiman-b892bc9a66e65cb73901d719c83768face67941d.zip
use specific search command for entering search input mode
Diffstat (limited to 'src/tui')
-rw-r--r--src/tui/commands.rs14
1 files changed, 11 insertions, 3 deletions
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<KeyEvent> 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