Added: Add SCROLL extra key to toggle auto scrolling of terminal to bottom on terminal text updates and termux activity return

The toggle will apply to each terminal session separately.

Closes #2535
This commit is contained in:
agnostic-apollo
2022-06-18 06:58:44 +05:00
parent a2df7d791a
commit 5fc2b4cd4a
4 changed files with 30 additions and 3 deletions

View File

@@ -96,6 +96,10 @@ public class TermuxTerminalExtraKeys extends TerminalExtraKeys {
} else if ("PASTE".equals(key)) {
if(mTermuxTerminalSessionActivityClient != null)
mTermuxTerminalSessionActivityClient.onPasteTextFromClipboard(null);
} else if ("SCROLL".equals(key)) {
TerminalView terminalView = mTermuxTerminalViewClient.getActivity().getTerminalView();
if (terminalView != null && terminalView.mEmulator != null)
terminalView.mEmulator.toggleAutoScrollDisabled();
} else {
super.onTerminalExtraKeyButtonClick(view, key, ctrlDown, altDown, shiftDown, fnDown);
}