IND
IND (Index) is an escape sequence that moves the cursor down one line in the same column, scrolling the screen up if the cursor is at the bottom margin of the scrolling region.
Syntax
ESC D IND — Index (7-bit)
0x84 IND — Index (8-bit C1)
IND = ( 0x1b, "D" ) | 0x84 ;
Description
Per the VT510 manual, IND moves the cursor down one line in the same column position. If the cursor is at the bottom margin of the scrolling region (set by DECSTBM), the screen scrolls up: the line at the top margin is lost, all lines move up one position, and a new blank line appears at the bottom margin.
If the cursor is below the scrolling region's bottom margin, IND moves the cursor down one line without scrolling. If the cursor is already on the last line of the display, IND has no effect.
Comparison with LF
IND behaves identically to LF in the default LNM (Line Feed/New Line Mode) reset state, except that LF's behavior can change depending on the LNM setting. IND always moves down one line in the same column regardless of mode.
Examples
printf '\eD' # Move cursor down one line (scroll if at bottom margin)
Specifications
| Specification | Section |
|---|---|
| ECMA-48 | — |
| VT510 Reference | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✓ | Yes | ESC D listed as IMPLEMENTED in docs/escape_support.md |
| Bobcat | ✓ | 0.9.0 | Standard ESC sequence, handled in TerminalCtrl library |
| contour | ✓ | v0.1.0 | ESC D implemented in processSequence; calls index() |
| foot | ✓ | Yes | Implemented in vt.c:500-501 as ESC D |
| Ghostty | ✓ | v1.0.0 | ESC D handled in stream.zig:2172-2178 |
| iTerm2 | ✓ | Yes | |
| Kitty | ✓ | Yes | |
| Konsole | ✓ | Yes | |
| mintty | ✓ | Yes | Handled in do_esc() at src/termout.c:1960-1961 |
| mlterm | ✓ | rel-0_2_1 | |
| PuTTY | ✓ | 0.45 | |
| Rio | ✓ | v0.0.28 | |
| rxvt-unicode | ✓ | rxvt-unicode-1.2 | |
| st | ✓ | 0.4 | |
| terminology | ✓ | v0.1.0 | |
| VT100 | ✓ | Yes | |
| VTE | ✓ | Yes | |
| WezTerm | ✓ | Yes | Handled in performer.rs:449 via ControlCode::IND and esc.rs:31 as EscCode::Index |
| Windows Terminal | ✓ | Yes | ESC D dispatches LineFeed(WithoutReturn) in OutputStateMachineEngine.cpp:220-221 |
| xterm | ✓ | Yes | Implemented in charproc.c:5423 via xtermIndex() |
| xterm.js | ✓ | 3.5.0 | |
| Multiplexers | |||
| cy | ✓ | v0.1.0 | |
| GNU Screen | ✓ | v.4.2.0 | IND (ESC D) implemented in DoESC() at src/ansi.c:715 |
| tmux | ✓ | 1.3 | Index: move cursor down one line |
| tuios | ✓ | v0.0.15 | |
| Zellij | ✓ | v0.7.0 | |
See also
- RI — Reverse Index — Move cursor up one line (the inverse of IND)
- LF — Line Feed — Similar downward movement
- DECSTBM — Set Top and Bottom Margins — Defines the scrolling region