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. :^)
This commit is contained in:
Andreas Kling 2019-10-19 20:18:18 +02:00
commit fbdd0def47
Notes: sideshowbarker 2024-07-19 11:37:48 +09:00

View file

@ -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: