Closed
Description
This is a tracking issue for the ongoing audit of xterm behavior and comparison to Ghostty. The goal is to ensure Ghostty behaves identically to xterm for the sequences and features we support. We can diverge in behavior for some unsupported features (such as double height/width lines), though we may want to implement them in the future.
- If the sequence is checked below, it means we match xterm behavior identically and we've backed that up with Zig test cases, shell script conformance tests, and English prose documentation.
- A "⛔️" prefix means its a sequence we don't support. This does not mean we'll necessarily add support for this sequence, but its listed here so we can take a look. I may be missing some ⛔️ ...
- This list is not complete, I'll be updating the list as I go, but I also wanted to keep track of some sequences I skipped.
Sequences
- Carriage Return (CR) xterm audit: carriage return #624
- Linefeed (LF) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
- Vertical Tab (VT) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
- Formfeed (FF) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
- Index (IND) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
- Reverse Index (RI) xterm audit: CNL, CPL, NEL, RI, HTS #655
- Cursor Down (CUD) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
- Cursor Up (CUU) xterm audit: cursor up (CUU) #629
- Cursor Backward (CUB) xterm compat audit: cursor left (CUB) #622
- Cursor Forward (CUF) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
- Cursor Position (CUP) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
- Cursor Previous Line (CPL) xterm audit: CNL, CPL, NEL, RI, HTS #655
- Cursor Next Line (CNL) xterm audit: CNL, CPL, NEL, RI, HTS #655
- Horizontal Position Absolute (HPA) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
- Horizontal Position Relative (HPR) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
- Vertical Position Absolute (VPA) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
- Vertical Position Relative (VPR) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
- Horizontal Tab Forward (CHT) xterm audit: horizontal tab forward and back (CHT, CBT) #627
- Horizontal Tab Backward (CBT) xterm audit: horizontal tab forward and back (CHT, CBT) #627
- Horizontal Tab Set (HTS) xterm audit: CNL, CPL, NEL, RI, HTS #655
- Insert Characters (ICH) xterm audit: insert characters (ICH) #628
- Erase Display (ED) xterm audit: ED #638
- Erase Line (EL) terminal: EL (erase line) xterm audit #637
- Erase Character (ECH) xterm audit: ECH #636
- Insert Line (IL) xterm audit: insert line (IL), delete line (DL) #639
- Delete Line (DL) xterm audit: insert line (IL), delete line (DL) #639
⚠️ - Need to add test for splitting multi-cell characters
- Delete Character (DCH) xterm audit: dch #640
- Scroll Down (SD) xterm audit: SD, TBC, DECID #643
- Primary Device Attributes (DA1)
- Secondary Device Attributes (DA2)
- Tertiary Device Attributes (DA3 or DECRPTUI)
- Tab Clear (TBC) xterm audit: SD, TBC, DECID #643
- Set Mode (SM)
- Reset Mode (RM)
- Request Mode (RQM)
- Set Attribute (SGR)
- Cursor Position Report (CPR) xterm audit: cursor position report (CPR) #688
- ⛔️ Device Status Report (DSR)
- ⛔️ Media Control (MC)
- Set Scroll Region (DECSTBM) xterm audit: DECALN, Top/Bot Margins, Left/Right Margins #646
- ⛔️ Request Terminal Parameters (DECREQTPARM)
- Screen Alignment Pattern (DECALN) xterm audit: DECALN, Top/Bot Margins, Left/Right Margins #646
- Set Left and Right Margin (DECSLRM) xterm audit: DECALN, Top/Bot Margins, Left/Right Margins #646
- Save Cursor (DECSC) xterm audit: save cursor, restore cursor #686
- Restore Cursor (DECRC) xterm audit: save cursor, restore cursor #686
- Set Application Keymode (DECKPAM) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
- Unset Application Keymode (DECKPNM) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
- Select Cursor Style(DECSCUSR) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
- ⛔️ Load LEDs (DECLL)
- ⛔️ ANSI Charset Level 1
- ⛔️ ANSI Charset Level 2
- ⛔️ ANSI Charset Level 3
- ⛔️ Select Conformance Level (DECSCL)
- Select Character Protection Attribute (DECSCA)
- Selective Erase in Display (DECSED)
- Selective Erase in Line (DECSEL)
- Start Protected Area (SPA)
- End Protected Area (EPA)
- Scroll Up (SU) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
- ⛔️ Scroll Left (SL)
- ⛔️ Scroll Right (SR)
- ⛔️ Delete Column (DECDC)
- ⛔️ Insert Column (DECIC)
- ⛔️ Back Index (DECBI)
- ⛔️ Forward Index (DECFI)
- Report Terminal Version
- Single Shift 2 (SS2)
- Single Shift 3 (SS3)
- Locking Shift 2 (LS2)
- Locking Shift 3 (LS3)
- Locking Shift 1 Right (LS1R)
- Locking Shift 2 Right (LS2R)
- Locking Shift 3 Right (LS3R)
- Save Modes
- Restore Modes
- Window Operations (
CSI t
) - Hide Pointer
- Full Reset (RIS)
- Soft Reset (DECSTR)
- Repeat (REP) xterm audit: REP, XTSHIFTESCAPE #659
- Set Shift-Escape Configuration (XTSHIFTESCAPE) xterm audit: REP, XTSHIFTESCAPE #659
- ⛔️ Enable Filter Rectangle (DECEFR)
- ⛔️ Enable Locator Reporting (DECELR)
- ⛔️ Select Locator Events (DECSLE)
- ⛔️ Request Locator Position (DECRQLP)
- ⛔️ Copy Rectangular Area (DECCRA)
- ⛔️ Request Checksum of Rectangular Area (DECRQCRA)
- ⛔️ Erase Rectangular Area (DECERA)
- ⛔️ Fill Rectangular Area (DECFRA)
- ⛔️ Selective Erase Rectangular Area (DECSERA)
- ⛔️ Selective Attribute Change Extent (DECSACE)
- ⛔️ Change Attributes in Rectangular Area (DECCARA)
- ⛔️ Reverse Attributes in Rectangular Area (DECRARA)
- ⛔️ Select columns per page (DECSCPP)
- ⛔️ Select number of lines per screen (DECSNLS)
- ⛔️ Request presentation state report (DECRQPSR)
- Select active status display (DECSASD)
- Select status line type (DECSSDT)
- ⛔️ Select checksum extension (XTCHECKSUM)
- ⛔️ Push video attributes onto stack (XTPUSHSGR)
- ⛔️ Report selected graphic rendition (XTREPORTSGR)
- ⛔️ Pop video attributes from stack (XTPOPSGR)
- ⛔️ Push current dynamic- and ANSI-palette colors onto stack (XTPUSHCOLORS)
- ⛔️ Pop stack to set dynamic- and ANSI-palette colors (XTPOPCOLORS)
- ⛔️ Report current entry on color stack (XTREPORTCOLORS)
Ignored sequences and why:
- Set warning-bell volume (DECSWBV) - A GUI feature, does not affect terminal behavior/rendering.
- Set margin-bell volume (DECSMBV) - A GUI feature, does not affect terminal behavior/rendering.
ANSI Modes
- 2 - Lock Keyboard (KAM) xterm audit: ANSI modes 2 (KAM), 4 (INSERT), 12 (SRM) #664
- 4 - Insert Mode (IRM) xterm audit: ANSI modes 2 (KAM), 4 (INSERT), 12 (SRM) #664
- 12 - Send-Receive Mode (SRM) xterm audit: ANSI modes 2 (KAM), 4 (INSERT), 12 (SRM) #664
- Documented but explicitly did not implement, see xterm audit: ANSI modes 2 (KAM), 4 (INSERT), 12 (SRM) #664
- 20 - Linefeed Mode (LNM) terminal: linefeed mode #665
DEC Modes
- 1 - Cursor Keys (DECCKM)
- 2 - VT52 (DECANM)
- 3 - 80 or 132 Column Mode (DECCOLM) xterm audit: DEC mode 3 (DECCOLM), 4 (DECSCLM), 40 (132COLS) #870
- 4 - Slow Scrolling (DECSCLM) xterm audit: DEC mode 3 (DECCOLM), 4 (DECSCLM), 40 (132COLS) #870
- 5 - Reverse Video (DECSCNM) xterm audit: DEC mode 3 (DECCOLM), 4 (DECSCLM), 40 (132COLS) #870
- 6 - Origin Mode (DECOM)
- 7 - Autowrap (DECAWM)
- 8 - Repeat Held Keys (DECARM)
- 9 - X10 Mouse Tracking (XT_MOUSE)
- 10 - Show Toolbar (RXVT_TOOLBAR)
- 12 - Start/Stop Blinking Cursor (ATT610_BLINK)
- 13 - Cursor Blink Setting (read-only) (CURSOR_BLINK_OPS)
- 14 - XOR Cursor Blink (read-only) (XOR_CURSOR_BLINKS)
- 18 - Print Form Feed (DECPFF)
- 19 - Print Extent (DECPEX)
- 25 - Show/Hide Cursor (DECTCEM)
- 30 - Show Scrollbar (RXVT_SCROLLBAR)
- 40 - Enable Mode 3 (132 Col Mode) (132COLS) xterm audit: DEC mode 3 (DECCOLM), 4 (DECSCLM), 40 (132COLS) #870
- 42 - DEC National Character Set (DECNRCM)
- 45 - Reverse Wrap (REVERSEWRAP)
- 47 - Alt Buffer
- 66 - Application Keypad Mode (DECNKM)
- 67 - Backarrow Key Mode (DECBKM)
- 69 - Enable Left/Right Margins (DECLRMM)
- 95 - Set/Reset No Clearing Screen On Column Change (DECNCSM)
- 1000 - VT200 Mouse (VT200_MOUSE)
- 1001 - VT200 Highlight Mouse (VT200_HIGHLIGHT_MOUSE)
- 1002 - Btn Event Mouse (BTN_EVENT_MOUSE)
- 1003 - Any Event Mouse (ANY_EVENT_MOUSE)
- 1004 - Focus Event Mouse (FOCUS_EVENT_MOUSE)
- 1005 - Ext Mode Mouse (EXT_MODE_MOUSE)
- 1006 - SGR Ext Mode Mouse (SGR_EXT_MODE_MOUSE)
- 1007 - Alternate Scroll
- 1010 - Scroll on TTY Output
- 1011 - Scroll on Keypress
- 1015 - URXVT Mode Mouse (URXVT_EXT_MODE_MOUSE)
- 1016 - Pixel Position Mouse (PIXEL_POSITION_MOUSE)
- 1035 - Real Num Lock
- 1036 - Meta Sends Esc
- 1037 - Delete is Delete
- 1039 - Alt Sends Esc
- 1045 - Extended Reverse Wrap (REVERSEWRAP2)
- 1047 - Alt Buffer
- 1048 - Alt Buffer
- 1049 - Alt Buffer and Clear
- 2004 - Bracketed Paste Mode
- 2005 - Quoted Paste
- 2006 - Paste Literal NL
Metadata
Metadata
Assignees
Labels
No labels