make F the main search shortcut

This commit is contained in:
Robin Appelman 2024-12-17 17:18:55 +01:00
commit 89bf0a5de6
2 changed files with 6 additions and 4 deletions

View file

@ -55,9 +55,9 @@ pub fn footer<'a>(app: &App<'a>, params: FooterParams<'a>) -> Table<'a> {
fn help(page: UiPage) -> &'static str {
match page {
UiPage::MatchList => "«Q» Exit - «Enter» Select - «F4» Filter - «E» Show parse errors",
UiPage::Match => "«Q» Exit - «Enter» Select - «F4» Filter - «Esc» Back",
UiPage::Logs => "«Q» Exit - «F4» Filter - «Esc» Back - «C» Copy log line",
UiPage::MatchList => "«Q» Exit - «Enter» Select - «F» Filter - «E» Show parse errors",
UiPage::Match => "«Q» Exit - «Enter» Select - «F» Filter - «Esc» Back",
UiPage::Logs => "«Q» Exit - «F» Filter - «Esc» Back - «C» Copy log line",
UiPage::Log => "«Q» Exit - «Esc» Back - «R» Toggle raw - «C» Copy log line",
UiPage::Errors => "«Q» Exit - «Esc» Back - «C» Copy log line",
}

View file

@ -103,7 +103,9 @@ fn handle_events(page: UiPage, ui_state: &UiState) -> io::Result<Option<UiEvent>
(_, KeyCode::Home) => Some(UiEvent::Up(usize::MAX, false)),
(_, KeyCode::Enter | KeyCode::Right) => Some(UiEvent::Select),
(Mode::Normal, KeyCode::Char('c')) => Some(UiEvent::Copy),
(Mode::Normal, KeyCode::F(4)) => Some(UiEvent::EnterFilterMode),
(Mode::Normal, KeyCode::F(4) | KeyCode::Char('f')) => {
Some(UiEvent::EnterFilterMode)
}
(Mode::FilterInput, KeyCode::Esc) => Some(UiEvent::ClearFilter),
(Mode::FilterInput, KeyCode::F(4)) => Some(UiEvent::Back),