Skip to content

Commit

Permalink
Fix several scrolling keys not working
Browse files Browse the repository at this point in the history
This binds the `Home`, `End`, `PageUp` and `PageDown` keys to their
respective scroll action.

Signed-off-by: Builditluc <[email protected]>
  • Loading branch information
Builditluc committed Nov 2, 2024
1 parent 60d45c6 commit 50a34cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,17 @@ impl Component for AppComponent {
KeyCode::Char('j') => Action::ScrollDown(1).into(),
KeyCode::Char('k') => Action::ScrollUp(1).into(),

KeyCode::Char('g') => Action::ScrollToTop.into(),
KeyCode::Char('G') => Action::ScrollToBottom.into(),
KeyCode::Char('g') | KeyCode::Home => Action::ScrollToTop.into(),
KeyCode::Char('G') | KeyCode::End => Action::ScrollToBottom.into(),

KeyCode::Char('d') if has_modifier!(key, Modifier::CONTROL) => {
Action::ScrollHalfDown.into()
}
KeyCode::Char('u') if has_modifier!(key, Modifier::CONTROL) => {
Action::ScrollHalfUp.into()
}
KeyCode::PageDown => Action::ScrollHalfDown.into(),
KeyCode::PageUp => Action::ScrollHalfUp.into(),

KeyCode::Char('h') => Action::UnselectScroll.into(),

Expand Down

0 comments on commit 50a34cc

Please sign in to comment.