Skip to content

Commit

Permalink
Make Shift-PgUp and Shift-PgDn scroll by pages rather than lines
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joshtriplett authored and fornwall committed Aug 16, 2024
1 parent f80b464 commit 661c375
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ public boolean handleKeyCodeAction(int keyCode, int keyMod) {
if (shiftDown) {
long time = SystemClock.uptimeMillis();
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();
return true;
}
Expand Down

3 comments on commit 661c375

@mohamadsalm010
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohamadsalm010
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can i haking now?

@twaik
Copy link
Member

@twaik twaik commented on 661c375 Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Please sign in to comment.