From 50a34ccc7c45fd98b0781c59d65aaa1fcd12d127 Mon Sep 17 00:00:00 2001 From: Builditluc Date: Sat, 2 Nov 2024 20:43:15 +0100 Subject: [PATCH] Fix several scrolling keys not working This binds the `Home`, `End`, `PageUp` and `PageDown` keys to their respective scroll action. Signed-off-by: Builditluc --- src/app.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index 68c51f52..7cadae54 100644 --- a/src/app.rs +++ b/src/app.rs @@ -124,8 +124,8 @@ 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() @@ -133,6 +133,8 @@ impl Component for AppComponent { 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(),