DECSCLM — Smooth scrolling mode (CSI ? 4 h / l)
Toggle between smooth (one-line-per-frame animated) and jump (instant) scrolling — a DEC VT100 hardware-era setting that modern emulators almost universally ignore.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[?4h (smooth) \x1b[?4l (jump)\033[?4h / \033[?4l\e[?4h / \e[?4lESC [ ? 4 h / ESC [ ? 4 l1b 5b 3f 34 68 / 6cDescription
Set Scrolling Mode. When set (`\x1b[?4h`), the terminal animates scrolling — when content needs to scroll up by one line, the entire display pixel-shifts smoothly upward over several frames rather than jumping in a single update. Reset (`\x1b[?4l`, the default) is jump scrolling — instant single-frame update. The DEC VT100 hardware had a physical refresh-rate constraint that made smooth scrolling visibly slower (~6 lines per second), so cooperative software either left it off for terminals or enabled it temporarily during `cat`-like display of files where readability mattered more than throughput. In modern software emulators the distinction is functionally moot — frame rates are too high for `?4h` to look meaningfully different from `?4l`, and emulators either implement smooth scrolling as a tiny animation (`gnometerm`, `iterm2`) or silently ignore the mode (`alacritty`, `kitty`, `wezterm`, `ghostty`, `Windows Terminal`). Useful primarily for historical accuracy in VT100 emulators (xterm, mlterm) and for distinguishing TUI behaviour in tests. Note: smooth scrolling reduces effective throughput when implemented — disable it before bulk-printing logs.
Spec citation: DEC VT100 (DECSCLM) / xterm-ctlseqs
Parameters
Examples
printf '\033[?4h' # smooth scroll on (visible on xterm, gnome-terminal)\nfor i in $(seq 1 80); do echo "line $i"; done\nprintf '\033[?4l'import sys\nsys.stdout.write('\x1b[?4l') # disable smooth scrolling before bulk log dumpfmt.Print("\x1b[?4h") // smooth on (will be no-op on most modern emulators)process.stdout.write('\x1b[?4l') // jump scrolling (default; explicit reset)printf("\x1b[?4l"); /* ensure jump-scroll before printing 10k log lines */Terminal support
- xterm
- yes
- Linux console (fbcon)
- no
- macOS Terminal.app
- partial
- iTerm2
- partial
- Windows Terminal
- no
- cmd.exe / ConPTY
- no
- kitty
- no
- alacritty
- no
- WezTerm
- no
- Ghostty
- no
- GNOME Terminal
- partial
- Konsole
- partial
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | no | partial | partial | no | no | no | no | no | no | partial | partial | no | no |