§R8.1 Cursor Movement

SequenceAction
ESC[{n}ACursor up n rows
ESC[{n}BCursor down n rows
ESC[{n}CCursor right n cols
ESC[{n}DCursor left n cols
ESC[{row};{col}HMove cursor to row, col (1-based)
ESC[sSave cursor position
ESC[uRestore cursor position
ESC[?25hShow cursor
ESC[?25lHide cursor

§R8.2 Scrolling Regions

SequenceAction
ESC[{top};{bottom}rSet scrolling region (1-based row numbers)
ESC[rReset scrolling region to full screen

§R8.3 Screen Operations

SequenceAction
ESC[2JClear entire screen
ESC[KClear from cursor to end of line
ESC[1KClear from start of line to cursor
ESC[2KClear entire line

§R8.4 Mouse Tracking (SGR Extended)

SequenceAction
ESC[?1000hEnable basic mouse tracking
ESC[?1002hEnable button-event (drag) tracking
ESC[?1003hEnable all-motion tracking
ESC[?1006hEnable SGR extended encoding
ESC[?1000lDisable mouse tracking
ESC[?1006lDisable SGR encoding

SGR mouse event format: ESC[<{button};{col};{row}M (press) or m (release).

Button values: 0=left, 1=middle, 2=right, 64=scroll-up, 65=scroll-down. Modifier bits: +4=Shift, +8=Meta, +16=Control.