DECARM Autorepeat Mode
Turn the repeating of held-down keys on and off.
CSI ? 8 h
- DEC STD 070
- §6.6.3 Set/Reset Auto Repeat Mode, p. 6-41
- VT510
- DECARM—Autorepeat Mode
Mode 8 decides whether a key held down repeats. Set (CSI ? 8 h), most keys repeat while held; reset (CSI ? 8 l), none do. The VT510 manual makes repeating the default. It changes only what the keyboard sends, which this site cannot press, so nothing on the screen changes.
DEC STD 070 calls autorepeat a user preference, which software should change only when the user asks it to.
xterm does not let a program change it. It ignores the mode (charproc.c): its comment explains that the X functions to turn autorepeat on and off work only for the whole display, not one window. And DECRQM always reports it as permanently reset, 4 (do_dec_rqm). esctest2, the test suite for xterm’s behavior, expects the mode to change and lists xterm’s answer as a known bug (“xterm always returns 4 (permanently reset)”), but this site’s rule is to follow xterm, bugs included, so the cases expect 4.
libghostty-vt keeps the mode, and reports it as reset (2) until it is set, then set (1): mode 8 is in its mode table, in modes.zig. So the two DECRQM cases are known differences. libghostty-vt’s answer is the one esctest2 expects.
Validation
DECARM-1: Reported as permanently reset
\e[?8$p
|_____|
reply \e[?8;4$y
DECARM-2: Even after it is set
\e[?8h
\e[?8$p
|_____|
reply \e[?8;4$y
DECARM-3: Nothing on the screen changes
A
\e[?8h
B
\e[?8l
C
|ABC__|
cursor 1,4