Appearance
DECSCUSR — Set Cursor Style
| Sequence | CSI <n> SP q |
| Bytes | 0x1B 0x5B <n> 0x20 0x71 |
| Mnemonic | DECSCUSR |
| Otty support | ✓ |
Description
Sets the cursor shape and blink state. Note the literal SP (space, 0x20) between the parameter and the final q.
<n> | Style |
|---|---|
0, 1 | Block, blinking |
2 | Block, steady |
3 | Underline, blinking |
4 | Underline, steady |
5 | Beam, blinking |
6 | Beam, steady |
Programs that set the cursor style typically restore it (or send 0) before exiting. The user default lives in the config.
Example
bash
printf '\e[5 q' # beam, blinking
printf '\e[2 q' # block, steady
printf '\e[0 q' # back to user defaultTry it
otty features try cursor-shape — cycles through every DECSCUSR shape with 700 ms holds so you can eyeball each one.