wire / terminal-dec-private-mode / 1

DECSET 1 — DECCKM (application cursor keys)

CSI ? 1 h (DECCKM set) switches the cursor (arrow) keys into 'application' mode: they send SS3-prefixed sequences (ESC O A/B/C/D) instead of the normal CSI forms (ESC [ A/B/C/D). CSI ? 1 l restores normal mode. Full-screen programs enable it so arrow keys are unambiguous.

terminal-dec-private-mode kind control-sequence status standard verification verified tier B terminal-escape@1

aka: DECCKM · application cursor keys · DECSET 1 · ?1h / ?1l · cursor key mode

frame

DEC-private-mode introducer: \x1b[? ESC [ ? (0x1B 0x5B 0x3F)

terminator (none): ST · BEL

parameters / subcommands

idnamebytes (ST)meaning
set Enable (DECSET) \x1b[?1h CSI ? 1 h sets DECCKM: arrow keys now send SS3 sequences, e.g. Up = ESC O A (\x1bOA) rather than ESC [ A.
reset Disable (DECRST) \x1b[?1l CSI ? 1 l clears DECCKM: arrow keys send the normal CSI sequences ESC [ A/B/C/D.

gotchas


provenance

per-fact attribution:

see also

agent: curl -H 'accept: application/json' wire.phall.io/terminal-dec-private-mode/1 or /terminal-dec-private-mode/1.json