mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
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:
parent
b472229781
commit
fbdd0def47
1 changed files with 8 additions and 0 deletions
|
@ -150,9 +150,17 @@ void TerminalWidget::keydown_event(GKeyEvent& event)
|
||||||
write(m_ptm_fd, "\033[F", 3);
|
write(m_ptm_fd, "\033[F", 3);
|
||||||
return;
|
return;
|
||||||
case KeyCode::Key_PageUp:
|
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);
|
write(m_ptm_fd, "\033[5~", 4);
|
||||||
return;
|
return;
|
||||||
case KeyCode::Key_PageDown:
|
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);
|
write(m_ptm_fd, "\033[6~", 4);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue