Skip to content

Commit

Permalink
change Home/End keybindings to ctrl+arrow up/down
Browse files Browse the repository at this point in the history
  • Loading branch information
wugeer committed Oct 8, 2024
1 parent 7095bfa commit ee0b763
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/tui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,14 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(
use KeyCode::*;
match key.code {
Esc => return Ok(()),
Up if key.modifiers.contains(KeyModifiers::CONTROL) => {
app.tui.select_first_row()
}
Down if key.modifiers.contains(KeyModifiers::CONTROL) => {
app.tui.select_last_row()
}
Up | BackTab => app.tui.select_previous_row(1),
Tab | Down => app.tui.select_next_row(1),
Home => app.tui.select_first_row(),
End => app.tui.select_last_row(),
Char('j') if key.modifiers.contains(KeyModifiers::CONTROL) => {
app.tui.select_next_row(1);
}
Expand Down

0 comments on commit ee0b763

Please sign in to comment.