DECSET ?12 — Cursor blink
Enable or disable the blinking attribute of the cursor — independent of cursor shape.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\\x1b[
\x1b[?12h (start blinking) \x1b[?12l (stop blinking)\\033[
\033[?12h / \033[?12l\\e[
\e[?12h / \e[?12lESC [
ESC [ ? 1 2 h / lhex
1b 5b 3f 31 32 68 / 6cDescription
Toggle the cursor-blink attribute. Distinct from DECSCUSR (`\x1b[N SP q`), which combines shape AND blink in one parameter: with `?12` you can keep the user's preferred shape (block / bar / underline) and just override whether it blinks. Used by editors that want a steady cursor in normal mode and a blinking one in insert mode WITHOUT touching the user's chosen shape. Reset to terminal default by combining with DECSCUSR `\x1b[0 q` or DECSTR (`\x1b[!p`).
Spec citation: xterm-ctlseqs (Private mode 12)
Examples
printf '\033[?12h' # start blinking\nprintf '\033[?12l' # stop blinkingimport sys; sys.stdout.write('\x1b[?12l')fmt.Print("\x1b[?12l")process.stdout.write('\x1b[?12l')printf("\x1b[?12l");Terminal support
- xterm
- yes
- Linux console (fbcon)
- partial
- macOS Terminal.app
- partial
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- partial
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- yes
- Konsole
- yes
- 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 | partial | partial | yes | yes | partial | yes | yes | yes | yes | yes | yes | no | no |