Skip to content

Commit 915e053

Browse files
joshtriplettagnostic-apollo
authored andcommitted
Make Shift-PgUp and Shift-PgDn scroll by pages rather than lines
In other terminals, such as gnome-terminal, Shift-PgUp and Shift-PgDn scroll the screen by a full page, rather than a single line. Adjust termux to match.
1 parent 791bf5f commit 915e053

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

terminal-view/src/main/java/com/termux/view/TerminalView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ public boolean handleKeyCodeAction(int keyCode, int keyMod) {
861861
if (shiftDown) {
862862
long time = SystemClock.uptimeMillis();
863863
MotionEvent motionEvent = MotionEvent.obtain(time, time, MotionEvent.ACTION_DOWN, 0, 0, 0);
864-
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -1 : 1);
864+
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -mEmulator.mRows : mEmulator.mRows);
865865
motionEvent.recycle();
866866
return true;
867867
}

0 commit comments

Comments
 (0)