From 020afbcaef2f0143e6e497425282d166ef2fbaf4 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Sun, 15 Oct 2023 21:01:02 +0200
Subject: Add other keycodes for scrolling

---
 src/main.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/main.rs')

diff --git a/src/main.rs b/src/main.rs
index 9b45fca..8489c57 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -104,20 +104,20 @@ fn handle_events(ui: &mut UI) -> io::Result<bool> {
                     KeyCode::Char('q') => {
                         return Ok(true);
                     }
-                    KeyCode::Char('j') => {
+                    KeyCode::Char('j') | KeyCode::Down => {
                         if ui.scroll < (ui.max_lines - ui.height + 1) {
                             ui.scroll += 1;
                         }
                     }
-                    KeyCode::Char('J') => {
+                    KeyCode::Char('J') | KeyCode::Char('G') => {
                         ui.scroll = ui.max_lines - ui.height + 1;
                     }
-                    KeyCode::Char('k') => {
+                    KeyCode::Char('k') | KeyCode::Up => {
                         if ui.scroll > 1 {
                             ui.scroll -= 1;
                         }
                     }
-                    KeyCode::Char('K') => {
+                    KeyCode::Char('K') | KeyCode::Char('0') => {
                         ui.scroll = ui.height;
                     }
                     _ => {}
-- 
cgit v1.2.3-18-g5258