Scroll in terminal
terminal_scrollScroll up or down inside full-screen console programs by sending mouse-wheel events to a pane or cell; pagers and lists scroll, while non-mouse apps receive arrow keys.
Instructions
Turn the mouse wheel over a cell of a full-screen program: scroll a pager, a file list, a log pane. Behaves as a terminal emulator does — programs that track the mouse receive wheel events at that cell (so the pane under it scrolls); full-screen programs that do not (less, man) receive arrow keys instead. At a plain shell prompt there is nothing to scroll and the call fails: earlier output is read with terminal_read and its page argument, not by scrolling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| col | No | 1-indexed column the pointer is over. Matters when panes scroll independently. Default: screen center. | |
| row | No | 1-indexed row the pointer is over. Default: screen center. | |
| amount | No | Wheel notches. Most programs move about 3 lines per notch. Default 3. | |
| idleMs | No | ||
| direction | Yes | "up" moves toward earlier content, "down" toward later. | |
| maxWaitMs | No | ||
| sessionId | Yes | Numeric id of the session to target. Get one by calling terminal_create. Use terminal_list to enumerate currently-known ids. |