mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 19:14:04 +08:00
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.
This commit is contained in:
committed by
Fredrik Fornwall
parent
f80b46487d
commit
661c37501f
@@ -894,7 +894,7 @@ public final class TerminalView extends View {
|
|||||||
if (shiftDown) {
|
if (shiftDown) {
|
||||||
long time = SystemClock.uptimeMillis();
|
long time = SystemClock.uptimeMillis();
|
||||||
MotionEvent motionEvent = MotionEvent.obtain(time, time, MotionEvent.ACTION_DOWN, 0, 0, 0);
|
MotionEvent motionEvent = MotionEvent.obtain(time, time, MotionEvent.ACTION_DOWN, 0, 0, 0);
|
||||||
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -1 : 1);
|
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -mEmulator.mRows : mEmulator.mRows);
|
||||||
motionEvent.recycle();
|
motionEvent.recycle();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user