feat(tui): Add additional keybinds for selecting next and previous

This commit is contained in:
Patrick Auernig 2024-12-06 21:00:57 +01:00
parent 823d3e8f93
commit e7bb664cc2

View File

@ -101,10 +101,10 @@ pub fn run(projects: Projects) -> Result<()> {
fn handle_key_event(state: &mut State, tx: &mut mpsc::Sender<Message>, event: KeyEvent) {
let msg = match (&state.mode, event.modifiers, event.code) {
(Mode::Search, KeyModifiers::CONTROL, KeyCode::Char('k') | KeyCode::Up) => {
(Mode::Search, KeyModifiers::CONTROL, KeyCode::Char('p' | 'k') | KeyCode::Up) => {
Message::SelectPrevious
}
(Mode::Search, KeyModifiers::CONTROL, KeyCode::Char('j') | KeyCode::Down) => {
(Mode::Search, KeyModifiers::CONTROL, KeyCode::Char('n' | 'j') | KeyCode::Down) => {
Message::SelectNext
}
(Mode::Search, KeyModifiers::NONE, KeyCode::Esc) => Message::Exit,