From fbdd0def47626e36a59c579984fbcf038009122b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 19 Oct 2019 20:18:18 +0200 Subject: [PATCH] Terminal: Make Shift+PgUp/PgDown scroll the terminal up/down one page I keep doing this out of habit, expecting it to scroll, and now it actually will scroll. :^) --- Applications/Terminal/TerminalWidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Applications/Terminal/TerminalWidget.cpp b/Applications/Terminal/TerminalWidget.cpp index b0d5dced69..f63a9b1e48 100644 --- a/Applications/Terminal/TerminalWidget.cpp +++ b/Applications/Terminal/TerminalWidget.cpp @@ -150,9 +150,17 @@ void TerminalWidget::keydown_event(GKeyEvent& event) write(m_ptm_fd, "\033[F", 3); return; case KeyCode::Key_PageUp: + if (event.modifiers() == Mod_Shift) { + m_scrollbar->set_value(m_scrollbar->value() - m_terminal.rows()); + return; + } write(m_ptm_fd, "\033[5~", 4); return; case KeyCode::Key_PageDown: + if (event.modifiers() == Mod_Shift) { + m_scrollbar->set_value(m_scrollbar->value() + m_terminal.rows()); + return; + } write(m_ptm_fd, "\033[6~", 4); return; default: