[vte] parser: Add more functions



commit 774d43cdda268fc89e39c36b616cd409622bb36e
Author: Christian Persch <chpe src gnome org>
Date:   Tue Mar 27 19:40:13 2018 +0200

    parser: Add more functions
    
    ...and mark them as implemented / unimplemented accordingly.

 src/Makefile.am      |    6 +
 src/modes-ecma.hh    |  145 +++-
 src/modes-private.hh |  603 ++++++++++-
 src/parser-c01.hh    |   73 ++
 src/parser-cat.cc    |    9 +-
 src/parser-cmd.hh    |  482 +++++---
 src/parser-csi.hh    |  202 +++--
 src/parser-dcs.hh    |   40 +-
 src/parser-esc.hh    |   47 +-
 src/parser-reply.hh  |    7 +-
 src/parser-test.cc   |   79 +--
 src/parser.cc        |   90 +--
 src/parser.hh        |    5 +-
 src/vte.cc           |   15 +
 src/vteinternal.hh   |    8 +
 src/vteseq.cc        | 3042 ++++++++++++++++++++++++++++++++++++++++++++++----
 16 files changed, 4200 insertions(+), 653 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 37281c1..4b98fc6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -64,6 +64,7 @@ libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_SOURCES = \
        parser-charset.hh \
        parser-charset-tables.hh \
        parser-cmd.hh \
+       parser-c01.hh \
        parser-csi.hh \
        parser-dcs.hh \
        parser-esc.hh \
@@ -126,6 +127,7 @@ libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_CPPFLAGS = \
        -DLOCALEDIR='"$(localedir)"' \
        -DGLIB_DISABLE_DEPRECATION_WARNINGS \
        -DVTE_COMPILATION \
+       -UPARSER_INCLUDE_NOP \
        -I$(builddir)/vte \
        -I$(srcdir)/vte \
        $(AM_CPPFLAGS)
@@ -253,6 +255,7 @@ parser_cat_SOURCES = \
        parser-charset.hh \
        parser-charset-tables.hh \
        parser-cmd.hh \
+       parser-c01.hh \
        parser-csi.hh \
        parser-dcs.hh \
        parser-esc.hh \
@@ -267,6 +270,7 @@ parser_cat_SOURCES = \
 parser_cat_CPPFLAGS = \
        -I$(builddir) \
        -I$(srcdir) \
+       -DPARSER_INCLUDE_NOP \
        $(AM_CPPFLAGS)
 parser_cat_CFLAGS = \
        $(GLIB_CFLAGS) \
@@ -292,6 +296,7 @@ test_parser_SOURCES = \
        parser-charset.hh \
        parser-charset-tables.hh \
        parser-cmd.hh \
+       parser-c01.hh \
        parser-csi.hh \
        parser-dcs.hh \
        parser-esc.hh \
@@ -303,6 +308,7 @@ test_parser_SOURCES = \
 test_parser_CPPFLAGS = \
        -I$(builddir) \
        -I$(srcdir) \
+       -DPARSER_INCLUDE_NOP \
        $(AM_CPPFLAGS)
 test_parser_CXXFLAGS = \
        $(VTE_CFLAGS) \
diff --git a/src/modes-ecma.hh b/src/modes-ecma.hh
index 68d7876..4ec0582 100644
--- a/src/modes-ecma.hh
+++ b/src/modes-ecma.hh
@@ -15,6 +15,10 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#if !defined(MODE) || !defined(MODE_FIXED)
+#error "Must define MODE and MODE_FIXED before including this file"
+#endif
+
 /*
  * Modes for SM_ECMA/RM_ECMA.
  *
@@ -23,8 +27,19 @@
  * References: ECMA-48 § 7
  *             WY370
  */
-
 MODE(IRM,  4)
+
+/*
+ * SRM - local echo send/receive mode
+ * If set, characters entered by the keyboard are shown on the
+ * screen as well as being sent to the host; if reset, the
+ * keyboard input is only sent to the host.
+ *
+ * Default: reset
+ *
+ * References: ECMA-48 § XXX
+ *             VT525
+ */
 MODE(SRM, 12)
 
 /* Unsupported */
@@ -46,20 +61,132 @@ MODE_FIXED(TTM,  16, ALWAYS_RESET)
 MODE_FIXED(SATM, 17, ALWAYS_RESET)
 MODE_FIXED(TSM,  18, ALWAYS_RESET)
 MODE_FIXED(EBM,  19, ALWAYS_RESET) /* ECMA-48 § F.5.1 Removed */
-MODE_FIXED(LNM,  20, ALWAYS_RESET) /* ECMA-48 § F.5.2 Removed */
+
+/*
+ * LNM - line feed/newline mode
+ * If set, the cursor moves to the first column on LF, FF, VT,
+ * and a Return key press sends CRLF.
+ * If reset, the cursor column is unchanged by LF, FF, VT,
+ * and a Return key press sends CR only.
+ *
+ * Default: reset
+ *
+ * References: ECMA-48 § F.5.2 Removed!
+ *             VT525
+ */
+MODE_FIXED(LNM,  20, ALWAYS_RESET)
+
 MODE_FIXED(GRCM, 21, ALWAYS_SET)
 MODE_FIXED(ZDM,  22, ALWAYS_RESET) /* ECMA-48 § F.4.2 Deprecated */
 
-#if 0
-MODE_FIXED(WYDSCM,    30, ALWAYS_SET)
+/*
+ * WYDSCM - display disable mode
+ * If set, blanks the screen; if reset, shows the data.
+ *
+ * Default: reset
+ *
+ * References: WY370
+ */
+MODE_FIXED(WYDSCM,    30, ALWAYS_RESET)
+
+/*
+ * WHYSTLINM - status line display mode
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYSTLINM,  31, ALWAYS_RESET)
+
+/*
+ * WYCRTSAVM - screen saver mode
+ * Like DECCRTSM.
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYCRTSAVM, 32, ALWAYS_RESET)
-MODE_FIXED(WYSTCURM,  33, ?)
-MODE_FIXED(WYULCURM,  34, ?)
+
+/*
+ * WYSTCURM - steady cursor mode
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
+MODE_FIXED(WYSTCURM,  33, ALWAYS_RESET)
+
+/*
+ * WYULCURM - underline cursor mode
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
+MODE_FIXED(WYULCURM,  34, ALWAYS_RESET)
+
+/*
+ * WYCLRM - width change clear disable mode
+ * If set, the screen is not cleared when the column mode changes
+ * by DECCOLM or WY161.
+ * Note that this does not affect DECSCPP.
+ * This is the same as DECNCSM mode.
+ *
+ * Default: set (set-up)
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYCLRM,    35, ALWAYS_SET)
+
+/*
+ * WYDELKM - delete key definition
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYDELKM,   36, ALWAYS_RESET) /* Same as DECBKM */
-MODE_FIXED(WYGATM,    37, ?)
-MODE_FIXED(WYTEXM,    38, ?)
+
+/*
+ * WYGATM - send characters mode
+ * If set, sends all characters; if reset, only erasable characters.
+ * Like GATM above.
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
+MODE_FIXED(WYGATM,    37, ALWAYS_RESET)
+
+/*
+ * WYTEXM - send full screen/scrolling region to printer
+ * Like DECPEX mode.
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
+MODE_FIXED(WYTEXM,    38, ALWAYS_RESET)
+
+/*
+ * WYEXTDM - extra data line
+ * If set, the last line of the screen is used as data line and not
+ * a status line; if reset, the last line of the screen is used
+ * as a status line.
+ *
+ * Default: reset
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYEXTDM,   40, ALWAYS_SET)
+
+/*
+ * WYASCII - WY350 personality mode
+ * If set, switches to WY350 personality.
+ *
+ * Default: reset (set-up)
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYASCII,   42, ALWAYS_SET)
-#endif
diff --git a/src/modes-private.hh b/src/modes-private.hh
index f7a26e7..87cd0f0 100644
--- a/src/modes-private.hh
+++ b/src/modes-private.hh
@@ -15,6 +15,10 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#if !defined(MODE) || !defined(MODE_FIXED)
+#error "Must define MODE and MODE_FIXED before including this file"
+#endif
+
 /*
  * Modes for SM_DEC/RM_DEC.
  *
@@ -36,36 +40,83 @@
 
 /*
  * DECCKM - cursor keys mode
+ *
+ * Controls whether the cursor keys send cursor sequences, or application
+ * sequences.
+ *
+ * Default: reset
+ *
+ * References: VT525
  */
 MODE(DEC_APPLICATION_CURSOR_KEYS, 1)
 
 /*
  * DECCOLM: 132 column mode
+ *
+ * Sets page width to 132 (set) or 80 (reset) columns.
+ *
+ * Changing this mode resets the top, bottom, left, right margins;
+ * clears the screen (unless DECNCSM is set); resets DECLRMM; and clears
+ * the status line if host-writable.
+ *
+ * Default: reset
+ *
+ * References: VT525
  */
 MODE(DEC_132_COLUMN, 3)
 
 /*
  * DECSCNM - screen mode
+ * If set, displays reverse; if reset, normal.
+ *
+ * Default: reset
+ *
+ * References: VT525
  */
 MODE(DEC_REVERSE_IMAGE,  5)
 
 /*
  * DECOM - origin mode
+ * If set, the cursor is restricted to within the page margins.
+ *
+ * On terminal reset, DECOM is reset.
+ *
+ * Default: reset
+ *
+ * References: VT525
  */
 MODE(DEC_ORIGIN, 6)
 
 /*
  * DECAWM - auto wrap mode
+ *
+ * Controls whether text wraps to the next line when the
+ * cursor reaches the right margin.
+ *
+ * Default: reset
+ *
+ * References: VT525
  */
 MODE(DEC_AUTOWRAP, 7)
 
 /*
  * DECTCEM - text cursor enable
+ * If set, the text cursor is visible; if reset, invisible.
+ *
+ * Default: set
+ *
+ * References: VT525
  */
 MODE(DEC_TEXT_CURSOR, 25)
 
 /*
  * DECNKM - numeric/application keypad mode
+ * Controls whether the numeric keypad sends application (set)
+ * or keypad (reset) sequences.
+ *
+ * Default: reset
+ *
+ * References: VT525
  */
 MODE(DEC_APPLICATION_KEYPAD, 66)
 
@@ -95,53 +146,549 @@ MODE(URXVT_MOUSE_EXT, 1015)
 
 /* DEC */
 
+/*
+ * DECANM - ansi-mode
+ * Resetting this puts the terminal into VT52 compatibility mode.
+ * Control sequences overlap with regular sequences so we have to
+ * detect them early before dispatching them.
+ * To return to ECMA-48 mode, use ESC < [1/11 3/12].
+ *
+ * Default: set
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECANM,      2, ALWAYS_SET)
+
+/*
+ * DECSCLM - scrolling mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECSCLM,     4, ALWAYS_RESET)
+
+/*
+ * DECARM - autorepeat mode
+ * Controls whether keys auytomatically repeat while held pressed
+ * for more than 0.5s.
+ * Note that /some/ keys do not repeat regardless of this setting.
+ *
+ * Default: set
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECARM,      8, ALWAYS_SET)
+
 MODE_FIXED(DECLTM,     11, ALWAYS_RESET)
 MODE_FIXED(DECEKEM,    16, ALWAYS_RESET)
+
+/*
+ * DECPFF - print FF mode
+ * Controls whether the terminal terminates a print command by
+ * sending a FF to the printer.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECCPFF,    18, ALWAYS_RESET)
+
+/*
+ * DECPEX - print extent mode
+ * If set, print page prints only the scrolling region;
+ * if reset, the complete page.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECPEX,     19, ALWAYS_RESET)
+
+/*
+ * DECLRM - RTL mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECRLM,     34, ALWAYS_RESET)
+
+/*
+ * DECHEBM - hebrew/north-american keyboard mapping mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECHEBM,    35, ALWAYS_RESET)
+
+/*
+ * DECHEM - hebrew encoding mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECHEM,     36, ALWAYS_RESET)
+
+/*
+ * DECNRCM - NRCS mode
+ * Operates in 7-bit (set) or 8-bit (reset) mode.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECNRCM,    42, ALWAYS_RESET)
+
 MODE_FIXED(DECGEPM,    43, ALWAYS_RESET) /* from VT330 */
 /* MODE_FIXED(DECGPCM,    44, ALWAYS_RESET) * from VT330, conflicts with XTERM_MARGIN_BELL */
 /* MODE_FIXED(DECGPCS,    45, ALWAYS_RESET) * from VT330, conflicts with XTERM_REVERSE_WRAP */
 /* MODE_FIXED(DECGPBM,    46, ALWAYS_RESET) * from VT330, conflicts with XTERM_LOGGING */
 /* MODE_FIXED(DECGRPM,    47, ALWAYS_RESET) * from VT330, conflicts with XTERM_ALTBUF */
 MODE_FIXED(DEC131TM,   53, ALWAYS_RESET)
+
+/*
+ * DECNAKB - greek/north-american keyboard mapping mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECNAKB,    57, ALWAYS_RESET)
+
+/*
+ * DECIPEM - enter/return to/from pro-printer emulation mode
+ * Switches the terminal to (set)/from (reset) the ibm pro
+ * printer protocol.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
+MODE_FIXED(DECIPEM,    58, ALWAYS_RESET)
+
 /* MODE_FIXED(DECKKDM,    59, ALWAYS_SET) * Kanji/Katakana Display Mode, from VT382-Kanji */
+
+/*
+ * DECHCCM - horizontal cursor coupling mode
+ * Controls what happens when the cursor moves out of the left or
+ * right margins of the window.
+ * If set, the window pans to keep the cursor in view; if reset,
+ * the cursor disappears.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECHCCM,    60, ALWAYS_RESET)
-MODE_FIXED(DECVCCM,    61, ALWAYS_RESET)
-MODE_FIXED(DECPCCM,    64, ALWAYS_RESET)
+
+/*
+ * DECVCCM - vertical cursor coupling mode
+ * Controls what happens when the cursor moves out of the top or
+ * bottom of the window, When the height of the window is smaller
+ * than the page.
+ * If set, the window pans to keep the cursor in view; if reset,
+ * the cursor disappears.
+ *
+ * Default: set
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
+MODE_FIXED(DECVCCM, 61, ALWAYS_SET)
+
+/*
+ * DECPCCM - page cursor coupling mode
+ *
+ * Default: set
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
+MODE_FIXED(DECPCCM, 64, ALWAYS_SET)
+
+/*
+ * DECBKM - backarrow key mode
+ * WYDELKM
+ *
+ * If set, the Backspace key works as a backspace key
+ * sending the BS control; if reset, it works as a Delete
+ * key sending the DEL control.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECBKM,     67, ALWAYS_RESET)
+
+/*
+ * DECKBUM - typewriter/data rpocessing keys mode
+ *
+ * If set, the keyboard keys act as data processing keys;
+ * if reset, as typewriter keys.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECKBUM,    68, ALWAYS_RESET)
-MODE_FIXED(DECVSSM,    69, ALWAYS_RESET) /* aka DECLRMM */
+
+/*
+ * DECLRMM - vertical split-screen mode
+ * Controls whether a DECSLRM is executed.
+ * On set, resets line attributes to single width and single height,
+ * and while set, the terminal ignores any changes to line attributes.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
+MODE_FIXED(DECLRMM, 69, ALWAYS_RESET) /* aka DECVSSM */
+
+/*
+ * DECXRLM - transmit rate limit
+ * If set, limits the transmit rate; if reset, the rate is
+ * unlimited.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECXRLM,    73, ALWAYS_RESET)
+
+/*
+ * DECSDM - sixel display mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 /* MODE_FIXED(DECSDM,    80, ALWAYS_RESET) ! Conflicts with WY161 */
+
+/*
+ * DECKPM - key position mode
+ * If set, the keyboard sends extended reports (DECEKBD) that include
+ * the key position and modifier state; if reset, it sends character codes.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECKPM,     81, ALWAYS_RESET)
+
 MODE_FIXED(DECTHAISCM, 90, ALWAYS_RESET) /* Thai Space Compensating Mode, from VT382-Thai */
+
+/*
+ * DECNCSM - no clear screen on DECOLM
+ * If set, the screen is not cleared when the column mode changes
+ * by DECCOLM.
+ * Note that this does not affect DECSCPP.
+ *
+ * Default: set
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECNCSM,    95, ALWAYS_RESET)
+
+/*
+ * DECRLCM - RTL copy mode
+ * If set, copy/paste from RTL; if reset, from LTR.
+ * Only enabled when the keyboard language is set to hebrew.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECRLCM,    96, ALWAYS_RESET)
+
+/*
+ * DECCRTSM - CRT save mode
+ * When set, blanks the terminal after the inactivity timeout
+ * (set with DECCRTST).
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECRCRTSM,  97, ALWAYS_RESET)
+
+/*
+ * DECARSM - auto resize mode
+ * Sets whether changing page arrangements automatically
+ * changes the lines per screen.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECARSM,    98, ALWAYS_RESET)
+
+/*
+ * DECMCM - modem control mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECMCM,     99, ALWAYS_RESET)
+
+/*
+ * DECAAM - auto answerback mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ */
 MODE_FIXED(DECAAM,    100, ALWAYS_RESET)
+
+/*
+ * DECCANSM - conceal answerback message mode
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Unimplemented, since we don't support answerback at all.
+ */
 MODE_FIXED(DECANSM,   101, ALWAYS_RESET)
+
+/*
+ * DECNULM - null mode
+ * If set, pass NUL to the printer; if reset, discard NUL.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECNULM,   102, ALWAYS_RESET)
+
+/*
+ * DECHDPXM - half-duplex mode
+ * Whether to use half-duplex (set) or full-duplex (reset) mode.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECHDPXM,  103, ALWAYS_RESET)
+
+/*
+ * DECESKM - enable secondary keyboard language mode
+ * If set, use the secondary keyboard mapping (group 2); if reset,
+ * use the primary (group 1).
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECESKM,   104, ALWAYS_RESET)
+
+/*
+ * DECOSCNM - overscan mode
+ * (monochrome terminal only)
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECOSCNM,  106, ALWAYS_RESET)
+
+/*
+ * DECNUMLK - num lock mode
+ *
+ * Set the num lock state as if by acting the NumLock key.
+ * Set means NumLock on; reset means off.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
+MODE_FIXED(DECNUMLK, 108, ALWAYS_RESET)
+
+/*
+ * DECCAPSLK - caps lock mode
+ *
+ * Set the caps lock state as if by acting the CapsLock key.
+ * Set means CapsLock on; reset means off.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECCAPSLK, 109, ALWAYS_RESET)
+
+/*
+ * DECKLHIM - keyboard LED host indicator mode
+ * If set, the keyboard LEDs show the state from the host
+ * (see DECLL); if reset, the local state.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
+MODE_FIXED(DECKLHIM, 110, ALWAYS_RESET)
+
+/*
+ * DECFWM - framed window mode
+ * If set, session window frames are drawn with frame border and icon.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * VTE does not support sessions.
+ */
 MODE_FIXED(DECFWM,    111, ALWAYS_RESET)
-MODE_FIXED(DECRPL,    112, ALWAYS_RESET)
+
+/*
+ * DECRPL - review previous lines mode
+ * If set, allows to view the scrollback.
+ *
+ * Default: set (VTE)
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
+MODE_FIXED(DECRPL, 112, ALWAYS_SET)
+
+/*
+ * DECHWUM - host wake-up mode
+ * If set, the terminal exits CRT save and energy save mode
+ * when a character is received from the host.
+ *
+ * Default: ?
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECHWUM,   113, ALWAYS_RESET)
+
+/*
+ * DECTCUM - alternate text color underline mode
+ *
+ * If set, text with the undeerline attribute is underlined as
+ * well as being displayed in the alternate coolor (if
+ * specified); if reset, it is only displayed in the
+ * alternate color.
+ *
+ * Default: ?
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECATCUM,  114, ALWAYS_RESET)
+
+/*
+ * DECTCBM - alternate text color blink mode
+ *
+ * If set, text with the blink attribute blinks as well
+ * as being displayed in the alternate color (if
+ * specified); if reset, it is only displayed in the
+ * alternate color.
+ *
+ * Default: ?
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECATCBM,  115, ALWAYS_RESET)
+
+/*
+ * DECBBSM - bold and blink style mode
+ *
+ * If set, the bold or blink attributes affect both foreground
+ * and background color; if reset, those affect only the foreground
+ * color.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECBBSM,   116, ALWAYS_RESET)
+
+/*
+ * DECECM - erase color mode
+ *
+ * If set, erased text or new cells appearing on the screen by scrolling
+ * are assigned the screen background color; if reset, they are assigned
+ * the text background color.
+ *
+ * Default: reset
+ *
+ * References: VT525
+ *
+ * Probably not worth implementing.
+ */
 MODE_FIXED(DECECM,    117, ALWAYS_RESET)
 
 /* DRCSTerm */
@@ -210,10 +757,58 @@ MODE_FIXED(RXVT_INTENSITY_STYLES, 1021, ALWAYS_SET)
 
 /* Wyse */
 
+/*
+ * WYTEK - TEK 4010/4014 personality
+ * If set, switches to TEK 4010/4014 personality.
+ *
+ * Default: reset
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYTEK,  38, ALWAYS_RESET)
+
+/*
+ * WY161 - 161 column mode
+ * If set, switches the terminal to 161 columns; if reset,
+ * to 80 columns.
+ *
+ * Default: reset
+ *
+ * References: WY370
+ */
 MODE_FIXED(WY161,  80, ALWAYS_RESET)
+
+/*
+ * WY52 - 52 lines mode
+ * If set, switches the terminal to 52 lines; if reset,
+ * to 24 lines.
+ *
+ * Default: reset
+ *
+ * References: WY370
+ */
 MODE_FIXED(WY52,   83, ALWAYS_RESET)
+
+/*
+ * WYENAT - enable separate attributes
+ * If set, SGR attributes may be set separately for eraseable
+ * and noneraseable characters. If reset, the same SGR attributes
+ * apply to both eraseable and noneraseable characters.
+ *
+ *
+ * Default: reset
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYENAT, 84, ALWAYS_RESET)
+
+/*
+ * WYREPL - replacement character color
+ *
+ * Default: reset
+ *
+ * References: WY370
+ */
 MODE_FIXED(WYREPL, 85, ALWAYS_RESET)
 
 /* XTERM */
diff --git a/src/parser-c01.hh b/src/parser-c01.hh
new file mode 100644
index 0000000..04dd279
--- /dev/null
+++ b/src/parser-c01.hh
@@ -0,0 +1,73 @@
+/*
+ * Copyright © 2015 David Herrmann <dh herrmann gmail com>
+ * Copyright © 2018 Christian Persch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#if !defined(_VTE_SEQ) || !defined(_VTE_NOQ)
+#error "Must define _VTE_SEQ and _VTE_NOQ before including this file"
+#endif
+
+_VTE_NOQ(NUL, CONTROL, 0x00, NONE, 0, NONE)
+_VTE_NOQ(SOH, CONTROL, 0x01, NONE, 0, NONE)
+_VTE_NOQ(STX, CONTROL, 0x02, NONE, 0, NONE)
+_VTE_NOQ(ETX, CONTROL, 0x03, NONE, 0, NONE)
+_VTE_NOQ(EOT, CONTROL, 0x04, NONE, 0, NONE)
+_VTE_NOQ(ENQ, CONTROL, 0x05, NONE, 0, NONE)
+_VTE_NOQ(ACK, CONTROL, 0x06, NONE, 0, NONE)
+_VTE_SEQ(BEL, CONTROL, 0x07, NONE, 0, NONE)
+_VTE_SEQ(BS,  CONTROL, 0x08, NONE, 0, NONE)
+_VTE_SEQ(HT,  CONTROL, 0x09, NONE, 0, NONE)
+_VTE_SEQ(LF,  CONTROL, 0x0a, NONE, 0, NONE)
+_VTE_SEQ(VT,  CONTROL, 0x0b, NONE, 0, NONE)
+_VTE_SEQ(FF,  CONTROL, 0x0c, NONE, 0, NONE)
+_VTE_SEQ(CR,  CONTROL, 0x0d, NONE, 0, NONE)
+_VTE_SEQ(LS1, CONTROL, 0x0e, NONE, 0, NONE)
+_VTE_SEQ(LS0, CONTROL, 0x0f, NONE, 0, NONE)
+_VTE_NOQ(DLE, CONTROL, 0x10, NONE, 0, NONE)
+_VTE_NOQ(DC1, CONTROL, 0x11, NONE, 0, NONE)
+_VTE_NOQ(DC2, CONTROL, 0x12, NONE, 0, NONE)
+_VTE_NOQ(DC3, CONTROL, 0x13, NONE, 0, NONE)
+_VTE_NOQ(DC4, CONTROL, 0x14, NONE, 0, NONE)
+_VTE_NOQ(SYN, CONTROL, 0x16, NONE, 0, NONE)
+_VTE_NOQ(ETB, CONTROL, 0x17, NONE, 0, NONE)
+_VTE_NOQ(EM,  CONTROL, 0x19, NONE, 0, NONE)
+_VTE_SEQ(SUB, CONTROL, 0x1a, NONE, 0, NONE)
+_VTE_NOQ(IS4, CONTROL, 0x1c, NONE, 0, NONE)
+_VTE_NOQ(IS3, CONTROL, 0x1d, NONE, 0, NONE)
+_VTE_NOQ(IS2, CONTROL, 0x1e, NONE, 0, NONE)
+_VTE_NOQ(IS1, CONTROL, 0x1f, NONE, 0, NONE)
+_VTE_NOQ(BPH, CONTROL, 0x82, NONE, 0, NONE)
+_VTE_NOQ(NBH, CONTROL, 0x83, NONE, 0, NONE)
+_VTE_SEQ(IND, CONTROL, 0x84, NONE, 0, NONE)
+_VTE_SEQ(NEL, CONTROL, 0x85, NONE, 0, NONE)
+_VTE_NOQ(SSA, CONTROL, 0x86, NONE, 0, NONE)
+_VTE_NOQ(ESA, CONTROL, 0x87, NONE, 0, NONE)
+_VTE_SEQ(HTS, CONTROL, 0x88, NONE, 0, NONE)
+_VTE_SEQ(HTJ, CONTROL, 0x89, NONE, 0, NONE)
+_VTE_NOQ(VTS, CONTROL, 0x8a, NONE, 0, NONE)
+_VTE_NOQ(PLD, CONTROL, 0x8b, NONE, 0, NONE)
+_VTE_NOQ(PLU, CONTROL, 0x8c, NONE, 0, NONE)
+_VTE_SEQ(RI,  CONTROL, 0x8d, NONE, 0, NONE)
+_VTE_SEQ(SS2, CONTROL, 0x8e, NONE, 0, NONE)
+_VTE_SEQ(SS3, CONTROL, 0x8f, NONE, 0, NONE)
+_VTE_NOQ(PU1, CONTROL, 0x91, NONE, 0, NONE)
+_VTE_NOQ(PU2, CONTROL, 0x92, NONE, 0, NONE)
+_VTE_NOQ(STS, CONTROL, 0x93, NONE, 0, NONE)
+_VTE_NOQ(CCH, CONTROL, 0x94, NONE, 0, NONE)
+_VTE_NOQ(NAK, CONTROL, 0x95, NONE, 0, NONE)
+_VTE_NOQ(SPA, CONTROL, 0x96, NONE, 0, NONE)
+_VTE_NOQ(EPA, CONTROL, 0x97, NONE, 0, NONE)
+_VTE_NOQ(ST,  CONTROL, 0x9c, NONE, 0, NONE)
diff --git a/src/parser-cat.cc b/src/parser-cat.cc
index 1e7f5b7..2dff13e 100644
--- a/src/parser-cat.cc
+++ b/src/parser-cat.cc
@@ -59,8 +59,10 @@ cmd_to_str(unsigned int command)
 {
         switch (command) {
 #define _VTE_CMD(cmd) case VTE_CMD_##cmd: return #cmd;
+#define _VTE_NOP(cmd) _VTE_CMD(cmd)
 #include "parser-cmd.hh"
 #undef _VTE_CMD
+#undef _VTE_NOP
         default:
                 return nullptr;
         }
@@ -490,13 +492,16 @@ main(int argc,
 
         if (statistics) {
                 for (unsigned int s = VTE_SEQ_NONE + 1; s < VTE_SEQ_N; s++) {
-                        g_printerr("%-7s: %" G_GSIZE_FORMAT "\n", seq_to_str(s), seq_stats[s]);
+                        g_printerr("%\'16" G_GSIZE_FORMAT " %s\n",  seq_stats[s], seq_to_str(s));
                 }
 
                 g_printerr("\n");
                 for (unsigned int s = 0; s < VTE_CMD_N; s++) {
                         if (cmd_stats[s] > 0) {
-                                g_printerr("%-12s: %" G_GSIZE_FORMAT "\n", cmd_to_str(s), cmd_stats[s]);
+                                g_printerr("%\'16" G_GSIZE_FORMAT " %s%s\n",
+                                           cmd_stats[s],
+                                           cmd_to_str(s),
+                                           s >= VTE_CMD_NOP_FIRST ? " [NOP]" : "");
                         }
                 }
         }
diff --git a/src/parser-cmd.hh b/src/parser-cmd.hh
index 29fb212..5c23193 100644
--- a/src/parser-cmd.hh
+++ b/src/parser-cmd.hh
@@ -16,201 +16,311 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#if !defined(_VTE_CMD) || !defined(_VTE_NOP)
+#error "Must define _VTE_CMD and _VTE_NOP before including this file"
+#endif
+
+/* Implemented in VTE: */
+
 _VTE_CMD(NONE) /* placeholder */
 _VTE_CMD(GRAPHIC) /* graphics character */
-_VTE_CMD(ACS) /* announce-code-structure */
+_VTE_CMD(ACS) /* announce code structure */
 _VTE_CMD(BEL) /* bell */
 _VTE_CMD(BS) /* backspace */
-_VTE_CMD(CBT) /* cursor-backward-tabulation */
-_VTE_CMD(CHA) /* cursor-horizontal-absolute */
-_VTE_CMD(CHT) /* cursor-horizontal-forward-tabulation */
-_VTE_CMD(CMD) /* coding-method-delimiter */
-_VTE_CMD(CNL) /* cursor-next-line */
-_VTE_CMD(CPL) /* cursor-previous-line */
-_VTE_CMD(CR) /* carriage-return */
-_VTE_CMD(CUB) /* cursor-backward */
-_VTE_CMD(CUD) /* cursor-down */
-_VTE_CMD(CUF) /* cursor-forward */
-_VTE_CMD(CUP) /* cursor-position */
-_VTE_CMD(CUU) /* cursor-up */
+_VTE_CMD(CBT) /* cursor backward tabulation */
+_VTE_CMD(CHA) /* cursor horizontal absolute */
+_VTE_CMD(CHT) /* cursor horizontal forward tabulation */
+_VTE_CMD(CNL) /* cursor next line */
+_VTE_CMD(CPL) /* cursor previous line */
+_VTE_CMD(CR) /* carriage return */
+_VTE_CMD(CTC) /* cursor tabulation control */
+_VTE_CMD(CUB) /* cursor backward */
+_VTE_CMD(CUD) /* cursor down */
+_VTE_CMD(CUF) /* cursor forward */
+_VTE_CMD(CUP) /* cursor position */
+_VTE_CMD(CUU) /* cursor up */
 _VTE_CMD(CnD) /* Cn-designate */
-_VTE_CMD(DA1) /* primary-device-attributes */
-_VTE_CMD(DA2) /* secondary-device-attributes */
-_VTE_CMD(DA3) /* tertiary-device-attributes */
-_VTE_CMD(DC1) /* device-control-1 or XON */
-_VTE_CMD(DC3) /* device-control-3 or XOFF */
-_VTE_CMD(DCH) /* delete-character */
-_VTE_CMD(DECALN) /* screen-alignment-pattern */
-_VTE_CMD(DECANM) /* ansi-mode */
-_VTE_CMD(DECAUPSS) /* assign-user-preferred-supplemental-sets */
-_VTE_CMD(DECBI) /* back-index */
-_VTE_CMD(DECCARA) /* change-attributes-in-rectangular-area */
-_VTE_CMD(DECCKD) /* copy-key-default */
-_VTE_CMD(DECCRA) /* copy-rectangular-area */
-_VTE_CMD(DECDC) /* delete-column */
-_VTE_CMD(DECDHL_BH) /* double-width-double-height-line: bottom half */
-_VTE_CMD(DECDHL_TH) /* double-width-double-height-line: top half */
-_VTE_CMD(DECDLD) /* dynamically-redefinable-character-sets-extension */
-_VTE_CMD(DECDMAC) /* define-macro */
-_VTE_CMD(DECDWL) /* double-width-single-height-line */
-_VTE_CMD(DECEFR) /* enable-filter-rectangle */
-_VTE_CMD(DECELF) /* enable-local-functions */
-_VTE_CMD(DECELR) /* enable-locator-reporting */
-_VTE_CMD(DECERA) /* erase-rectangular-area */
-_VTE_CMD(DECFI) /* forward-index */
-_VTE_CMD(DECFRA) /* fill-rectangular-area */
-_VTE_CMD(DECIC) /* insert-column */
-_VTE_CMD(DECINVM) /* invoke-macro */
-_VTE_CMD(DECKBD) /* keyboard-language-selection */
-_VTE_CMD(DECKPAM) /* keypad-application-mode */
-_VTE_CMD(DECKPNM) /* keypad-numeric-mode */
-_VTE_CMD(DECLANS) /* load-answerback-message */
-_VTE_CMD(DECLBAN) /* load-banner-message */
-_VTE_CMD(DECLBD) /* locator-button-define */
-_VTE_CMD(DECLFKC) /* local-function-key-control */
-_VTE_CMD(DECLL) /* load-leds */
-_VTE_CMD(DECLTOD) /* load-time-of-day */
-_VTE_CMD(DECPCTERM) /* pcterm-mode */
-_VTE_CMD(DECPCTERM_OR_XTERM_RPM) /* ambiguous */
-_VTE_CMD(DECPAK) /* program-alphanumeric-key */
-_VTE_CMD(DECPFK) /* program-function-key */
-_VTE_CMD(DECPKA) /* program-key-action */
-_VTE_CMD(DECPKFMR) /* program-key-free-memory-report */
-_VTE_CMD(DECRARA) /* reverse-attributes-in-rectangular-area */
-_VTE_CMD(DECRC) /* restore-cursor */
-_VTE_CMD(DECREGIS) /* ReGIS-graphics */
-_VTE_CMD(DECREQTPARM) /* request-terminal-parameters */
-_VTE_CMD(DECRPKT) /* report-key-type */
-_VTE_CMD(DECRQCRA) /* request-checksum-of-rectangular-area */
-_VTE_CMD(DECRQDE) /* request-display-extent */
-_VTE_CMD(DECRQKT) /* request-key-type */
-_VTE_CMD(DECRQLP) /* request-locator-position */
-_VTE_CMD(DECRQM_ECMA) /* request-mode-ecma */
-_VTE_CMD(DECRQM_DEC) /* request-mode-dec */
-_VTE_CMD(DECRQPKFM) /* request-program-key-free-memory */
-_VTE_CMD(DECRQPSR) /* request-presentation-state-report */
-_VTE_CMD(DECRQSS) /* request-selection-or-setting */
-_VTE_CMD(DECRQTSR) /* request-terminal-state-report */
-_VTE_CMD(DECRQUPSS) /* request-user-preferred-supplemental-set */
-_VTE_CMD(DECRSPS) /* restore-presentation-state */
-_VTE_CMD(DECRSTS) /* restore-terminal-state */
-_VTE_CMD(DECSACE) /* select-attribute-change-extent */
-_VTE_CMD(DECSASD) /* select-active-status-display */
-_VTE_CMD(DECSC) /* save-cursor */
-_VTE_CMD(DECSCA) /* select-character-protection-attribute */
-_VTE_CMD(DECSCL) /* select-conformance-level */
-_VTE_CMD(DECSCP) /* select-communication-port */
-_VTE_CMD(DECSCPP) /* select-columns-per-page */
-_VTE_CMD(DECSCS) /* select-communication-speed */
-_VTE_CMD(DECSCUSR) /* set-cursor-style */
-_VTE_CMD(DECSDDT) /* select-disconnect-delay-time */
-_VTE_CMD(DECSDPT) /* select-digital-printed-data-type */
-_VTE_CMD(DECSED) /* selective-erase-in-display */
-_VTE_CMD(DECSEL) /* selective-erase-in-line */
-_VTE_CMD(DECSERA) /* selective-erase-rectangular-area */
-_VTE_CMD(DECSFC) /* select-flow-control */
-_VTE_CMD(DECSIXEL) /* SIXEL-graphics */
-_VTE_CMD(DECSKCV) /* set-key-click-volume */
-_VTE_CMD(DECSLCK) /* set-lock-key-style */
-_VTE_CMD(DECSLE) /* select-locator-events */
-_VTE_CMD(DECSLPP) /* set-lines-per-page */
-_VTE_CMD(DECSLRM_OR_SC) /* set-left-and-right-margins or save-cursor */
-_VTE_CMD(DECSMBV) /* set-margin-bell-volume */
-_VTE_CMD(DECSMKR) /* select-modifier-key-reporting */
-_VTE_CMD(DECSNLS) /* set-lines-per-screen */
-_VTE_CMD(DECSPP) /* set-port-parameter */
-_VTE_CMD(DECSPPCS) /* select-pro-printer-character-set */
-_VTE_CMD(DECSPRTT) /* select-printer-type */
-_VTE_CMD(DECSR) /* secure-reset */
-_VTE_CMD(DECSRFR) /* select-refresh-rate */
-_VTE_CMD(DECSSCLS) /* set-scroll-speed */
-_VTE_CMD(DECSSDT) /* select-status-display-line-type */
-_VTE_CMD(DECSSL) /* select-setup-language */
-_VTE_CMD(DECST8C) /* set-tab-at-every-8-columns */
-_VTE_CMD(DECSTBM) /* set-top-and-bottom-margins */
-_VTE_CMD(DECSTUI) /* set-terminal-unit-id */
-_VTE_CMD(DECSTR) /* soft-terminal-reset */
-_VTE_CMD(DECSTRL) /* set-transmit-rate-limit */
-_VTE_CMD(DECSWBV) /* set-warning-bell-volume */
-_VTE_CMD(DECSWL) /* single-width-single-height-line */
-_VTE_CMD(DECTID) /* select-terminal-id */
-_VTE_CMD(DECTME) /* terminal-mode-emulation */
-_VTE_CMD(DECTST) /* invoke-confidence-test */
-_VTE_CMD(DECUDK) /* user-defined-keys */
-_VTE_CMD(DL) /* delete-line */
+_VTE_CMD(DA1) /* primary device attributes */
+_VTE_CMD(DA2) /* secondary device attributes */
+_VTE_CMD(DA3) /* tertiary device attributes */
+_VTE_CMD(DCH) /* delete character */
+_VTE_CMD(DECALN) /* screen alignment pattern */
+_VTE_CMD(DECBI) /* back index */
+_VTE_CMD(DECKPAM) /* keypad application mode */
+_VTE_CMD(DECKPNM) /* keypad numeric mode */
+_VTE_CMD(DECPCTERM_OR_XTERM_RPM) /* pcterm or xterm restore private mode */
+_VTE_CMD(DECRC) /* restore cursor */
+_VTE_CMD(DECREQTPARM) /* request terminal parameters */
+_VTE_CMD(DECRQCRA) /* request checksum of rectangular area */
+_VTE_CMD(DECRQM_DEC) /* request mode dec */
+_VTE_CMD(DECRQM_ECMA) /* request mode ecma */
+_VTE_CMD(DECRQSS) /* request selection or setting */
+_VTE_CMD(DECRQTSR) /* request terminal state report */
+_VTE_CMD(DECSCL) /* select conformance level */
+_VTE_CMD(DECSC) /* save cursor */
+_VTE_CMD(DECSCUSR) /* set cursor style */
+_VTE_CMD(DECSED) /* selective erase in display */
+_VTE_CMD(DECSEL) /* selective erase in line */
+_VTE_CMD(DECSLPP) /* set lines per page */
+_VTE_CMD(DECSLRM) /* set left and right margins */
+_VTE_CMD(DECSR) /* secure reset */
+_VTE_CMD(DECST8C) /* set tab at every 8 columns */
+_VTE_CMD(DECSTBM) /* set top and bottom margins */
+_VTE_CMD(DECSTR) /* soft terminal reset */
+_VTE_CMD(DL) /* delete line */
 _VTE_CMD(DOCS) /* designate-other-coding-system */
-_VTE_CMD(DSR_DEC) /* device-status-report-dec */
-_VTE_CMD(DSR_ECMA) /* device-status-report-ecma */
-_VTE_CMD(ECH) /* erase-character */
-_VTE_CMD(ED) /* erase-in-display */
-_VTE_CMD(EL) /* erase-in-line */
-_VTE_CMD(ENQ) /* enquiry */
-_VTE_CMD(EPA) /* end-of-guarded-area */
-_VTE_CMD(FF) /* form-feed */
+_VTE_CMD(DSR_DEC) /* device status report dec */
+_VTE_CMD(DSR_ECMA) /* device status report ecma */
+_VTE_CMD(ECH) /* erase character */
+_VTE_CMD(ED) /* erase in display */
+_VTE_CMD(EL) /* erase in line */
+_VTE_CMD(FF) /* form feed */
 _VTE_CMD(GnDm) /* Gn-designate-9m-charset */
 _VTE_CMD(GnDMm) /* Gn-designate-multibyte-9m-charset */
-_VTE_CMD(HPA) /* horizontal-position-absolute */
-_VTE_CMD(HPR) /* horizontal-position-relative */
-_VTE_CMD(HT) /* horizontal-tab */
-_VTE_CMD(HTS) /* horizontal-tab-set */
-_VTE_CMD(HVP) /* horizontal-and-vertical-position */
-_VTE_CMD(ICH) /* insert-character */
-_VTE_CMD(IL) /* insert-line */
+_VTE_CMD(HPA) /* horizontal position absolute */
+_VTE_CMD(HPR) /* horizontal position relative */
+_VTE_CMD(HT) /* horizontal tab */
+_VTE_CMD(HTJ) /* character tabulation with justification */
+_VTE_CMD(HTS) /* horizontal tab set */
+_VTE_CMD(HVP) /* horizontal and vertical position */
+_VTE_CMD(ICH) /* insert character */
+_VTE_CMD(IL) /* insert line */
 _VTE_CMD(IND) /* index */
-_VTE_CMD(IRR) /* identify-revised-registration */
-_VTE_CMD(LF) /* line-feed */
-_VTE_CMD(LS1R) /* locking-shift-1-right */
-_VTE_CMD(LS2) /* locking-shift-2 */
-_VTE_CMD(LS2R) /* locking-shift-2-right */
-_VTE_CMD(LS3) /* locking-shift-3 */
-_VTE_CMD(LS3R) /* locking-shift-3-right */
-_VTE_CMD(MC_ANSI) /* media-copy-ansi */
-_VTE_CMD(MC_DEC) /* media-copy-dec */
-_VTE_CMD(NEL) /* next-line */
-_VTE_CMD(NP) /* next-page */
-_VTE_CMD(NUL) /* nul */
+_VTE_CMD(LF) /* line feed */
+_VTE_CMD(LS0) /* locking shift 0 */
+_VTE_CMD(LS1) /* locking shift 1 */
+_VTE_CMD(LS1R) /* locking shift 1 right */
+_VTE_CMD(LS2) /* locking shift 2 */
+_VTE_CMD(LS2R) /* locking shift 2 right */
+_VTE_CMD(LS3) /* locking shift 3 */
+_VTE_CMD(LS3R) /* locking shift 3 right */
+_VTE_CMD(NEL) /* next line */
 _VTE_CMD(OSC) /* operating-system-command */
-_VTE_CMD(PP) /* preceding-page */
-_VTE_CMD(PPA) /* page-position-absolute */
-_VTE_CMD(PPB) /* page-position-backward */
-_VTE_CMD(PPR) /* page-position-relative */
-_VTE_CMD(RC) /* restore-cursor */
 _VTE_CMD(REP) /* repeat */
-_VTE_CMD(RI) /* reverse-index */
-_VTE_CMD(RIS) /* reset-to-initial-state */
-_VTE_CMD(RM_ECMA) /* reset-mode-ecma */
-_VTE_CMD(RM_DEC) /* reset-mode-dec */
-_VTE_CMD(SD) /* scroll-down */
-_VTE_CMD(SD_OR_XTERM_IHMT) /* ambiguous */
-_VTE_CMD(SGR) /* select-graphics-rendition */
-_VTE_CMD(SI) /* shift-in */
-_VTE_CMD(SM_ECMA) /* set-mode-ecma */
-_VTE_CMD(SM_DEC) /* set-mode-dec */
-_VTE_CMD(SO) /* shift-out */
-_VTE_CMD(SPA) /* start-of-protected-area */
-_VTE_CMD(SS2) /* single-shift-2 */
-_VTE_CMD(SS3) /* single-shift-3 */
-_VTE_CMD(ST) /* string-terminator */
-_VTE_CMD(SU) /* scroll-up */
+_VTE_CMD(RI) /* reverse index */
+_VTE_CMD(RIS) /* reset to initial state */
+_VTE_CMD(RM_DEC) /* reset mode dec */
+_VTE_CMD(RM_ECMA) /* reset mode ecma */
+_VTE_CMD(SD) /* scroll down */
+_VTE_CMD(SD_OR_XTERM_IHMT) /* scroll down or xterm initiate highlight mouse tracking */
+_VTE_CMD(SGR) /* select graphics rendition */
+_VTE_CMD(SM_DEC) /* set mode dec */
+_VTE_CMD(SM_ECMA) /* set mode ecma */
+_VTE_CMD(SS2) /* single shift 2 */
+_VTE_CMD(SS3) /* single shift 3 */
 _VTE_CMD(SUB) /* substitute */
-_VTE_CMD(TAC) /* tabulation-aligned-centre */
-_VTE_CMD(TALE) /* tabulation-aligned-leading-edge */
-_VTE_CMD(TATE) /* tabulation-aligned-trailing-edge */
-_VTE_CMD(TBC) /* tab-clear */
-_VTE_CMD(TCC) /* tabulation-centred-on-character */
-_VTE_CMD(TSR) /* tabulation-stop-remove */
-_VTE_CMD(VPA) /* vertical-line-position-absolute */
-_VTE_CMD(VPR) /* vertical-line-position-relative */
-_VTE_CMD(VT) /* vertical-tab */
-_VTE_CMD(XTERM_CLLHP) /* xterm-cursor-lower-left-hp-bugfix */
-_VTE_CMD(XTERM_IHMT) /* xterm-initiate-highlight-mouse-tracking */
-_VTE_CMD(XTERM_MLHP) /* xterm-memory-lock-hp-bugfix */
-_VTE_CMD(XTERM_MUHP) /* xterm-memory-unlock-hp-bugfix */
-_VTE_CMD(XTERM_RPM) /* xterm-restore-private-mode */
-_VTE_CMD(XTERM_RRV) /* xterm-reset-resource-value */
-_VTE_CMD(XTERM_RTM) /* xterm-reset-title-mode */
-_VTE_CMD(XTERM_SGFX) /* xterm-sixel-graphics */
-_VTE_CMD(XTERM_SPM) /* xterm-set-private-mode */
-_VTE_CMD(XTERM_SRV) /* xterm-set-resource-value */
-_VTE_CMD(XTERM_STM) /* xterm-set-title-mode */
-_VTE_CMD(XTERM_WM) /* xterm-window-management */
+_VTE_CMD(SU) /* scroll up */
+_VTE_CMD(TBC) /* tab clear */
+_VTE_CMD(TCC) /* tabulation centred on character */
+_VTE_CMD(TSR) /* tabulation stop remove */
+_VTE_CMD(VPA) /* vertical line position absolute */
+_VTE_CMD(VPR) /* vertical line position relative */
+_VTE_CMD(VT) /* vertical tab */
+_VTE_CMD(XTERM_RTM) /* xterm reset title mode */
+_VTE_CMD(XTERM_RPM) /* xterm restore private mode */
+_VTE_CMD(XTERM_SPM) /* xterm set private mode */
+_VTE_CMD(XTERM_WM) /* xterm window management */
+
+/* Unimplemented in VTE: */
+
+_VTE_NOP(ACK) /* acknowledge */
+_VTE_NOP(BPH) /* break permitted here */
+_VTE_NOP(CCH) /* cancel character */
+_VTE_NOP(CMD) /* coding method delimiter */
+_VTE_NOP(CVT) /* cursor line tabulation */
+_VTE_NOP(DAQ) /* define area qualification */
+_VTE_NOP(DC1) /* device control 1 / XON */
+_VTE_NOP(DC2) /* devince control 2 */
+_VTE_NOP(DC3) /* device control 3 / XOFF */
+_VTE_NOP(DC4) /* device control 4 */
+_VTE_NOP(DECAC) /* assign color */
+_VTE_NOP(DECANM) /* ansi mode */
+_VTE_NOP(DECARR) /* auto repeat rate */
+_VTE_NOP(DECATC) /* alternate text color */
+_VTE_NOP(DECAUPSS) /* assign user preferred supplemental sets */
+_VTE_NOP(DECCARA) /* change attributes in rectangular area */
+_VTE_NOP(DECCKD) /* copy key default */
+_VTE_NOP(DECCRA) /* copy rectangular area */
+_VTE_NOP(DECCRTST) /* CRT saver time */
+_VTE_NOP(DECDC) /* delete column */
+_VTE_NOP(DECDHL_BH) /* double width double height line: bottom half */
+_VTE_NOP(DECDHL_TH) /* double width double height line: top half */
+_VTE_NOP(DECDLDA) /* down line load allocation */
+_VTE_NOP(DECDLD) /* dynamically redefinable character sets extension */
+_VTE_NOP(DECDMAC) /* define macro */
+_VTE_NOP(DECDWL) /* double width single height line */
+_VTE_NOP(DECEFR) /* enable filter rectangle */
+_VTE_NOP(DECELF) /* enable local functions */
+_VTE_NOP(DECELR) /* enable locator reporting */
+_VTE_NOP(DECERA) /* erase rectangular area */
+_VTE_NOP(DECES) /* enable session */
+_VTE_NOP(DECFI) /* forward index */
+_VTE_NOP(DECFRA) /* fill rectangular area */
+_VTE_NOP(DECIC) /* insert column */
+_VTE_NOP(DECINVM) /* invoke macro */
+_VTE_NOP(DECKBD) /* keyboard language selection */
+_VTE_NOP(DECLANS) /* load answerback message */
+_VTE_NOP(DECLBAN) /* load banner message */
+_VTE_NOP(DECLBD) /* locator button define */
+_VTE_NOP(DECLFKC) /* local function key control */
+_VTE_NOP(DECLL) /* load leds */
+_VTE_NOP(DECLTOD) /* load time of day */
+_VTE_NOP(DECPAK) /* program alphanumeric key */
+_VTE_NOP(DECPCTERM) /* pcterm */
+_VTE_NOP(DECPFK) /* program function key */
+_VTE_NOP(DECPKA) /* program key action */
+_VTE_NOP(DECPKFMR) /* program key free memory report */
+_VTE_NOP(DECPS) /* play sound */
+_VTE_NOP(DECRARA) /* reverse attributes in rectangular area */
+_VTE_NOP(DECREGIS) /* ReGIS graphics */
+_VTE_NOP(DECRPAK) /* report all modifier/alphanumeric key state */
+_VTE_NOP(DECRPDE) /* report displayed extent */
+_VTE_NOP(DECRPFK) /* report function key definition */
+_VTE_NOP(DECRPKT) /* report key type */
+_VTE_NOP(DECRQDE) /* request display extent */
+_VTE_NOP(DECRQKT) /* request key type */
+_VTE_NOP(DECRQLP) /* request locator position */
+_VTE_NOP(DECRQPKFM) /* request program key free memory */
+_VTE_NOP(DECRQPSR) /* request presentation state report */
+_VTE_NOP(DECRQUPSS) /* request user preferred supplemental set */
+_VTE_NOP(DECRSPS) /* restore presentation state */
+_VTE_NOP(DECRSTS) /* restore terminal state */
+_VTE_NOP(DECSACE) /* select attribute change extent */
+_VTE_NOP(DECSASD) /* select active status display */
+_VTE_NOP(DECSCA) /* select character protection attribute */
+_VTE_NOP(DECSCPP) /* select columns per page */
+_VTE_NOP(DECSCP) /* select communication port */
+_VTE_NOP(DECSCS) /* select communication speed */
+_VTE_NOP(DECSDDT) /* select disconnect delay time */
+_VTE_NOP(DECSDPT) /* select digital printed data type */
+_VTE_NOP(DECSERA) /* selective erase rectangular area */
+_VTE_NOP(DECSEST) /* energy saver time */
+_VTE_NOP(DECSFC) /* select flow control */
+_VTE_NOP(DECSIXEL) /* SIXEL graphics */
+_VTE_NOP(DECSKCV) /* set key click volume */
+_VTE_NOP(DECSLCK) /* set lock key style */
+_VTE_NOP(DECSLE) /* select locator events */
+_VTE_NOP(DECSMBV) /* set margin bell volume */
+_VTE_NOP(DECSMKR) /* select modifier key reporting */
+_VTE_NOP(DECSNLS) /* set lines per screen */
+_VTE_NOP(DECSPMA) /* session page memory allocation */
+_VTE_NOP(DECSPPCS) /* select pro printer character set */
+_VTE_NOP(DECSPP) /* set port parameter */
+_VTE_NOP(DECSPRTT) /* select printer type */
+_VTE_NOP(DECSRFR) /* select refresh rate */
+_VTE_NOP(DECSSCLS) /* set scroll speed */
+_VTE_NOP(DECSSDT) /* select status display line type */
+_VTE_NOP(DECSSL) /* select setup language */
+_VTE_NOP(DECSTGLT) /* select color lookup table */
+_VTE_NOP(DECSTRL) /* set transmit rate limit */
+_VTE_NOP(DECSTUI) /* set terminal unit id */
+_VTE_NOP(DECSWBV) /* set warning bell volume */
+_VTE_NOP(DECSWL) /* single width single height line */
+_VTE_NOP(DECSZS) /* select zero symbol */
+_VTE_NOP(DECTID) /* select terminal id */
+_VTE_NOP(DECTME) /* terminal mode emulation */
+_VTE_NOP(DECTST) /* invoke confidence test */
+_VTE_NOP(DECUDK) /* user defined keys */
+_VTE_NOP(DECUS) /* update session */
+_VTE_NOP(DLE) /* data link escape */
+_VTE_NOP(DMI) /* disable manual input */
+_VTE_NOP(DTA) /* dimension text area */
+_VTE_NOP(EA) /* erase in area */
+_VTE_NOP(EF) /* erase in field */
+_VTE_NOP(EM) /* end of medium */
+_VTE_NOP(EMI) /* enable manual input */
+_VTE_NOP(ENQ) /* enquire */
+_VTE_NOP(EOT) /* end of transmission */
+_VTE_NOP(EPA) /* end of guarded area */
+_VTE_NOP(ESA) /* end of selected area */
+_VTE_NOP(ETB) /* end of transmission block */
+_VTE_NOP(ETX) /* end of text */
+_VTE_NOP(FNK) /* function key */
+_VTE_NOP(FNT) /* font selection */
+_VTE_NOP(GCC) /* graphic character combination */
+_VTE_NOP(GSM) /* graphic size modification */
+_VTE_NOP(GSS) /* graphic size selection */
+_VTE_NOP(HPB) /* horizontal position backward */
+_VTE_NOP(IDCS) /* identify DCS */
+_VTE_NOP(IGS) /* identify graphic subrepertoire */
+_VTE_NOP(INT) /* interrupt */
+_VTE_NOP(IRR) /* identify-revised-registration */
+_VTE_NOP(IS1) /* information separator 1 / unit separator (US) */
+_VTE_NOP(IS2) /* information separator 2 / record separator (RS) */
+_VTE_NOP(IS3) /* information separator 3 / group separator (GS)*/
+_VTE_NOP(IS4) /* information separator 4 / file separator (FS) */
+_VTE_NOP(JFY) /* justify */
+_VTE_NOP(MC_DEC) /* media copy dec */
+_VTE_NOP(MC_ECMA) /* media copy ecma */
+_VTE_NOP(MW) /* message waiting */
+_VTE_NOP(NAK) /* negative acknowledge */
+_VTE_NOP(NBH) /* no break permitted here */
+_VTE_NOP(NP) /* next page */
+_VTE_NOP(NUL) /* nul */
+_VTE_NOP(PEC) /* presentation expand or contract */
+_VTE_NOP(PFS) /* page format selection */
+_VTE_NOP(PLD) /* partial line forward */
+_VTE_NOP(PLU) /* partial line backward */
+_VTE_NOP(PPA) /* page position absolute */
+_VTE_NOP(PPB) /* page position backward */
+_VTE_NOP(PP) /* preceding page */
+_VTE_NOP(PPR) /* page position relative */
+_VTE_NOP(PTX) /* parallel texts */
+_VTE_NOP(PU1) /* private use 1 */
+_VTE_NOP(PU2) /* private use 2 */
+_VTE_NOP(QUAD) /* quad */
+_VTE_NOP(RLOGIN_MML) /* RLogin music macro language */
+_VTE_NOP(SACS) /* set additional character separation */
+_VTE_NOP(SAPV) /* select alternative presentation variants */
+_VTE_NOP(SCORC) /* SCO restore cursor */
+_VTE_NOP(SCO) /* select character orientation */
+_VTE_NOP(SCP) /* select character path */
+_VTE_NOP(SCS) /* set character spacing */
+_VTE_NOP(SDS) /* start directed string */
+_VTE_NOP(SEE) /* select editing extent */
+_VTE_NOP(SEF) /* sheet eject and feed */
+_VTE_NOP(SHS) /* select character spacing */
+_VTE_NOP(SIMD) /* select implicit movement direction */
+_VTE_NOP(SLH) /* set line home */
+_VTE_NOP(SLL) /* set line limit */
+_VTE_NOP(SL) /* scroll left */
+_VTE_NOP(SLS) /* set line spacing */
+_VTE_NOP(SOH) /* start of heading */
+_VTE_NOP(SPA) /* start of protected area */
+_VTE_NOP(SPD) /* select presentation directions */
+_VTE_NOP(SPH) /* set page home */
+_VTE_NOP(SPI) /* spacing increment */
+_VTE_NOP(SPL) /* set page limit */
+_VTE_NOP(SPQR) /* select print quality and rapidity */
+_VTE_NOP(SRCS) /* set reduced character separation */
+_VTE_NOP(SR) /* scroll right */
+_VTE_NOP(SRS) /* start reversed string */
+_VTE_NOP(SSA) /* start of selected area */
+_VTE_NOP(SSU) /* set size unit */
+_VTE_NOP(SSW) /* set space width */
+_VTE_NOP(ST) /* string terminator */
+_VTE_NOP(STAB) /* selective tabulation */
+_VTE_NOP(STS) /* set transmit state */
+_VTE_NOP(STX) /* start of text */
+_VTE_NOP(SVS) /* select line spacing */
+_VTE_NOP(SYN) /* synchronize */
+_VTE_NOP(TAC) /* tabulation aligned centre */
+_VTE_NOP(TALE) /* tabulation aligned leading edge */
+_VTE_NOP(TATE) /* tabulation aligned trailing edge */
+_VTE_NOP(TSS) /* thine space specification */
+_VTE_NOP(VTS) /* line tabulation set */
+_VTE_NOP(VPB) /* line position backward */
+_VTE_NOP(WYCAA) /* redefine character display attribute association */
+_VTE_NOP(WYDHL_BH) /* single width double height line: bottom half */
+_VTE_NOP(WYDHL_TH) /* single width double height line: top half */
+_VTE_NOP(WYLSFNT) /* load soft font */
+_VTE_NOP(WYSCRATE) /* set smooth scroll rate */
+_VTE_NOP(XTERM_IHMT) /* xterm initiate highlight mouse tracking */
+_VTE_NOP(XTERM_MLHP) /* xterm memory lock hp bugfix */
+_VTE_NOP(XTERM_MUHP) /* xterm memory unlock hp bugfix */
+_VTE_NOP(XTERM_RQTCAP) /* xterm request termcap/terminfo */
+_VTE_NOP(XTERM_RRV) /* xterm reset resource value */
+_VTE_NOP(XTERM_SGFX) /* xterm sixel graphics */
+_VTE_NOP(XTERM_SRV) /* xterm set resource value */
+_VTE_NOP(XTERM_STCAP) /* xterm set termcap/terminfo */
+_VTE_NOP(XTERM_STM) /* xterm set title mode */
diff --git a/src/parser-csi.hh b/src/parser-csi.hh
index 01326ad..f5ea26a 100644
--- a/src/parser-csi.hh
+++ b/src/parser-csi.hh
@@ -16,41 +16,82 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#if !defined(_VTE_SEQ) || !defined(_VTE_NOQ)
+#error "Must define _VTE_SEQ and _VTE_NOQ before including this file"
+#endif
+
 _VTE_SEQ(ICH,                    CSI,    '@',  NONE,  0, NONE     ) /* insert-character */
+_VTE_NOQ(SL,                     CSI,    '@',  NONE,  1, SPACE    ) /* scroll left */
 _VTE_SEQ(CUU,                    CSI,    'A',  NONE,  0, NONE     ) /* cursor-up */
+_VTE_NOQ(SR,                     CSI,    'A',  NONE,  1, SPACE    ) /* scroll right */
 _VTE_SEQ(CUD,                    CSI,    'B',  NONE,  0, NONE     ) /* cursor-down */
+_VTE_NOQ(GSM,                    CSI,    'B',  NONE,  1, SPACE    ) /* graphic size modification */
 _VTE_SEQ(CUF,                    CSI,    'C',  NONE,  0, NONE     ) /* cursor-forward */
+_VTE_NOQ(GSS,                    CSI,    'C',  NONE,  1, SPACE    ) /* graphic size selection */
 _VTE_SEQ(CUB,                    CSI,    'D',  NONE,  0, NONE     ) /* cursor-backward */
+_VTE_NOQ(FNT,                    CSI,    'D',  NONE,  1, SPACE    ) /* font selection */
 _VTE_SEQ(CNL,                    CSI,    'E',  NONE,  0, NONE     ) /* cursor-next-line */
 _VTE_SEQ(CPL,                    CSI,    'F',  NONE,  0, NONE     ) /* cursor-previous-line */
+_VTE_NOQ(JFY,                    CSI,    'F',  NONE,  1, SPACE    ) /* justify */
+_VTE_NOQ(TSS,                    CSI,    'E',  NONE,  1, SPACE    ) /* thine space specification */
 _VTE_SEQ(CHA,                    CSI,    'G',  NONE,  0, NONE     ) /* cursor-horizontal-absolute */
+_VTE_NOQ(SPI,                    CSI,    'G',  NONE,  1, SPACE    ) /* spacing increment */
 _VTE_SEQ(CUP,                    CSI,    'H',  NONE,  0, NONE     ) /* cursor-position */
+_VTE_NOQ(QUAD,                   CSI,    'H',  NONE,  1, SPACE    ) /* quad */
 _VTE_SEQ(CHT,                    CSI,    'I',  NONE,  0, NONE     ) /* cursor-horizontal-forward-tabulation 
*/
+_VTE_NOQ(SSU,                    CSI,    'I',  NONE,  1, SPACE    ) /* set size unit */
 _VTE_SEQ(ED,                     CSI,    'J',  NONE,  0, NONE     ) /* erase-in-display */
+_VTE_NOQ(PFS,                    CSI,    'J',  NONE,  1, SPACE    ) /* page format selection */
 _VTE_SEQ(DECSED,                 CSI,    'J',  WHAT,  0, NONE     ) /* selective-erase-in-display */
 _VTE_SEQ(EL,                     CSI,    'K',  NONE,  0, NONE     ) /* erase-in-line */
+_VTE_NOQ(SHS,                    CSI,    'K',  NONE,  1, SPACE    ) /* select character spacing */
 _VTE_SEQ(DECSEL,                 CSI,    'K',  WHAT,  0, NONE     ) /* selective-erase-in-line */
 _VTE_SEQ(IL,                     CSI,    'L',  NONE,  0, NONE     ) /* insert-line */
+_VTE_NOQ(SVS,                    CSI,    'L',  NONE,  1, SPACE    ) /* select line spacing */
 _VTE_SEQ(DL,                     CSI,    'M',  NONE,  0, NONE     ) /* delete-line */
+_VTE_NOQ(IGS,                    CSI,    'M',  NONE,  1, SPACE    ) /* identify graphic subrepertoire */
+_VTE_NOQ(EF,                     CSI,    'N',  NONE,  0, NONE     ) /* erase in field */
+_VTE_NOQ(EA,                     CSI,    'O',  NONE,  0, NONE     ) /* erase in area */
+_VTE_NOQ(IDCS,                   CSI,    'O',  NONE,  1, SPACE    ) /* identify DCS */
 _VTE_SEQ(DCH,                    CSI,    'P',  NONE,  0, NONE     ) /* delete-character */
-_VTE_SEQ(PPA,                    CSI,    'P',  NONE,  1, SPACE    ) /* page-position-absolute */
-_VTE_SEQ(PPR,                    CSI,    'Q',  NONE,  1, SPACE    ) /* page-position-relative */
-_VTE_SEQ(PPB,                    CSI,    'R',  NONE,  1, SPACE    ) /* page-position-backward */
+_VTE_NOQ(PPA,                    CSI,    'P',  NONE,  1, SPACE    ) /* page-position-absolute */
+_VTE_NOQ(SEE,                    CSI,    'Q',  NONE,  0, NONE     ) /* select editing extent */
+_VTE_NOQ(PPR,                    CSI,    'Q',  NONE,  1, SPACE    ) /* page-position-relative */
+_VTE_NOQ(PPB,                    CSI,    'R',  NONE,  1, SPACE    ) /* page-position-backward */
 _VTE_SEQ(SU,                     CSI,    'S',  NONE,  0, NONE     ) /* scroll-up */
-_VTE_SEQ(XTERM_SGFX,             CSI,    'S',  WHAT,  0, NONE     ) /* xterm-sixel-graphics */
+_VTE_NOQ(SPD,                    CSI,    'S',  NONE,  1, SPACE    ) /* select presentation directions */
+_VTE_NOQ(XTERM_SGFX,             CSI,    'S',  WHAT,  0, NONE     ) /* xterm-sixel-graphics */
 _VTE_SEQ(SD_OR_XTERM_IHMT,       CSI,    'T',  NONE,  0, NONE     ) /* scroll-down or 
xterm-initiate-highlight-mouse-tracking */
+_VTE_NOQ(DTA,                    CSI,    'T',  NONE,  1, SPACE    ) /* dimension text area */
 _VTE_SEQ(XTERM_RTM,              CSI,    'T',  GT,    0, NONE     ) /* xterm-reset-title-mode */
-_VTE_SEQ(NP,                     CSI,    'U',  NONE,  0, NONE     ) /* next-page */
-_VTE_SEQ(PP,                     CSI,    'V',  NONE,  0, NONE     ) /* preceding-page */
+_VTE_NOQ(NP,                     CSI,    'U',  NONE,  0, NONE     ) /* next-page */
+_VTE_NOQ(SLH,                    CSI,    'U',  NONE,  1, SPACE    ) /* set line home */
+_VTE_NOQ(PP,                     CSI,    'V',  NONE,  0, NONE     ) /* preceding-page */
+_VTE_NOQ(SLL,                    CSI,    'V',  NONE,  1, SPACE    ) /* set line limit */
+_VTE_SEQ(CTC,                    CSI,    'W',  NONE,  0, NONE     ) /* cursor tabulation control */
+_VTE_NOQ(FNK,                    CSI,    'W',  NONE,  1, SPACE    ) /* function key */
 _VTE_SEQ(DECST8C,                CSI,    'W',  WHAT,  0, NONE     ) /* set-tab-at-every-8-columns */
 _VTE_SEQ(ECH,                    CSI,    'X',  NONE,  0, NONE     ) /* erase-character */
+_VTE_NOQ(SPQR,                   CSI,    'X',  NONE,  1, SPACE    ) /* select print quality and rapidity */
+_VTE_NOQ(CVT,                    CSI,    'Y',  NONE,  0, NONE     ) /* cursor line tabulation */
+_VTE_NOQ(SEF,                    CSI,    'Y',  NONE,  1, SPACE    ) /* sheet eject and feed */
 _VTE_SEQ(CBT,                    CSI,    'Z',  NONE,  0, NONE     ) /* cursor-backward-tabulation */
+_VTE_NOQ(PEC,                    CSI,    'Z',  NONE, 1, SPACE     ) /* presentation expand or contract */
+_VTE_NOQ(SRS,                    CSI,    '[',  NONE,  0, NONE     ) /* start reversed string */
+_VTE_NOQ(SSW,                    CSI,    '[',  NONE,  1, SPACE    ) /* set space width */
+_VTE_NOQ(PTX,                    CSI,    '\\', NONE,  0, NONE     ) /* parallel texts */
+_VTE_NOQ(SACS,                   CSI,    '\\', NONE,  1, SPACE    ) /* set additional character separation */
+_VTE_NOQ(SDS,                    CSI,    ']',  NONE,  0, NONE     ) /* start directed string */
+_VTE_NOQ(SAPV,                   CSI,    ']',  NONE,  1, SPACE    ) /* select alternative presentation 
variants */
+_VTE_NOQ(SIMD,                   CSI,    '^',  NONE,  0, NONE     ) /* select implicit movement direction */
+_VTE_NOQ(STAB,                   CSI,    '^',  NONE,  1, SPACE    ) /* selective tabulation */
+_VTE_NOQ(GCC,                    CSI,    '_',  NONE,  1, SPACE    ) /* graphic character combination */
 _VTE_SEQ(HPA,                    CSI,    '`',  NONE,  0, NONE     ) /* horizontal-position-absolute */
-_VTE_SEQ(TATE,                   CSI,    '`',  NONE,  1, SPACE    ) /* tabulation-aligned-trailing-edge */
+_VTE_NOQ(TATE,                   CSI,    '`',  NONE,  1, SPACE    ) /* tabulation-aligned-trailing-edge */
 _VTE_SEQ(HPR,                    CSI,    'a',  NONE,  0, NONE     ) /* horizontal-position-relative */
-_VTE_SEQ(TALE,                   CSI,    'a',  NONE,  1, SPACE    ) /* tabulation-aligned-leading-edge */
+_VTE_NOQ(TALE,                   CSI,    'a',  NONE,  1, SPACE    ) /* tabulation-aligned-leading-edge */
 _VTE_SEQ(REP,                    CSI,    'b',  NONE,  0, NONE     ) /* repeat */
-_VTE_SEQ(TAC,                    CSI,    'b',  NONE,  1, SPACE    ) /* tabulation-aligned-centre */
+_VTE_NOQ(TAC,                    CSI,    'b',  NONE,  1, SPACE    ) /* tabulation-aligned-centre */
 _VTE_SEQ(DA1,                    CSI,    'c',  NONE,  0, NONE     ) /* primary-device-attributes */
 _VTE_SEQ(TCC,                    CSI,    'c',  NONE,  1, SPACE    ) /* tabulation-centred-on-character */
 _VTE_SEQ(DA3,                    CSI,    'c',  EQUAL, 0, NONE     ) /* tertiary-device-attributes */
@@ -58,86 +99,111 @@ _VTE_SEQ(DA2,                    CSI,    'c',  GT,    0, NONE     ) /* secondary
 _VTE_SEQ(VPA,                    CSI,    'd',  NONE,  0, NONE     ) /* vertical-line-position-absolute */
 _VTE_SEQ(TSR,                    CSI,    'd',  NONE,  1, SPACE    ) /* tabulation-stop-remove */
 _VTE_SEQ(VPR,                    CSI,    'e',  NONE,  0, NONE     ) /* vertical-line-position-relative */
+_VTE_NOQ(SCO,                    CSI,    'e',  NONE,  1, SPACE    ) /* select character orientation */
 _VTE_SEQ(HVP,                    CSI,    'f',  NONE,  0, NONE     ) /* horizontal-and-vertical-position */
+_VTE_NOQ(SRCS,                   CSI,    'f',  NONE,  1, SPACE    ) /* set reduced character separation */
 _VTE_SEQ(TBC,                    CSI,    'g',  NONE,  0, NONE     ) /* tab-clear */
-_VTE_SEQ(DECLFKC,                CSI,    'g',  NONE,  1, MULT     ) /* local-function-key-control */
+_VTE_NOQ(SCS,                    CSI,    'g',  NONE,  1, SPACE    ) /* set character spacing */
+_VTE_NOQ(DECLFKC,                CSI,    'g',  NONE,  1, MULT     ) /* local-function-key-control */
 _VTE_SEQ(SM_ECMA,                CSI,    'h',  NONE,  0, NONE     ) /* set-mode-ecma */
+_VTE_NOQ(SLS,                    CSI,    'h' , NONE,  1, SPACE    ) /* set line spacing */
 _VTE_SEQ(SM_DEC,                 CSI,    'h',  WHAT,  0, NONE     ) /* set-mode-dec */
-_VTE_SEQ(MC_ANSI,                CSI,    'i',  NONE,  0, NONE     ) /* media-copy-ansi */
-_VTE_SEQ(MC_DEC,                 CSI,    'i',  WHAT,  0, NONE     ) /* media-copy-dec */
+_VTE_NOQ(MC_ECMA,                CSI,    'i',  NONE,  0, NONE     ) /* media-copy-ecma */
+_VTE_NOQ(SPH,                    CSI,    'i',  NONE,  1, SPACE    ) /* set page home */
+_VTE_NOQ(MC_DEC,                 CSI,    'i',  WHAT,  0, NONE     ) /* media-copy-dec */
+_VTE_NOQ(HPB,                    CSI,    'j',  NONE,  0, NONE     ) /* horizontal position backward */
+_VTE_NOQ(SPL,                    CSI,    'j',  NONE,  1, SPACE    ) /* set page limit */
+_VTE_NOQ(VPB,                    CSI,    'k',  NONE,  0, NONE     ) /* line position backward */
+_VTE_NOQ(SCP,                    CSI,    'k',  NONE,  1, SPACE    ) /* select character path */
 _VTE_SEQ(RM_ECMA,                CSI,    'l',  NONE,  0, NONE     ) /* reset-mode-ecma */
 _VTE_SEQ(RM_DEC,                 CSI,    'l',  WHAT,  0, NONE     ) /* reset-mode-dec */
 _VTE_SEQ(SGR,                    CSI,    'm',  NONE,  0, NONE     ) /* select-graphics-rendition */
-_VTE_SEQ(XTERM_SRV,              CSI,    'm',  GT,    0, NONE     ) /* xterm-set-resource-value */
+_VTE_NOQ(XTERM_SRV,              CSI,    'm',  GT,    0, NONE     ) /* xterm-set-resource-value */
 _VTE_SEQ(DSR_ECMA,               CSI,    'n',  NONE,  0, NONE     ) /* device-status-report-ecma */
-_VTE_SEQ(XTERM_RRV,              CSI,    'n',  GT,    0, NONE     ) /* xterm-reset-resource-value */
+_VTE_NOQ(XTERM_RRV,              CSI,    'n',  GT,    0, NONE     ) /* xterm-reset-resource-value */
 _VTE_SEQ(DSR_DEC,                CSI,    'n',  WHAT,  0, NONE     ) /* device-status-report-dec */
-_VTE_SEQ(DECSSL,                 CSI,    'p',  NONE,  0, NONE     ) /* select-setup-language */
-_VTE_SEQ(DECSSCLS,               CSI,    'p',  NONE,  1, SPACE    ) /* set-scroll-speed */
+_VTE_NOQ(DAQ,                    CSI,    'o',  NONE,  0, NONE     ) /* define area qualification */
+_VTE_NOQ(DECSSL,                 CSI,    'p',  NONE,  0, NONE     ) /* select-setup-language */
+_VTE_NOQ(DECSSCLS,               CSI,    'p',  NONE,  1, SPACE    ) /* set-scroll-speed */
 _VTE_SEQ(DECSTR,                 CSI,    'p',  NONE,  1, BANG     ) /* soft-terminal-reset */
 _VTE_SEQ(DECSCL,                 CSI,    'p',  NONE,  1, DQUOTE   ) /* select-conformance-level */
 _VTE_SEQ(DECRQM_ECMA,            CSI,    'p',  NONE,  1, CASH     ) /* request-mode-ecma */
-_VTE_SEQ(DECSDPT,                CSI,    'p',  NONE,  1, PCLOSE   ) /* select-digital-printed-data-type */
-_VTE_SEQ(DECSPPCS,               CSI,    'p',  NONE,  1, MULT     ) /* select-pro-printer-character-set */
+_VTE_NOQ(DECSDPT,                CSI,    'p',  NONE,  1, PCLOSE   ) /* select-digital-printed-data-type */
+_VTE_NOQ(DECSPPCS,               CSI,    'p',  NONE,  1, MULT     ) /* select-pro-printer-character-set */
 _VTE_SEQ(DECSR,                  CSI,    'p',  NONE,  1, PLUS     ) /* secure-reset */
-_VTE_SEQ(DECLTOD,                CSI,    'p',  NONE,  1, COMMA    ) /* load-time-of-day */
+_VTE_NOQ(DECLTOD,                CSI,    'p',  NONE,  1, COMMA    ) /* load-time-of-day */
+_VTE_NOQ(DECARR,                 CSI,    'p',  NONE,  1, MINUS    ) /* auto repeat rate */
 _VTE_SEQ(XTERM_SPM,              CSI,    'p',  GT,    0, NONE     ) /* xterm-set-private-mode */
 _VTE_SEQ(DECRQM_DEC,             CSI,    'p',  WHAT,  1, CASH     ) /* request-mode-dec */
-_VTE_SEQ(DECLL,                  CSI,    'q',  NONE,  0, NONE     ) /* load-leds */
+_VTE_NOQ(DECLL,                  CSI,    'q',  NONE,  0, NONE     ) /* load-leds */
 _VTE_SEQ(DECSCUSR,               CSI,    'q',  NONE,  1, SPACE    ) /* set-cursor-style */
-_VTE_SEQ(DECSCA,                 CSI,    'q',  NONE,  1, DQUOTE   ) /* select-character-protection-attribute 
*/
-_VTE_SEQ(DECSDDT,                CSI,    'q',  NONE,  1, CASH     ) /* select-disconnect-delay-time */
+_VTE_NOQ(DECSCA,                 CSI,    'q',  NONE,  1, DQUOTE   ) /* select-character-protection-attribute 
*/
+_VTE_NOQ(DECSDDT,                CSI,    'q',  NONE,  1, CASH     ) /* select-disconnect-delay-time */
 _VTE_SEQ(DECSR,                  CSI,    'q',  NONE,  1, MULT     ) /* secure-reset */
-_VTE_SEQ(DECELF,                 CSI,    'q',  NONE,  1, PLUS     ) /* enable-local-functions */
-_VTE_SEQ(DECTID,                 CSI,    'q',  NONE,  1, COMMA    ) /* select-terminal-id */
+_VTE_NOQ(DECELF,                 CSI,    'q',  NONE,  1, PLUS     ) /* enable-local-functions */
+_VTE_NOQ(DECTID,                 CSI,    'q',  NONE,  1, COMMA    ) /* select-terminal-id */
+_VTE_NOQ(DECCRTST,               CSI,    'q',  NONE,  1, MINUS    ) /* CRT saver time */
 _VTE_SEQ(DECSTBM,                CSI,    'r',  NONE,  0, NONE     ) /* set-top-and-bottom-margins */
-_VTE_SEQ(DECSKCV,                CSI,    'r',  NONE,  1, SPACE    ) /* set-key-click-volume */
-_VTE_SEQ(DECCARA,                CSI,    'r',  NONE,  1, CASH     ) /* change-attributes-in-rectangular-area 
*/
-_VTE_SEQ(DECSCS,                 CSI,    'r',  NONE,  1, MULT     ) /* select-communication-speed */
-_VTE_SEQ(DECSMKR,                CSI,    'r',  NONE,  1, PLUS     ) /* select-modifier-key-reporting */
+_VTE_NOQ(DECSKCV,                CSI,    'r',  NONE,  1, SPACE    ) /* set-key-click-volume */
+_VTE_NOQ(DECCARA,                CSI,    'r',  NONE,  1, CASH     ) /* change-attributes-in-rectangular-area 
*/
+_VTE_NOQ(DECSCS,                 CSI,    'r',  NONE,  1, MULT     ) /* select-communication-speed */
+_VTE_NOQ(DECSMKR,                CSI,    'r',  NONE,  1, PLUS     ) /* select-modifier-key-reporting */
+_VTE_NOQ(DECSEST,                CSI,    'r',  NONE,  1, MINUS    ) /* energy saver time */
 _VTE_SEQ(DECPCTERM_OR_XTERM_RPM, CSI,    'r',  WHAT,  0, NONE     ) /* pcterm or xterm-restore-private-mode 
*/
-_VTE_SEQ(DECSLRM_OR_SC,          CSI,    's',  NONE,  0, NONE     ) /* set-left-and-right-margins or 
save-cursor */
-_VTE_SEQ(DECSPRTT,               CSI,    's',  NONE,  1, CASH     ) /* select-printer-type */
-_VTE_SEQ(DECSFC,                 CSI,    's',  NONE,  1, MULT     ) /* select-flow-control */
+_VTE_SEQ(DECSLRM,                CSI,    's',  NONE,  0, NONE     ) /* set-left-and-right-margins */
+_VTE_NOQ(DECSPRTT,               CSI,    's',  NONE,  1, CASH     ) /* select-printer-type */
+_VTE_NOQ(DECSFC,                 CSI,    's',  NONE,  1, MULT     ) /* select-flow-control */
 _VTE_SEQ(XTERM_SPM,              CSI,    's',  WHAT,  0, NONE     ) /* xterm-set-private-mode */
 _VTE_SEQ(XTERM_WM,               CSI,    't',  NONE,  0, NONE     ) /* xterm-window-management */
-_VTE_SEQ(DECSWBV,                CSI,    't',  NONE,  1, SPACE    ) /* set-warning-bell-volume */
-_VTE_SEQ(DECSRFR,                CSI,    't',  NONE,  1, DQUOTE   ) /* select-refresh-rate */
-_VTE_SEQ(DECRARA,                CSI,    't',  NONE,  1, CASH     ) /* 
reverse-attributes-in-rectangular-area */
-_VTE_SEQ(XTERM_STM,              CSI,    't',  GT,    0, NONE     ) /* xterm-set-title-mode */
-_VTE_SEQ(RC,                     CSI,    'u',  NONE,  0, NONE     ) /* restore-cursor */
-_VTE_SEQ(DECSMBV,                CSI,    'u',  NONE,  1, SPACE    ) /* set-margin-bell-volume */
-_VTE_SEQ(DECSTRL,                CSI,    'u',  NONE,  1, DQUOTE   ) /* set-transmit-rate-limit */
+_VTE_NOQ(DECSWBV,                CSI,    't',  NONE,  1, SPACE    ) /* set-warning-bell-volume */
+_VTE_NOQ(DECSRFR,                CSI,    't',  NONE,  1, DQUOTE   ) /* select-refresh-rate */
+_VTE_NOQ(DECRARA,                CSI,    't',  NONE,  1, CASH     ) /* 
reverse-attributes-in-rectangular-area */
+_VTE_NOQ(XTERM_STM,              CSI,    't',  GT,    0, NONE     ) /* xterm-set-title-mode */
+_VTE_NOQ(SCORC,                  CSI,    'u',  NONE,  0, NONE     ) /* SCO restore-cursor */
+_VTE_NOQ(DECSMBV,                CSI,    'u',  NONE,  1, SPACE    ) /* set-margin-bell-volume */
+_VTE_NOQ(DECSTRL,                CSI,    'u',  NONE,  1, DQUOTE   ) /* set-transmit-rate-limit */
 _VTE_SEQ(DECRQTSR,               CSI,    'u',  NONE,  1, CASH     ) /* request-terminal-state-report */
-_VTE_SEQ(DECSCP,                 CSI,    'u',  NONE,  1, MULT     ) /* select-communication-port */
-_VTE_SEQ(DECRQKT,                CSI,    'u',  NONE,  1, COMMA    ) /* request-key-type */
-_VTE_SEQ(DECRQUPSS,              CSI,    'u',  WHAT,  0, NONE     ) /* 
request-user-preferred-supplemental-set */
-_VTE_SEQ(DECSLCK,                CSI,    'v',  NONE,  1, SPACE    ) /* set-lock-key-style */
-_VTE_SEQ(DECRQDE,                CSI,    'v',  NONE,  1, DQUOTE   ) /* request-display-extent */
-_VTE_SEQ(DECCRA,                 CSI,    'v',  NONE,  1, CASH     ) /* copy-rectangular-area */
-_VTE_SEQ(DECRPKT,                CSI,    'v',  NONE,  1, COMMA    ) /* report-key-type */
-_VTE_SEQ(DECRQPSR,               CSI,    'w',  NONE,  1, CASH     ) /* request-presentation-state-report */
-_VTE_SEQ(DECEFR,                 CSI,    'w',  NONE,  1, SQUOTE   ) /* enable-filter-rectangle */
-_VTE_SEQ(DECSPP,                 CSI,    'w',  NONE,  1, PLUS     ) /* set-port-parameter */
+_VTE_NOQ(DECSCP,                 CSI,    'u',  NONE,  1, MULT     ) /* select-communication-port */
+_VTE_NOQ(DECRQKT,                CSI,    'u',  NONE,  1, COMMA    ) /* request-key-type */
+_VTE_NOQ(DECRQUPSS,              CSI,    'u',  WHAT,  0, NONE     ) /* 
request-user-preferred-supplemental-set */
+_VTE_NOQ(DECSLCK,                CSI,    'v',  NONE,  1, SPACE    ) /* set-lock-key-style */
+_VTE_NOQ(DECRQDE,                CSI,    'v',  NONE,  1, DQUOTE   ) /* request-display-extent */
+_VTE_NOQ(DECCRA,                 CSI,    'v',  NONE,  1, CASH     ) /* copy-rectangular-area */
+_VTE_NOQ(DECRPKT,                CSI,    'v',  NONE,  1, COMMA    ) /* report-key-type */
+_VTE_NOQ(WYCAA,                  CSI,    'w',  NONE,  0, NONE     ) /* redefine character display attribute 
association */
+_VTE_NOQ(DECRPDE,                CSI,    'w',  NONE,  1, DQUOTE   ) /* report displayed extent */
+_VTE_NOQ(DECRQPSR,               CSI,    'w',  NONE,  1, CASH     ) /* request-presentation-state-report */
+_VTE_NOQ(DECEFR,                 CSI,    'w',  NONE,  1, SQUOTE   ) /* enable-filter-rectangle */
+_VTE_NOQ(DECSPP,                 CSI,    'w',  NONE,  1, PLUS     ) /* set-port-parameter */
 _VTE_SEQ(DECREQTPARM,            CSI,    'x',  NONE,  0, NONE     ) /* request-terminal-parameters */
-_VTE_SEQ(DECFRA,                 CSI,    'x',  NONE,  1, CASH     ) /* fill-rectangular-area */
-_VTE_SEQ(DECSACE,                CSI,    'x',  NONE,  1, MULT     ) /* select-attribute-change-extent */
-_VTE_SEQ(DECRQPKFM,              CSI,    'x',  NONE,  1, PLUS     ) /* request-program-key-free-memory */
-_VTE_SEQ(DECTST,                 CSI,    'y',  NONE,  0, NONE     ) /* invoke-confidence-test */
+_VTE_NOQ(DECFRA,                 CSI,    'x',  NONE,  1, CASH     ) /* fill-rectangular-area */
+_VTE_NOQ(DECES,                  CSI,    'x',  NONE,  1, AND      ) /* enable session */
+_VTE_NOQ(DECSACE,                CSI,    'x',  NONE,  1, MULT     ) /* select-attribute-change-extent */
+_VTE_NOQ(DECRQPKFM,              CSI,    'x',  NONE,  1, PLUS     ) /* request-program-key-free-memory */
+_VTE_NOQ(DECSPMA,                CSI,    'x',  NONE,  1, COMMA    ) /* session page memory allocation */
+_VTE_NOQ(DECTST,                 CSI,    'y',  NONE,  0, NONE     ) /* invoke-confidence-test */
 _VTE_SEQ(DECRQCRA,               CSI,    'y',  NONE,  1, MULT     ) /* request-checksum-of-rectangular-area 
*/
-_VTE_SEQ(DECPKFMR,               CSI,    'y',  NONE,  1, PLUS     ) /* program-key-free-memory-report */
-_VTE_SEQ(DECERA,                 CSI,    'z',  NONE,  1, CASH     ) /* erase-rectangular-area */
-_VTE_SEQ(DECELR,                 CSI,    'z',  NONE,  1, SQUOTE   ) /* enable-locator-reporting */
-_VTE_SEQ(DECINVM,                CSI,    'z',  NONE,  1, MULT     ) /* invoke-macro */
-_VTE_SEQ(DECPKA,                 CSI,    'z',  NONE,  1, PLUS     ) /* program-key-action */
-_VTE_SEQ(DECSERA,                CSI,    '{',  NONE,  1, CASH     ) /* selective-erase-rectangular-area */
-_VTE_SEQ(DECSLE,                 CSI,    '{',  NONE,  1, SQUOTE   ) /* select-locator-events */
-_VTE_SEQ(DECSCPP,                CSI,    '|',  NONE,  1, CASH     ) /* select-columns-per-page */
-_VTE_SEQ(DECRQLP,                CSI,    '|',  NONE,  1, SQUOTE   ) /* request-locator-position */
-_VTE_SEQ(DECSNLS,                CSI,    '|',  NONE,  1, MULT     ) /* set-lines-per-screen */
-_VTE_SEQ(DECKBD,                 CSI,    '}',  NONE,  1, SPACE    ) /* keyboard-language-selection */
-_VTE_SEQ(DECSASD,                CSI,    '}',  NONE,  1, CASH     ) /* select-active-status-display */
-_VTE_SEQ(DECIC,                  CSI,    '}',  NONE,  1, SQUOTE   ) /* insert-column */
-_VTE_SEQ(DECTME,                 CSI,    '~',  NONE,  1, SPACE    ) /* terminal-mode-emulation */
-_VTE_SEQ(DECSSDT,                CSI,    '~',  NONE,  1, CASH     ) /* select-status-display-line-type */
-_VTE_SEQ(DECDC,                  CSI,    '~',  NONE,  1, SQUOTE   ) /* delete-column */
+_VTE_NOQ(DECPKFMR,               CSI,    'y',  NONE,  1, PLUS     ) /* program-key-free-memory-report */
+_VTE_NOQ(DECUS,                  CSI,    'y',  NONE,  1, COMMA    ) /* update session */
+_VTE_NOQ(WYSCRATE,               CSI,    'z',  NONE,  0, NONE     ) /* set smooth scroll rate */
+_VTE_NOQ(DECERA,                 CSI,    'z',  NONE,  1, CASH     ) /* erase-rectangular-area */
+_VTE_NOQ(DECELR,                 CSI,    'z',  NONE,  1, SQUOTE   ) /* enable-locator-reporting */
+_VTE_NOQ(DECINVM,                CSI,    'z',  NONE,  1, MULT     ) /* invoke-macro */
+_VTE_NOQ(DECPKA,                 CSI,    'z',  NONE,  1, PLUS     ) /* program-key-action */
+_VTE_NOQ(DECDLDA,                CSI,    'z',  NONE,  1, COMMA    ) /* down line load allocation */
+_VTE_NOQ(DECSERA,                CSI,    '{',  NONE,  1, CASH     ) /* selective-erase-rectangular-area */
+_VTE_NOQ(DECSLE,                 CSI,    '{',  NONE,  1, SQUOTE   ) /* select-locator-events */
+_VTE_NOQ(DECSTGLT,               CSI,    '{',  NONE,  1, PCLOSE   ) /* select color lookup table */
+_VTE_NOQ(DECSZS,                 CSI,    '{',  NONE,  1, COMMA    ) /* select zero symbol */
+_VTE_NOQ(DECSCPP,                CSI,    '|',  NONE,  1, CASH     ) /* select-columns-per-page */
+_VTE_NOQ(DECRQLP,                CSI,    '|',  NONE,  1, SQUOTE   ) /* request-locator-position */
+_VTE_NOQ(DECSNLS,                CSI,    '|',  NONE,  1, MULT     ) /* set-lines-per-screen */
+_VTE_NOQ(DECAC,                  CSI,    '|',  NONE,  1, COMMA    ) /* assign color */
+_VTE_NOQ(DECKBD,                 CSI,    '}',  NONE,  1, SPACE    ) /* keyboard-language-selection */
+_VTE_NOQ(DECSASD,                CSI,    '}',  NONE,  1, CASH     ) /* select-active-status-display */
+_VTE_NOQ(DECIC,                  CSI,    '}',  NONE,  1, SQUOTE   ) /* insert-column */
+_VTE_NOQ(DECATC,                 CSI,    '}',  NONE,  1, COMMA    ) /* alternate text color */
+_VTE_NOQ(DECTME,                 CSI,    '~',  NONE,  1, SPACE    ) /* terminal-mode-emulation */
+_VTE_NOQ(DECSSDT,                CSI,    '~',  NONE,  1, CASH     ) /* select-status-display-line-type */
+_VTE_NOQ(DECDC,                  CSI,    '~',  NONE,  1, SQUOTE   ) /* delete-column */
+_VTE_NOQ(DECPS,                  CSI,    '~',  NONE,  1, COMMA    ) /* play sound */
diff --git a/src/parser-dcs.hh b/src/parser-dcs.hh
index a579c8d..fab8fb0 100644
--- a/src/parser-dcs.hh
+++ b/src/parser-dcs.hh
@@ -16,21 +16,31 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
-_VTE_SEQ(DECREGIS,               DCS,    'p',  NONE,  0, NONE     ) /* ReGIS-graphics */
-_VTE_SEQ(DECRSTS,                DCS,    'p',  NONE,  1, CASH     ) /* restore-terminal-state */
-_VTE_SEQ(DECSIXEL,               DCS,    'q',  NONE,  0, NONE     ) /* SIXEL-graphics */
+#if !defined(_VTE_SEQ) || !defined(_VTE_NOQ)
+#error "Must define _VTE_SEQ and _VTE_NOQ before including this file"
+#endif
+
+_VTE_NOQ(RLOGIN_MML,             DCS,    'm',  NONE,  1, HASH     ) /* RLogin music macro language */
+_VTE_NOQ(DECREGIS,               DCS,    'p',  NONE,  0, NONE     ) /* ReGIS-graphics */
+_VTE_NOQ(DECRSTS,                DCS,    'p',  NONE,  1, CASH     ) /* restore-terminal-state */
+_VTE_NOQ(XTERM_STCAP,            DCS,    'p',  NONE,  1, PLUS     ) /* xterm set termcap/terminfo */
+_VTE_NOQ(DECSIXEL,               DCS,    'q',  NONE,  0, NONE     ) /* SIXEL-graphics */
 _VTE_SEQ(DECRQSS,                DCS,    'q',  NONE,  1, CASH     ) /* request-selection-or-setting */
-_VTE_SEQ(DECLBAN,                DCS,    'r',  NONE,  0, NONE     ) /* load-banner-message */
+_VTE_NOQ(XTERM_RQTCAP,           DCS,    'q',  NONE,  1, PLUS     ) /* xterm request termcap/terminfo */
+_VTE_NOQ(DECLBAN,                DCS,    'r',  NONE,  0, NONE     ) /* load-banner-message */
 _VTE_SEQ(DECRQSS,                DCS,    'r',  NONE,  1, CASH     ) /* request-selection-or-setting */
 _VTE_SEQ(DECRQTSR,               DCS,    's',  NONE,  1, CASH     ) /* request-terminal-state-report */
-_VTE_SEQ(DECRSPS,                DCS,    't',  NONE,  1, CASH     ) /* restore-presentation-state */
-_VTE_SEQ(DECAUPSS,               DCS,    'u',  NONE,  1, BANG     ) /* 
assign-user-preferred-supplemental-sets */
-_VTE_SEQ(DECLANS,                DCS,    'v',  NONE,  0, NONE     ) /* load-answerback-message */
-_VTE_SEQ(DECLBD,                 DCS,    'w',  NONE,  0, NONE     ) /* locator-button-define */
-_VTE_SEQ(DECPFK,                 DCS,    'x',  NONE,  1, DQUOTE   ) /* program-function-key */
-_VTE_SEQ(DECPAK,                 DCS,    'y',  NONE,  1, DQUOTE   ) /* program-alphanumeric-key */
-_VTE_SEQ(DECDMAC,                DCS,    'z',  NONE,  1, BANG     ) /* define-macro */
-_VTE_SEQ(DECCKD,                 DCS,    'z',  NONE,  1, DQUOTE   ) /* copy-key-default */
-_VTE_SEQ(DECDLD,                 DCS,    '{',  NONE,  0, NONE     ) /* 
dynamically-redefinable-character-sets-extension */
-_VTE_SEQ(DECSTUI,                DCS,    '{',  NONE,  1, BANG     ) /* set-terminal-unit-id */
-_VTE_SEQ(DECUDK,                 DCS,    '|',  NONE,  0, NONE     ) /* user-defined-keys */
+_VTE_NOQ(DECRSPS,                DCS,    't',  NONE,  1, CASH     ) /* restore-presentation-state */
+_VTE_NOQ(DECAUPSS,               DCS,    'u',  NONE,  1, BANG     ) /* 
assign-user-preferred-supplemental-sets */
+_VTE_NOQ(DECLANS,                DCS,    'v',  NONE,  0, NONE     ) /* load-answerback-message */
+_VTE_NOQ(DECLBD,                 DCS,    'w',  NONE,  0, NONE     ) /* locator-button-define */
+_VTE_NOQ(DECPFK,                 DCS,    'x',  NONE,  1, DQUOTE   ) /* program-function-key */
+_VTE_NOQ(DECPAK,                 DCS,    'y',  NONE,  1, DQUOTE   ) /* program-alphanumeric-key */
+_VTE_NOQ(DECDMAC,                DCS,    'z',  NONE,  1, BANG     ) /* define-macro */
+_VTE_NOQ(DECCKD,                 DCS,    'z',  NONE,  1, DQUOTE   ) /* copy-key-default */
+_VTE_NOQ(DECDLD,                 DCS,    '{',  NONE,  0, NONE     ) /* 
dynamically-redefinable-character-sets-extension */
+_VTE_NOQ(DECSTUI,                DCS,    '{',  NONE,  1, BANG     ) /* set-terminal-unit-id */
+_VTE_NOQ(DECUDK,                 DCS,    '|',  NONE,  0, NONE     ) /* user-defined-keys */
+_VTE_NOQ(WYLSFNT,                DCS,    '}',  NONE,  0, NONE     ) /* load soft font */
+_VTE_NOQ(DECRPFK,                DCS,    '}',  NONE,  1, DQUOTE   ) /* report function key definition */
+_VTE_NOQ(DECRPAK,                DCS,    '~',  NONE,  1, DQUOTE   ) /* report all modifier/alphanumeric key 
state */
diff --git a/src/parser-esc.hh b/src/parser-esc.hh
index 661ce75..7eefe8e 100644
--- a/src/parser-esc.hh
+++ b/src/parser-esc.hh
@@ -16,32 +16,53 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
-_VTE_SEQ(DECDHL_TH,              ESCAPE, '3',  NONE,  1, HASH     ) /* double-width-double-height-line: top 
half */
-_VTE_SEQ(DECDHL_BH,              ESCAPE, '4',  NONE,  1, HASH     ) /* double-width-double-height-line: 
bottom half */
-_VTE_SEQ(DECSWL,                 ESCAPE, '5',  NONE,  1, HASH     ) /* single-width-single-height-line */
+#if !defined(_VTE_SEQ) || !defined(_VTE_NOQ)
+#error "Must define _VTE_SEQ and _VTE_NOQ before including this file"
+#endif
+
+_VTE_NOQ(DECDHL_TH,              ESCAPE, '3',  NONE,  1, HASH     ) /* double-width-double-height-line: top 
half */
+_VTE_NOQ(DECDHL_BH,              ESCAPE, '4',  NONE,  1, HASH     ) /* double-width-double-height-line: 
bottom half */
+_VTE_NOQ(DECSWL,                 ESCAPE, '5',  NONE,  1, HASH     ) /* single-width-single-height-line */
 _VTE_SEQ(DECBI,                  ESCAPE, '6',  NONE,  0, NONE     ) /* back-index */
-_VTE_SEQ(DECDWL,                 ESCAPE, '6',  NONE,  1, HASH     ) /* double-width-single-height-line */
+_VTE_NOQ(DECDWL,                 ESCAPE, '6',  NONE,  1, HASH     ) /* double-width-single-height-line */
 _VTE_SEQ(DECSC,                  ESCAPE, '7',  NONE,  0, NONE     ) /* save-cursor */
 _VTE_SEQ(DECRC,                  ESCAPE, '8',  NONE,  0, NONE     ) /* restore-cursor */
 _VTE_SEQ(DECALN,                 ESCAPE, '8',  NONE,  1, HASH     ) /* screen-alignment-pattern */
-_VTE_SEQ(DECFI,                  ESCAPE, '9',  NONE,  0, NONE     ) /* forward-index */
-_VTE_SEQ(DECANM,                 ESCAPE, '<',  NONE,  0, NONE     ) /* ansi-mode */
+_VTE_NOQ(DECFI,                  ESCAPE, '9',  NONE,  0, NONE     ) /* forward-index */
+_VTE_NOQ(WYDHL_TH,               ESCAPE, ':',  NONE,  0, HASH     ) /* single width double height line: top 
half */
+_VTE_NOQ(WYDHL_BH,               ESCAPE, ';',  NONE,  0, HASH     ) /* single width double height line: 
bottom half */
+_VTE_NOQ(DECANM,                 ESCAPE, '<',  NONE,  0, NONE     ) /* ansi-mode */
 _VTE_SEQ(DECKPAM,                ESCAPE, '=',  NONE,  0, NONE     ) /* keypad-application-mode */
 _VTE_SEQ(DECKPNM,                ESCAPE, '>',  NONE,  0, NONE     ) /* keypad-numeric-mode */
+_VTE_NOQ(BPH,                    ESCAPE, 'B',  NONE,  0, NONE     ) /* break permitted here */
+_VTE_NOQ(NBH,                    ESCAPE, 'C',  NONE,  0, NONE     ) /* no break permitted here */
 _VTE_SEQ(IND,                    ESCAPE, 'D',  NONE,  0, NONE     ) /* index */
 _VTE_SEQ(NEL,                    ESCAPE, 'E',  NONE,  0, NONE     ) /* next-line */
-_VTE_SEQ(XTERM_CLLHP,            ESCAPE, 'F',  NONE,  0, NONE     ) /* xterm-cursor-lower-left-hp-bugfix */
+_VTE_NOQ(SSA,                    ESCAPE, 'F',  NONE,  0, NONE     ) /* start of selected area */
+_VTE_NOQ(ESA,                    ESCAPE, 'G',  NONE,  0, NONE     ) /* end of selected area */
 _VTE_SEQ(HTS,                    ESCAPE, 'H',  NONE,  0, NONE     ) /* horizontal-tab-set */
+_VTE_NOQ(HTJ,                    ESCAPE, 'I',  NONE,  0, NONE     ) /* character tabulation with 
justification */
+_VTE_NOQ(VTS,                    ESCAPE, 'J',  NONE,  0, NONE     ) /* line tabulation set */
+_VTE_NOQ(PLD,                    ESCAPE, 'K',  NONE,  0, NONE     ) /* partial line forward */
+_VTE_NOQ(PLU,                    ESCAPE, 'L',  NONE,  0, NONE     ) /* partial line backward */
 _VTE_SEQ(RI,                     ESCAPE, 'M',  NONE,  0, NONE     ) /* reverse-index */
 _VTE_SEQ(SS2,                    ESCAPE, 'N',  NONE,  0, NONE     ) /* single-shift-2 */
 _VTE_SEQ(SS3,                    ESCAPE, 'O',  NONE,  0, NONE     ) /* single-shift-3 */
-_VTE_SEQ(SPA,                    ESCAPE, 'V',  NONE,  0, NONE     ) /* start-of-protected-area */
-_VTE_SEQ(EPA,                    ESCAPE, 'W',  NONE,  0, NONE     ) /* end-of-guarded-area */
-_VTE_SEQ(ST,                     ESCAPE, '\\', NONE,  0, NONE     ) /* string-terminator */
+_VTE_NOQ(PU1,                    ESCAPE, 'Q',  NONE,  0, NONE     ) /* private use 1 */
+_VTE_NOQ(PU2,                    ESCAPE, 'R',  NONE,  0, NONE     ) /* private use 2 */
+_VTE_NOQ(STS,                    ESCAPE, 'S',  NONE,  0, NONE     ) /* set transmit state */
+_VTE_NOQ(CCH,                    ESCAPE, 'T',  NONE,  0, NONE     ) /* cancel character */
+_VTE_NOQ(MW,                     ESCAPE, 'U',  NONE,  0, NONE     ) /* message waiting */
+_VTE_NOQ(SPA,                    ESCAPE, 'V',  NONE,  0, NONE     ) /* start-of-protected-area */
+_VTE_NOQ(EPA,                    ESCAPE, 'W',  NONE,  0, NONE     ) /* end-of-guarded-area */
+_VTE_NOQ(ST,                     ESCAPE, '\\', NONE,  0, NONE     ) /* string-terminator */
+_VTE_NOQ(DMI,                    ESCAPE, '`',  NONE,  0, NONE     ) /* disable manual input */
+_VTE_NOQ(INT,                    ESCAPE, 'a',  NONE,  0, NONE     ) /* interrupt */
+_VTE_NOQ(EMI,                    ESCAPE, 'b',  NONE,  0, NONE     ) /* enable manual input */
 _VTE_SEQ(RIS,                    ESCAPE, 'c',  NONE,  0, NONE     ) /* reset-to-initial-state */
-_VTE_SEQ(CMD,                    ESCAPE, 'd',  NONE,  0, NONE     ) /* coding-method-delimiter */
-_VTE_SEQ(XTERM_MLHP,             ESCAPE, 'l',  NONE,  0, NONE     ) /* xterm-memory-lock-hp-bugfix */
-_VTE_SEQ(XTERM_MUHP,             ESCAPE, 'm',  NONE,  0, NONE     ) /* xterm-memory-unlock-hp-bugfix */
+_VTE_NOQ(CMD,                    ESCAPE, 'd',  NONE,  0, NONE     ) /* coding-method-delimiter */
+_VTE_NOQ(XTERM_MLHP,             ESCAPE, 'l',  NONE,  0, NONE     ) /* xterm-memory-lock-hp-bugfix */
+_VTE_NOQ(XTERM_MUHP,             ESCAPE, 'm',  NONE,  0, NONE     ) /* xterm-memory-unlock-hp-bugfix */
 _VTE_SEQ(LS2,                    ESCAPE, 'n',  NONE,  0, NONE     ) /* locking-shift-2 */
 _VTE_SEQ(LS3,                    ESCAPE, 'o',  NONE,  0, NONE     ) /* locking-shift-3 */
 _VTE_SEQ(LS3R,                   ESCAPE, '|',  NONE,  0, NONE     ) /* locking-shift-3-right */
diff --git a/src/parser-reply.hh b/src/parser-reply.hh
index 476debc..365b5d1 100644
--- a/src/parser-reply.hh
+++ b/src/parser-reply.hh
@@ -15,6 +15,10 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#if !defined(_VTE_REPLY)
+#error "Must define _VTE_REPLY before including this file"
+#endif
+
 _VTE_REPLY(NONE, NONE, 0, NONE, NONE,) /* placeholder */
 
 
@@ -33,6 +37,7 @@ _VTE_REPLY(XTERM_MOUSE_EXT_SGR_REPORT_BUTTON_RELEASE, CSI, 'm', LT,   NONE,  ) /
 _VTE_REPLY(DSR,                                       CSI, 'n', NONE, NONE,  ) /* device status report */
 _VTE_REPLY(DECDSR,                                    CSI, 'n', WHAT, NONE,  ) /* device status report */
 _VTE_REPLY(DECSCUSR,                                  CSI, 'q', NONE, SPACE, ) /* set-cursor-style */
+_VTE_REPLY(DECSRC,                                    CSI, 'q', NONE, MULT,  ) /* secure reset confirmation 
*/
 _VTE_REPLY(DECSTBM,                                   CSI, 'r', NONE, NONE,  ) /* set-top-and-bottom-margins 
*/
 _VTE_REPLY(XTERM_WM,                                  CSI, 't', NONE, NONE,  ) /* XTERM WM report */
 _VTE_REPLY(DECRPDE,                                   CSI, 'w', NONE, DQUOTE,) /* report displayed extent */
@@ -46,7 +51,7 @@ _VTE_REPLY(XTERM_BRACKET,                             CSI, '~', NONE, NONE,  ) /
 
 _VTE_REPLY(DECTABSR,    DCS, '@', NONE, CASH,  ) /* tabulation stop report */
 _VTE_REPLY(DECRPSS,     DCS, 'r', NONE, CASH,  ) /* report state or setting */
-_VTE_REPLY(DECTSR,      DCS, 's', NONE, CASH,  _VTE_REPLY_PARAMS({1})) /* terminal state report */
+_VTE_REPLY(DECTSR,      DCS, 's', NONE, CASH,  ) /* terminal state report */
 _VTE_REPLY(DECCTR,      DCS, 's', NONE, CASH,  _VTE_REPLY_PARAMS({2})) /* color table report */
 _VTE_REPLY(DECAUPSS,    DCS, 'u', NONE, BANG,  ) /* assign user preferred supplemental set */
 _VTE_REPLY(DECCIR,      DCS, 'u', NONE, CASH,  _VTE_REPLY_PARAMS({1})) /* cursor information report */
diff --git a/src/parser-test.cc b/src/parser-test.cc
index 26d9ceb..a2ef155 100644
--- a/src/parser-test.cc
+++ b/src/parser-test.cc
@@ -33,6 +33,14 @@ using namespace std::literals;
 #include "parser-glue.hh"
 #include "parser-charset-tables.hh"
 
+#ifdef PARSER_INCLUDE_NOP
+#define _VTE_NOP(...) _VTE_CMD(__VA_ARGS__)
+#define _VTE_NOQ(...) _VTE_SEQ(__VA_ARGS__)
+#else
+#define _VTE_NOP(...)
+#define _VTE_NOQ(...)
+#endif
+
 using namespace vte::parser;
 
 Parser parser{};
@@ -281,80 +289,17 @@ test_seq_control(void)
 {
         static struct {
                 uint32_t c;
-                unsigned int type;
                 unsigned int cmd;
         } const controls [] = {
-                { 0x0,  VTE_SEQ_CONTROL, VTE_CMD_NUL     },
-                { 0x1,  VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x2,  VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x3,  VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x4,  VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x5,  VTE_SEQ_CONTROL, VTE_CMD_ENQ     },
-                { 0x6,  VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x7,  VTE_SEQ_CONTROL, VTE_CMD_BEL     },
-                { 0x8,  VTE_SEQ_CONTROL, VTE_CMD_BS      },
-                { 0x9,  VTE_SEQ_CONTROL, VTE_CMD_HT      },
-                { 0xa,  VTE_SEQ_CONTROL, VTE_CMD_LF      },
-                { 0xb,  VTE_SEQ_CONTROL, VTE_CMD_VT      },
-                { 0xc,  VTE_SEQ_CONTROL, VTE_CMD_FF      },
-                { 0xd,  VTE_SEQ_CONTROL, VTE_CMD_CR      },
-                { 0xe,  VTE_SEQ_CONTROL, VTE_CMD_SO      },
-                { 0xf,  VTE_SEQ_CONTROL, VTE_CMD_SI      },
-                { 0x10, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x11, VTE_SEQ_CONTROL, VTE_CMD_DC1     },
-                { 0x12, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x13, VTE_SEQ_CONTROL, VTE_CMD_DC3     },
-                { 0x14, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x15, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x16, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x17, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x18, VTE_SEQ_IGNORE,  VTE_CMD_NONE    },
-                { 0x19, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x1a, VTE_SEQ_CONTROL, VTE_CMD_SUB     },
-                { 0x1b, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x1c, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x1d, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x1e, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x1f, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x7f, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x80, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x81, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x82, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x83, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x84, VTE_SEQ_CONTROL, VTE_CMD_IND     },
-                { 0x85, VTE_SEQ_CONTROL, VTE_CMD_NEL     },
-                { 0x86, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x87, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x88, VTE_SEQ_CONTROL, VTE_CMD_HTS     },
-                { 0x89, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x8a, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x8b, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x8c, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x8d, VTE_SEQ_CONTROL, VTE_CMD_RI      },
-                { 0x8e, VTE_SEQ_CONTROL, VTE_CMD_SS2     },
-                { 0x8f, VTE_SEQ_CONTROL, VTE_CMD_SS3     },
-                { 0x90, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x91, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x92, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x93, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x94, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x95, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x96, VTE_SEQ_CONTROL, VTE_CMD_SPA     },
-                { 0x97, VTE_SEQ_CONTROL, VTE_CMD_EPA     },
-                { 0x98, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x99, VTE_SEQ_CONTROL, VTE_CMD_NONE    },
-                { 0x9a, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x9b, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x9c, VTE_SEQ_CONTROL, VTE_CMD_ST      },
-                { 0x9d, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x9e, VTE_SEQ_NONE,    VTE_CMD_NONE    },
-                { 0x9f, VTE_SEQ_NONE,    VTE_CMD_NONE    },
+#define _VTE_SEQ(cmd,type,f,pi,ni,i0) { f, VTE_CMD_##cmd },
+#include "parser-c01.hh"
+#undef _VTE_SEQ
         };
 
         for (unsigned int i = 0; i < G_N_ELEMENTS(controls); i++) {
                 parser.reset();
                 auto rv = parser.feed(controls[i].c);
-                g_assert_cmpuint(controls[i].type, ==, rv);
+                g_assert_cmpuint(rv, ==, VTE_SEQ_CONTROL);
                 g_assert_cmpuint(controls[i].cmd, ==, seq.command());
         }
 }
diff --git a/src/parser.cc b/src/parser.cc
index 7c1bd7a..7f746cf 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -29,7 +29,11 @@
 
 #include "parser-charset-tables.hh"
 
-#define WARN(num,str) do { } while (0)
+#ifdef PARSER_INCLUDE_NOP
+#define _VTE_NOQ(...) _VTE_SEQ(__VA_ARGS__)
+#else
+#define _VTE_NOQ(...)
+#endif
 
 /*
  * Terminal Parser
@@ -132,85 +136,11 @@ static inline bool parser_check_matching_controls(uint32_t introducer,
 static unsigned int vte_parse_host_control(const struct vte_seq *seq)
 {
         switch (seq->terminator) {
-        case 0x00: /* NUL */
-                return VTE_CMD_NUL;
-        case 0x05: /* ENQ */
-                return VTE_CMD_ENQ;
-        case 0x07: /* BEL */
-                return VTE_CMD_BEL;
-        case 0x08: /* BS */
-                return VTE_CMD_BS;
-        case 0x09: /* HT */
-                return VTE_CMD_HT;
-        case 0x0a: /* LF */
-                return VTE_CMD_LF;
-        case 0x0b: /* VT */
-                return VTE_CMD_VT;
-        case 0x0c: /* FF */
-                return VTE_CMD_FF;
-        case 0x0d: /* CR */
-                return VTE_CMD_CR;
-        case 0x0e: /* SO */
-                return VTE_CMD_SO;
-        case 0x0f: /* SI */
-                return VTE_CMD_SI;
-        case 0x11: /* DC1 */
-                return VTE_CMD_DC1;
-        case 0x13: /* DC3 */
-                return VTE_CMD_DC3;
-        case 0x18: /* CAN */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x1a: /* SUB */
-                return VTE_CMD_SUB;
-        case 0x1b: /* ESC */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x7f: /* DEL */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x84: /* IND */
-                return VTE_CMD_IND;
-        case 0x85: /* NEL */
-                return VTE_CMD_NEL;
-        case 0x88: /* HTS */
-                return VTE_CMD_HTS;
-        case 0x8d: /* RI */
-                return VTE_CMD_RI;
-        case 0x8e: /* SS2 */
-                return VTE_CMD_SS2;
-        case 0x8f: /* SS3 */
-                return VTE_CMD_SS3;
-        case 0x90: /* DCS */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x96: /* SPA */
-                return VTE_CMD_SPA;
-        case 0x97: /* EPA */
-                return VTE_CMD_EPA;
-        case 0x98: /* SOS */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x9a: /* SCI */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x9b: /* CSI */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x9c: /* ST */
-                return VTE_CMD_ST;
-        case 0x9d: /* OSC */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x9e: /* PM */
-                /* this is already handled by the state-machine */
-                break;
-        case 0x9f: /* APC */
-                /* this is already handled by the state-machine */
-                break;
+#define _VTE_SEQ(cmd,type,f,pi,ni,i0) case f: return VTE_CMD_##cmd;
+#include "parser-c01.hh"
+#undef _VTE_SEQ
+        default: return VTE_CMD_NONE;
         }
-
-        return VTE_CMD_NONE;
 }
 
 static unsigned int vte_parse_charset_94(uint32_t raw,
@@ -1287,7 +1217,7 @@ static int parser_feed_to_state(struct vte_parser *parser, uint32_t raw)
                                          ACTION_IGNORE);
         }
 
-        WARN(1, "bad vte-parser state");
+        g_warning("bad vte-parser state");
         return -EINVAL;
 }
 
diff --git a/src/parser.hh b/src/parser.hh
index 2338f4a..118f8f9 100644
--- a/src/parser.hh
+++ b/src/parser.hh
@@ -124,10 +124,13 @@ enum {
 
 enum {
 #define _VTE_CMD(cmd) VTE_CMD_##cmd,
+#define _VTE_NOP(cmd) VTE_CMD_##cmd,
 #include "parser-cmd.hh"
 #undef _VTE_CMD
+#undef _VTE_NOP
 
-        VTE_CMD_N
+        VTE_CMD_N,
+        VTE_CMD_NOP_FIRST = VTE_CMD_ACK
 };
 
 enum {
diff --git a/src/vte.cc b/src/vte.cc
index 421a8ea..605f3c6 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -3650,8 +3650,10 @@ skip_chunk:
                 default: {
                         switch (seq.command()) {
 #define _VTE_CMD(cmd)   case VTE_CMD_##cmd: cmd(seq); break;
+#define _VTE_NOP(cmd)
 #include "parser-cmd.hh"
 #undef _VTE_CMD
+#undef _VTE_NOP
                         default:
                                 _vte_debug_print(VTE_DEBUG_PARSER,
                                                  "Unknown parser command %d\n", seq.command());
@@ -4256,6 +4258,19 @@ VteTerminalPrivate::reply(vte::parser::Sequence const& seq,
         send(seq, vte::parser::ReplyBuilder{type, params});
 }
 
+#if 0
+void
+VteTerminalPrivate::reply(vte::parser::Sequence const& seq,
+                          unsigned int type,
+                          std::initializer_list<int> params,
+                          std::string const& str) noexcept
+{
+        vte::parser::ReplyBuilder reply_builder{type, params};
+        reply_builder.set_string(str);
+        send(seq, reply_builder);
+}
+#endif
+
 void
 VteTerminalPrivate::reply(vte::parser::Sequence const& seq,
                           unsigned int type,
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 98f3fda..14e1bfe 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -1283,6 +1283,12 @@ public:
                    unsigned int type,
                    std::initializer_list<int> params,
                    vte::parser::ReplyBuilder const& builder) noexcept;
+        #if 0
+        void reply(vte::parser::Sequence const& seq,
+                   unsigned int type,
+                   std::initializer_list<int> params,
+                   std::string const& str) noexcept;
+        #endif
         void reply(vte::parser::Sequence const& seq,
                    unsigned int type,
                    std::initializer_list<int> params,
@@ -1317,8 +1323,10 @@ public:
         // Note: inlining the handlers seems to worsen the performance, so we don't do that
 #define _VTE_CMD(cmd) \
        /* inline */ void cmd (vte::parser::Sequence const& seq);
+#define _VTE_NOP(cmd) G_GNUC_UNUSED _VTE_CMD(cmd)
 #include "parser-cmd.hh"
 #undef _VTE_CMD
+#undef _VTE_NOP
 };
 
 extern GTimer *process_timer;
diff --git a/src/vteseq.cc b/src/vteseq.cc
index d62a758..2d96d0a 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -99,11 +99,13 @@ vte::parser::Sequence::command_string() const
 
         switch (command()) {
 #define _VTE_CMD(cmd) case VTE_CMD_##cmd: return #cmd;
+#define _VTE_NOP(cmd)
 #include "parser-cmd.hh"
 #undef _VTE_CMD
+#undef _VTE_NOP
         default:
                 static char buf[32];
-                snprintf(buf, sizeof(buf), "UNKOWN(%u)", command());
+                snprintf(buf, sizeof(buf), "NOP OR UNKOWN(%u)", command());
                 return buf;
         }
 }
@@ -170,7 +172,6 @@ VteTerminalPrivate::emit_bell()
         g_signal_emit(m_terminal, signals[SIGNAL_BELL], 0);
 }
 
-
 /* Emit a "deiconify-window" signal. */
 void
 VteTerminalPrivate::emit_deiconify_window()
@@ -383,7 +384,7 @@ VteTerminalPrivate::scroll_text(vte::grid::row_t scroll_amount)
         m_text_deleted_flag = TRUE;
 }
 
- void
+void
 VteTerminalPrivate::restore_cursor()
 {
         restore_cursor(m_screen);
@@ -498,6 +499,11 @@ VteTerminalPrivate::set_mode_private(int mode,
         case vte::terminal::modes::Private::eDEC_132_COLUMN:
                 /* DECCOLM: set/reset to 132/80 columns mode, clear screen and cursor home */
                 // FIXMEchpe don't do clear screen if DECNCSM is set
+                /* FIXMEchpe!!!
+                 * Changing this mode resets the top, bottom, left, right margins;
+                 * clears the screen (unless DECNCSM is set); resets DECLRMM; and clears
+                 * the status line if host-writable.
+                 */
                 if (m_modes_private.XTERM_DECCOLM()) {
                         emit_resize_window(set ? 132 : 80, m_row_count);
                         clear_screen();
@@ -1616,6 +1622,17 @@ VteTerminalPrivate::GRAPHIC(vte::parser::Sequence const& seq)
         insert_char(seq.terminator(), false, false);
 }
 
+void
+VteTerminalPrivate::ACK(vte::parser::Sequence const& seq)
+{
+        /*
+         * ACK - acknowledge
+         *
+         * References: ECMA-48 § 8.3.1
+         */
+
+        m_bell_pending = true;
+}
 
 void
 VteTerminalPrivate::ACS(vte::parser::Sequence const& seq)
@@ -1628,7 +1645,7 @@ VteTerminalPrivate::ACS(vte::parser::Sequence const& seq)
          * References: ECMA-35 § 15.2
          */
 
-        /* Since we don't implement ISO-2022 anymore, we can mostly ignore this */
+        /* Since we mostly don't implement ECMA-35 anymore, we can mostly ignore this */
 
         switch (seq.terminator() - 0x40) {
         case 6:
@@ -1637,6 +1654,9 @@ VteTerminalPrivate::ACS(vte::parser::Sequence const& seq)
                  * sequences instead of 8bit C1 controls.
                  * This is ignored if the terminal is below level-2 emulation mode
                  * (VT100 and below), the terminal already sends 7bit controls then.
+                 *
+                 * References: ECMA-35
+                 *             VT525
                  */
 #if 0
                 if (screen->conformance_level > VTE_CONFORMANCE_LEVEL_VT100)
@@ -1651,6 +1671,9 @@ VteTerminalPrivate::ACS(vte::parser::Sequence const& seq)
                  * This is ignored if the terminal is below level-2 emulation mode
                  * (VT100 and below). The terminal always sends 7bit controls in those
                  * modes.
+                 *
+                 * References: ECMA-35
+                 *             VT525
                  */
 #if 0
                 if (screen->conformance_level > VTE_CONFORMANCE_LEVEL_VT100)
@@ -1668,12 +1691,26 @@ VteTerminalPrivate::ACS(vte::parser::Sequence const& seq)
                 /* Use Level 2 of ECMA-43
                  *
                  * Probably not worth implementing.
+                 *
+                 * On a VTxxx, both levels 1 and 2 designate as follows:
+                 * G0 = ASCII (IR #6)
+                 * G1 = ISO_LATIN1_SUPPLEMENTAL
+                 * with G0 mapped to GL, G1 to GR.
+                 *
+                 * References: VT525
                  */
                 break;
         case 14:
                 /* Use Level 3 of ECMA-43
                  *
                  * Probably not worth implementing.
+                 *
+                 * On a VTxxx, this designates as follows:
+                 * G0 = ASCII (IR #6)
+                 * with G0 mapped to GL.
+                 *
+                 *
+                 * References: VT525
                  */
                 break;
         }
@@ -1693,6 +1730,18 @@ VteTerminalPrivate::BEL(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::BPH(vte::parser::Sequence const& seq)
+{
+        /*
+         * BPH - break permitted here
+         *
+         * References: ECMA-48 § 8.3.4
+         *
+         * Not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::BS(vte::parser::Sequence const& seq)
 {
         /*
@@ -1739,15 +1788,33 @@ VteTerminalPrivate::CBT(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::CCH(vte::parser::Sequence const& seq)
+{
+        /*
+         * CCH - cancel character
+         * Indicates that the CCH and the preceding graphic character
+         * (including SPACE (2/0)) in the data stream should be ignored.
+         * If CCH is not preceded by a graphic character but by a
+         * control function instead, CCH is ignored.
+         *
+         * References: ECMA-48 § 8.3.8
+         *
+         * Not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::CHA(vte::parser::Sequence const& seq)
 {
         /*
          * CHA - cursor-horizontal-absolute
-         * Move the cursor to position @args[0] in the current line. The
-         * cursor cannot be moved beyond the rightmost cell and will stop
-         * there.
+         * Move the cursor to position @args[0] in the current line
+         * (presentation).
+         * The cursor cannot be moved beyond the rightmost cell; it will
+         * stop there.
          *
-         * Note: This does the same as HPA
+         * Arguments:
+         *   args[0]: column
          *
          * Defaults:
          *   args[0]: 1
@@ -1774,11 +1841,14 @@ VteTerminalPrivate::CHT(vte::parser::Sequence const& seq)
 {
         /*
          * CHT - cursor-horizontal-forward-tabulation
-         * Move the cursor @args[0] tabs forward (to the right). The
-         * current cursor cell, in case it's a tab, is not counted.
+         * Move the cursor @args[0] tabs forward (to the right) (presentation).
+         * The current cursor cell, in case it's a tab, is not counted.
          * Furthermore, the cursor cannot be moved beyond the rightmost cell
          * and will stop there.
          *
+         * Arguments:
+         *   args[0]: count
+         *
          * Defaults:
          *   args[0]: 1
          *
@@ -1797,7 +1867,10 @@ VteTerminalPrivate::CMD(vte::parser::Sequence const& seq)
         /*
          * CMD - coding method delimiter
          *
-         * References: ECMA-35 §15.3
+         * References: ECMA-35 § 15.3
+         *             ECMA-48 § 8.3.11
+         *
+         * Not worth implementing.
          */
 }
 
@@ -1810,6 +1883,9 @@ VteTerminalPrivate::CNL(vte::parser::Sequence const& seq)
          *
          * TODO: Does this stop at the bottom or cause a scroll-up?
          *
+         * Arguments:
+         *   args[0]: number of lines
+         *
          * Defaults:
          *   args[0]: 1
          *
@@ -1838,6 +1914,9 @@ VteTerminalPrivate::CPL(vte::parser::Sequence const& seq)
          * CPL - cursor-preceding-line
          * Move the cursor @args[0] lines up, without scrolling.
          *
+         * Arguments:
+         *   args[0]: number of lines
+         *
          * Defaults:
          *   args[0]: 1
          *
@@ -1877,12 +1956,64 @@ VteTerminalPrivate::CR(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::CTC(vte::parser::Sequence const& seq)
+{
+        /*
+         * CTC - cursor tabulation control
+         * Set/clear tabstops.
+         *
+         * For the cases @args[0] = 0, 2, 4, the effect depends on TSM mode.
+         *
+         * References: ECMA-48 § 8.3.17
+         */
+
+        switch (seq.collect1(0)) {
+        case -1:
+        case 0:
+                /* Set tabstop at the current cursor position */
+                m_tabstops.set(m_screen->cursor.col);
+                break;
+
+        case 1:
+                /* Sets line tabstop in the ative line (presentation) */
+                break;
+
+        case 2:
+                /* Clear tabstop at the current cursor position */
+                m_tabstops.unset(m_screen->cursor.col);
+                break;
+
+        case 3:
+                /* Clear line tabstop in the active line */
+                break;
+
+        case 4:
+                /* Clear all tabstops in the active line */
+                /* [[fallthrough]]; */
+        case 5:
+                /* Clear all tabstops */
+                m_tabstops.clear();
+                break;
+
+        case 6:
+                /* Clear all line tabstops */
+                break;
+
+        default:
+                break;
+        }
+}
+
+void
 VteTerminalPrivate::CUB(vte::parser::Sequence const& seq)
 {
         /*
          * CUB - cursor-backward
          * Move the cursor @args[0] positions to the left. The cursor stops
-         * at the left-most position.
+         * at the left-most position. (presentation)
+         *
+         * Arguments:
+         *   args[0]: number of positions
          *
          * Defaults:
          *   args[0]: 1
@@ -1910,7 +2041,10 @@ VteTerminalPrivate::CUD(vte::parser::Sequence const& seq)
          * CUD - cursor-down
          * Move the cursor @args[0] positions down. The cursor stops at the
          * bottom margin. If it was already moved further, it stops at the
-         * bottom line.
+         * bottom line. (presentation)
+         *
+         * Arguments:
+         *   args[0]: number of positions
          *
          * Defaults:
          *   args[0]: 1
@@ -1937,7 +2071,10 @@ VteTerminalPrivate::CUF(vte::parser::Sequence const& seq)
         /*
          * CUF -cursor-forward
          * Move the cursor @args[0] positions to the right. The cursor stops
-         * at the right-most position.
+         * at the right-most position. (presentation)
+         *
+         * Arguments:
+         *   args[0]: number of positions
          *
          * Defaults:
          *   args[0]: 1
@@ -1965,7 +2102,11 @@ VteTerminalPrivate::CUP(vte::parser::Sequence const& seq)
          * CUP - cursor-position
          * Moves the cursor to position @args[1] x @args[0]. If either is 0, it
          * is treated as 1. The positions are subject to the origin-mode and
-         * clamped to the addressable with/height.
+         * clamped to the addressable width/height. (presentation)
+         *
+         * Arguments:
+         *   args[0]: line
+         *   args[0]: column
          *
          * Defaults:
          *   args[0]: 1
@@ -1998,7 +2139,10 @@ VteTerminalPrivate::CUU(vte::parser::Sequence const& seq)
          * CUU - cursor-up
          * Move the cursor @args[0] positions up. The cursor stops at the
          * top margin. If it was already moved further, it stops at the
-         * top line.
+         * top line. (presentation)
+         *
+         * Arguments:
+         *   args[0]: number of positions
          *
          * Defaults:
          *   args[0]: 1
@@ -2020,6 +2164,27 @@ VteTerminalPrivate::CUU(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::CVT(vte::parser::Sequence const& seq)
+{
+        /*
+         * CVT - cursor line tabulation
+         * Move the cursor @args[0] positions down. The cursor stops at the
+         * bottom margin. If it was already moved further, it stops at the
+         * bottom line. (presentation)
+         *
+         * Arguments:
+         *   args[0]: number of positions
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.23
+         */
+
+        /* FIXME: implement this? */
+}
+
+void
 VteTerminalPrivate::CnD(vte::parser::Sequence const& seq)
 {
         /*
@@ -2031,7 +2196,7 @@ VteTerminalPrivate::CnD(vte::parser::Sequence const& seq)
          *             ISO 2375 IR
          */
 
-        /* Since we don't implement ISO-2022 anymore, we can ignore this */
+        /* Since we mostly don't implement ECMA-35 anymore, we can ignore this */
 }
 
 void
@@ -2044,10 +2209,10 @@ VteTerminalPrivate::DA1(vte::parser::Sequence const& seq)
          * Note that the primary DA asks for supported features, not currently
          * enabled features.
          *
-         * The terminal's answer is:
-         *   ^[ ? 65 ; ARGS c
-         * The first argument, 65, is fixed and denotes a VT520, the last
-         * DEC-term that extended this number.
+         * Reply: DECDA1R (CSI ? 65 ; ARGS c)
+         *
+         * The first argument, 65, is fixed and denotes a VT520 (a Level 5
+         * terminal), the last DEC-term that extended this number.
          * All following arguments denote supported features. Note
          * that at most 15 features can be sent (max CSI args). It is safe to
          * send more, but clients might not be able to parse them. This is a
@@ -2084,6 +2249,8 @@ VteTerminalPrivate::DA1(vte::parser::Sequence const& seq)
          *       The DEC technical-character-set is available.
          *   18: windowing capability
          *       TODO: ?
+         *   19: sessions capability
+         *       TODO: ?
          *   21: horizontal scrolling
          *       TODO: ?
          *   22: ANSI color
@@ -2098,11 +2265,14 @@ VteTerminalPrivate::DA1(vte::parser::Sequence const& seq)
          *       TODO: ?
          *   44: PCTerm
          *       TODO: ?
-         *   45: soft keymap
+         *   45: soft key mapping
          *       TODO: ?
          *   46: ASCII emulation
          *       TODO: ?
          *
+         * Extensions which are implied by the level are not reported explicity
+         * (e.g. 6, 8, 15 in level 5).
+         *
          * Defaults:
          *   args[0]: 0
          *
@@ -2126,10 +2296,9 @@ VteTerminalPrivate::DA2(vte::parser::Sequence const& seq)
          * informational-only and should not be used by the host to detect
          * terminal features.
          *
-         * The terminal's response is:
-         *   ^[ > 65 ; FIRMWARE ; KEYBOARD c
-         * whereas 65 is fixed for VT525 terminals, the last terminal-line that
-         * increased this number. FIRMWARE is the firmware
+         * Reply: DECDA2R (CSI > 65 ; FIRMWARE ; KEYBOARD c)
+         * where 65 is fixed for VT525 color terminals, the last terminal-line that
+         * increased this number (64 for VT520). FIRMWARE is the firmware
          * version encoded as major/minor (20 == 2.0) and KEYBOARD is 0 for STD
          * keyboard and 1 for PC keyboards.
          *
@@ -2154,10 +2323,10 @@ VteTerminalPrivate::DA3(vte::parser::Sequence const& seq)
          * DA3 - tertiary-device-attributes
          * The tertiary DA is used to query the terminal-ID.
          *
-         * The terminal's response is:
-         *   ^P ! | XX AA BB CC ^\
-         * whereas all four parameters are hexadecimal-encoded pairs. XX
-         * denotes the manufacturing site, AA BB CC is the terminal's ID.
+         * Reply: DECRPTUI
+         *   DATA: four pairs of are hexadecimal number, encoded 4 bytes.
+         *   The first byte denotes the manufacturing site, the remaining
+         *   three is the terminal's ID.
          *
          * We always reply with '~VTE' encoded in hex.
          */
@@ -2169,29 +2338,73 @@ VteTerminalPrivate::DA3(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::DAQ(vte::parser::Sequence const& seq)
+{
+        /*
+         * DAQ - define area qualification
+         *
+         * Arguments:
+         *   args[0]: type
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.25, § 6.5.2
+         */
+}
+
+void
 VteTerminalPrivate::DC1(vte::parser::Sequence const& seq)
 {
         /*
          * DC1 - device-control-1 or XON
          * This clears any previous XOFF and resumes terminal-transmission.
+         *
+         * References: ECMA-48 § 8.3.28
          */
 
         /* we do not support XON */
 }
 
 void
+VteTerminalPrivate::DC2(vte::parser::Sequence const& seq)
+{
+        /*
+         * DC2 - device-control-2
+         *
+         * References: ECMA-48 § 8.3.29
+         *
+         * Not implemented.
+         */
+}
+
+void
 VteTerminalPrivate::DC3(vte::parser::Sequence const& seq)
 {
         /*
          * DC3 - device-control-3 or XOFF
          * Stops terminal transmission. No further characters are sent until
          * an XON is received.
+         *
+         * References: ECMA-48 § 8.3.30
          */
 
         /* we do not support XOFF */
 }
 
 void
+VteTerminalPrivate::DC4(vte::parser::Sequence const& seq)
+{
+        /*
+         * DC4 - device-control-4
+         *
+         * References: ECMA-48 § 8.3.31
+         *
+         * Not implemented.
+         */
+}
+
+void
 VteTerminalPrivate::DCH(vte::parser::Sequence const& seq)
 {
         /*
@@ -2227,17 +2440,37 @@ VteTerminalPrivate::DCH(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::DECAC(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECAC - assign color
+         * Assign the color used for normal text.
+         *
+         * Arguments:
+         *   @args[0]: item; 1 for normal text, 2 for the text in the window frame
+         *   @args[1]: foreground color palette index (0..15)
+         *   @args[2]: background color palette index (0..15)
+         *
+         * References: VT525
+         */
+
+        // FIXMEchpe maybe implement this, allowing our extended color
+        // format instead of just palette colors
+}
+
+void
 VteTerminalPrivate::DECALN(vte::parser::Sequence const& seq)
 {
         /*
          * DECALN - screen-alignment-pattern
-         *
-         * Probably not worth implementing.
+         * Resets the margins, homes the cursor, and fills the screen
+         * with 'E's.
          *
          * References: VT525
          */
 
-        // FIXMEchpe why do we implement this?
+        // FIXMEchpe! reset margins and home cursor
+
        for (auto row = m_screen->insert_delta;
             row < m_screen->insert_delta + m_row_count;
             row++) {
@@ -2266,25 +2499,61 @@ VteTerminalPrivate::DECALN(vte::parser::Sequence const& seq)
 }
 
 void
-VteTerminalPrivate::DECANM(vte::parser::Sequence const& seq)
+VteTerminalPrivate::DECARR(vte::parser::Sequence const& seq)
 {
         /*
-         * DECANM - ansi-mode
-         * Set the terminal into VT52 compatibility mode. Control sequences
-         * overlap with regular sequences so we have to detect them early before
-         * dispatching them.
+         * DECARR - auto repeat rate
+         * Sets the key autorepeat rate in from @args[0] in keys/s.
+         * 0…5 are mapped to 0/s, 6…15 to 10/s, 16…30 to 30/s.
+         * Other values are ignored. The default is 30.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
 }
 
 void
+VteTerminalPrivate::DECATC(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECATC - alternate text color
+         * Assign the color used for attribute combinations text.
+         *
+         * Arguments:
+         *   @args[0]: selects the attribute combinations from a
+         *     value table (0 = normal, 1 = bold, 2 = reverse,
+         *     3 = (single) underline, 4 = blink; then 5…15
+         *     encode the combinations)
+         *   @args[1]: foreground color palette index (0..15)
+         *   @args[2]: background color palette index (0..15)
+         *
+         * References: VT525
+         */
+
+        // FIXMEchpe maybe implement this, allowing our extended color
+        // format instead of just palette colors
+}
+
+void
 VteTerminalPrivate::DECAUPSS(vte::parser::Sequence const& seq)
 {
         /*
          * DECAUPSS - assign user preferred supplemental sets
+         * Sets a supplemental charset as user preferred.
+         * Arguments:
+         *   @args[0]: charset designator:
+         *     0 = DEC, Latin 1/2
+         *     1 = Latin 5/7, ISO Cyrillic, ISO Hebrew
+         *   DATA: the charset, as in a ECMA-35 charset designation
+         *     sequence (sans the ESC); but only some charsets are
+         *     supported.
+         *
+         * Default: DEC Supplemental Graphic set.
          *
          * References: VT525
+         *
+         * Probably not worth implementing.
          */
 }
 
@@ -2310,6 +2579,32 @@ VteTerminalPrivate::DECCARA(vte::parser::Sequence const& seq)
 {
         /*
          * DECCARA - change-attributes-in-rectangular-area
+         * Change some character attributes (bold, blink, reverse,
+         * (single) underline) in the specified rectangle.
+         * The characters in the area are unchanged.
+         *
+         * Arguments;
+         *   args[0..3]: top, left, bottom, right of the rectangle (1-based)
+         *   args[4:]: the character attributes to change; values as in SGR
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         *   args[2]: height of current page
+         *   args[3]: width of current page
+         *   args[4:]: no defaults
+         *
+         * If the top > bottom or left > right, the command is ignored.
+         *
+         * These coordinates are interpreted according to origin mode (DECOM),
+         * but unaffected by the page margins (DECSLRM?). Current SGR defaults
+         * and cursor position are unchanged.
+         *
+         * Note: DECSACE selects whether this function operates on the
+         * rectangular area or the data stream between the star and end
+         * positions.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2320,8 +2615,11 @@ VteTerminalPrivate::DECCKD(vte::parser::Sequence const& seq)
 {
         /*
          * DECCKD - copy key default
+         * Copy the defaults from one key to another.
          *
          * References: VT525
+         *
+         * Probably not worth implementing.
          */
 }
 
@@ -2330,6 +2628,55 @@ VteTerminalPrivate::DECCRA(vte::parser::Sequence const& seq)
 {
         /*
          * DECCRA - copy-rectangular-area
+         * Copies characters and their attributes from one rectangle to
+         * another.
+         *
+         * Arguments;
+         *   args[0..3]: top, left, bottom, right of the source rectangle (1-based)
+         *   args[4..7]: top, left, bottom, right of the target rectangle (1-based)
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         *   args[2]: height of current page
+         *   args[3]: width of current page
+         *   args[4]: 1
+         *   args[5]: 1
+         *   args[6]: height of current page
+         *   args[7]: width of current page
+         *
+         * If the top > bottom or left > right for either of the rectangles,
+         * the command is ignored.
+         *
+         * These coordinates are interpreted according to origin mode (DECOM),
+         * but unaffected by the page margins (DECSLRM?). Current SGR defaults
+         * and cursor position are unchanged.
+         *
+         * Note: DECSACE selects whether this function operates on the
+         * rectangular area or the data stream between the star and end
+         * positions.
+         *
+         * References: VT525
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::DECCRTST(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECCRTST - CRT saver time
+         * Sets the CRT saver timer. When DECCRTSM is set, the
+         * screen blanks when the time elapsed since the last
+         * keystroke or output is greater than the time set here.
+         *
+         * Arguments:
+         *   args[0]: the time in minutes (0…60) (0 = never)
+         *
+         * Default: 15
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2341,6 +2688,8 @@ VteTerminalPrivate::DECDC(vte::parser::Sequence const& seq)
         /*
          * DECDC - delete-column
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2351,6 +2700,8 @@ VteTerminalPrivate::DECDHL_BH(vte::parser::Sequence const& seq)
         /*
          * DECDHL_BH - double-width-double-height-line: bottom half
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2361,6 +2712,8 @@ VteTerminalPrivate::DECDHL_TH(vte::parser::Sequence const& seq)
         /*
          * DECDHL_TH - double-width-double-height-line: top half
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2370,8 +2723,25 @@ VteTerminalPrivate::DECDLD(vte::parser::Sequence const& seq)
 {
         /*
          * DECDLD - dynamically redefinable character sets extension
+         * Loads a soft font for a DRCS charset from SIXEL data
          *
          * References: VT525
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::DECDLDA(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECDLD - down line load allocation
+         * Sets the number of DRCSes allowed per sesion
+         * (monochrome terminals only).
+         *
+         * References: VT525
+         *
+         * Probably not worth implementing.
          */
 }
 
@@ -2380,8 +2750,11 @@ VteTerminalPrivate::DECDMAC(vte::parser::Sequence const& seq)
 {
         /*
          * DECDMAC - define-macro
+         * Define a macro that can be executed by DECINVM.
          *
          * References: VT525
+         *
+         * For security reasons, VTE does not implement this.
          */
 }
 
@@ -2391,6 +2764,8 @@ VteTerminalPrivate::DECDWL(vte::parser::Sequence const& seq)
         /*
          * DECDWL - double-width-single-height-line
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2413,6 +2788,8 @@ VteTerminalPrivate::DECEFR(vte::parser::Sequence const& seq)
          * on cells instead of pixels. See DECELR how to initialize and enable
          * it. DECELR can also enable pixel-mode instead of cell-mode.
          *
+         * References: VT525
+         *
          * TODO: implement
          */
 }
@@ -2422,6 +2799,10 @@ VteTerminalPrivate::DECELF(vte::parser::Sequence const& seq)
 {
         /*
          * DECELF - enable-local-functions
+         * Enable or disable keys to perform local functions like
+         * copy/paster, panning and window resize.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2442,6 +2823,8 @@ VteTerminalPrivate::DECELR(vte::parser::Sequence const& seq)
          *   args[0]: 0
          *   args[1]: 0
          *
+         * References: VT525
+         *
          * TODO: implement
          */
 }
@@ -2451,12 +2834,51 @@ VteTerminalPrivate::DECERA(vte::parser::Sequence const& seq)
 {
         /*
          * DECERA - erase-rectangular-area
+         * Erases characters in the specified rectangle, replacing
+         * them with SPACE (2/0). Character attributes are erased
+         * too, but not line attributes (DECDHL, DECDWL).
+         *
+         * Arguments;
+         *   args[0..3]: top, left, bottom, right of the rectangle (1-based)
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         *   args[2]: height of current page
+         *   args[3]: width of current page
+         *
+         * If the top > bottom or left > right, the command is ignored.
+         *
+         * These coordinates are interpreted according to origin mode (DECOM),
+         * but unaffected by the page margins (DECSLRM?). Current SGR defaults
+         * and cursor position are unchanged.
+         *
+         * Note: DECSACE selects whether this function operates on the
+         * rectangular area or the data stream between the star and end
+         * positions.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
 }
 
 void
+VteTerminalPrivate::DECES(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECES - enable session
+         * Makes this session active as if by the Session key;
+         * that is, makes the session receiving this command the
+         * session receiving keyboard input.
+         *
+         * References: VT525
+         *
+         * VTE does not support sessions.
+         */
+}
+
+void
 VteTerminalPrivate::DECFI(vte::parser::Sequence const& seq)
 {
         /*
@@ -2470,6 +2892,8 @@ VteTerminalPrivate::DECFI(vte::parser::Sequence const& seq)
          * the right margin at the border of the page when the terminal
          * receives DECFI, then the terminal ignores DECFI.
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2479,8 +2903,41 @@ VteTerminalPrivate::DECFRA(vte::parser::Sequence const& seq)
 {
         /*
          * DECFRA - fill-rectangular-area
+         * Fills the specified rectangle with the specified character,
+         * replacing the current characters in it. Character attributes
+         * are replaced by the current default SGR. Does not change
+         * line attributes (DECDHL, DECDWL).
+         *
+         * Arguments;
+         *   args[0]: the decimal value of the replacement character (GL or GR)
+         *   args[0..3]: top, left, bottom, right of the rectangle (1-based)
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         *   args[2]: height of current page
+         *   args[3]: width of current page
+         *
+         * If the top > bottom or left > right, the command is ignored.
+         * If the character is not in the GL or GR area, the command is ignored.
+         *
+         * These coordinates are interpreted according to origin mode (DECOM),
+         * but unaffected by the page margins (DECSLRM?). Current SGR defaults
+         * and cursor position are unchanged.
+         *
+         * Note: DECSACE selects whether this function operates on the
+         * rectangular area or the data stream between the star and end
+         * positions.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
+         *
+         * *If* we were to implement it, we should find a way to allow any
+         * UTF-8 character, perhaps by using subparams to encode it. E.g.
+         * either each UTF-8 byte in a subparam of its own, or just split
+         * the unicode plane off into the leading subparam (plane:remaining 16 bits).
+         * Or by using the last graphic character for it, like REP.
          */
 }
 
@@ -2490,6 +2947,11 @@ VteTerminalPrivate::DECIC(vte::parser::Sequence const& seq)
         /*
          * DECIC - insert-column
          *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2499,8 +2961,11 @@ VteTerminalPrivate::DECINVM(vte::parser::Sequence const& seq)
 {
         /*
          * DECINVM - invoke-macro
+         * Invokes a macro defined by DECDMAC.
          *
-         * Probably not worth implementing.
+         * References: VT525
+         *
+         * For security reasons, VTE does not implement this.
          */
 }
 
@@ -2509,6 +2974,9 @@ VteTerminalPrivate::DECKBD(vte::parser::Sequence const& seq)
 {
         /*
          * DECKBD - keyboard-language-selection
+         * Selects a keyboard language.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2524,6 +2992,8 @@ VteTerminalPrivate::DECKPAM(vte::parser::Sequence const& seq)
          * applications can detect whether a numeric key was pressed on the
          * top-row or on the keypad.
          * Default is keypad-numeric-mode.
+         *
+         * References: VT525
          */
 
         set_mode_private(vte::terminal::modes::Private::eDEC_APPLICATION_KEYPAD, true);
@@ -2538,6 +3008,8 @@ VteTerminalPrivate::DECKPNM(vte::parser::Sequence const& seq)
          * the keypad-numeric-mode. Keypresses on the keypad generate the same
          * sequences as corresponding keypresses on the main keyboard.
          * Default is keypad-numeric-mode.
+         *
+         * References: VT525
          */
         set_mode_private(vte::terminal::modes::Private::eDEC_APPLICATION_KEYPAD, false);
 }
@@ -2548,9 +3020,9 @@ VteTerminalPrivate::DECLANS(vte::parser::Sequence const& seq)
         /*
          * DECLANS - load answerback message
          *
-         * Will not implement this because of security policy.
-         *
          * References: VT525
+         *
+         * For security reasons, VTE does not implement this.
          */
 }
 
@@ -2559,8 +3031,12 @@ VteTerminalPrivate::DECLBAN(vte::parser::Sequence const& seq)
 {
         /*
          * DECLBAN - load banner message
+         * Loads a banner message that will be displayed in double size
+         * characters when the terminal powers up.
          *
          * References: VT525
+         *
+         * Probably not worth implementing.
          */
 }
 
@@ -2579,6 +3055,9 @@ VteTerminalPrivate::DECLFKC(vte::parser::Sequence const& seq)
 {
         /*
          * DECLFKC - local-function-key-control
+         * Select the action for local function keys.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2589,6 +3068,16 @@ VteTerminalPrivate::DECLL(vte::parser::Sequence const& seq)
 {
         /*
          * DECLL - load-leds
+         * Sets the keyboard LEDs when in DECKLHIM mode.
+         *
+         * Arguments:
+         *   args[0]: which LED to change to which state
+         *     0: NumLock, CapsLock, ScrollLock off
+         *     1, 21: NumLock on/off
+         *     2, 22: CapsLock on/off
+         *     3, 23: ScrollLock on/off
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2599,6 +3088,9 @@ VteTerminalPrivate::DECLTOD(vte::parser::Sequence const& seq)
 {
         /*
          * DECLTOD - load-time-of-day
+         * Sets the clock.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2609,8 +3101,11 @@ VteTerminalPrivate::DECPAK(vte::parser::Sequence const& seq)
 {
         /*
          * DECPAK - program alphanumeric key
+         * Program alphanumeric keys to send different codes or perform actions.
          *
          * References: VT525
+         *
+         * For security reasons, VTE does not implement this.
          */
 }
 
@@ -2622,7 +3117,9 @@ VteTerminalPrivate::DECPCTERM(vte::parser::Sequence const& seq)
          * This enters/exits the PCTerm mode. Default mode is VT-mode. It can
          * also select parameters for scancode/keycode mappings in SCO mode.
          *
-         * Definitely not worth implementing. Lets kill PCTerm/SCO modes!
+         * References: VT525
+         *
+         * Definitely not worth implementing.
          */
 }
 
@@ -2637,8 +3134,10 @@ VteTerminalPrivate::DECPCTERM_OR_XTERM_RPM(vte::parser::Sequence const& seq)
          */
         if (seq.size_final() <= 1)
                 XTERM_RPM(seq);
+        #ifdef PARSER_INCLUDE_NOP
         else
                 DECPCTERM(seq);
+        #endif
 }
 
 void
@@ -2646,8 +3145,11 @@ VteTerminalPrivate::DECPFK(vte::parser::Sequence const& seq)
 {
         /*
          * DECPFK - program function key
+         * Program function keys to send different codes or perform actions.
          *
          * References: VT525
+         *
+         * For security reasons, VTE does not implement this.
          */
 }
 
@@ -2656,8 +3158,17 @@ VteTerminalPrivate::DECPKA(vte::parser::Sequence const& seq)
 {
         /*
          * DECPKA - program-key-action
+         * Sets whether DECPFK, DECPAK, DECCD, DECUDK can reprogram keys.
          *
-         * Probably not worth implementing.
+         * Arguments:
+         *   args[0]:
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: VT525
+         *
+         * For security reasons, VTE does not implement this.
          */
 }
 
@@ -2667,6 +3178,31 @@ VteTerminalPrivate::DECPKFMR(vte::parser::Sequence const& seq)
         /*
          * DECPKFMR - program-key-free-memory-report
          *
+         * References: VT525
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::DECPS(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECPS - play sound
+         * Plays a note. Arguments:
+         *   @args[0]: the volume. 0 = off, 1…3 = low, 4…7 = high
+         *   @args[1]: the duration, in multiples of 1s/32
+         *   @args[2]: the note; from 1 = C5, 2 = C♯5 … to 25 = C7
+         *
+         * Defaults:
+         *   @args[0]: no default
+         *   @args[1]: no default
+         *   @args[2]: no default
+         *
+         * Note that a VT525 is specified to store only 16 notes at a time.
+         *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2676,6 +3212,35 @@ VteTerminalPrivate::DECRARA(vte::parser::Sequence const& seq)
 {
         /*
          * DECRARA - reverse-attributes-in-rectangular-area
+         * Reverse some character attributes (bold, blink, reverse,
+         * (single) underline) in the specified rectangle.
+         * The characters in the area are unchanged, as are the
+         * other character attributes.
+         *
+         * Arguments;
+         *   args[0..3]: top, left, bottom, right of the rectangle (1-based)
+         *   args[4:]: the character attributes to change; values as in SGR
+         *     except that only bold, blink, reverse, (single) underline are
+         *     supported; 0 to reverse all of these.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         *   args[2]: height of current page
+         *   args[3]: width of current page
+         *   args[4:]: no defaults
+         *
+         * If the top > bottom or left > right, the command is ignored.
+         *
+         * These coordinates are interpreted according to origin mode (DECOM),
+         * but unaffected by the page margins (DECSLRM?). Current SGR defaults
+         * and cursor position are unchanged.
+         *
+         * Note: DECSACE selects whether this function operates on the
+         * rectangular area or the data stream between the star and end
+         * positions.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2751,6 +3316,12 @@ VteTerminalPrivate::DECREQTPARM(vte::parser::Sequence const& seq)
          *   args[0]: 0
          *
          * References: VT100
+         *
+         * Alternatively:
+         *
+         * WYCDIR - set current character color and attributes
+         *
+         * References: WY370
          */
 
         switch (seq.collect1(0)) {
@@ -2778,16 +3349,6 @@ VteTerminalPrivate::DECREQTPARM(vte::parser::Sequence const& seq)
 }
 
 void
-VteTerminalPrivate::DECRPKT(vte::parser::Sequence const& seq)
-{
-        /*
-         * DECRPKT - report-key-type
-         * Response to DECRQKT, we can safely ignore it as we're the one sending
-         * it to the host.
-         */
-}
-
-void
 VteTerminalPrivate::DECRQCRA(vte::parser::Sequence const& seq)
 {
         /*
@@ -2876,6 +3437,9 @@ VteTerminalPrivate::DECRQDE(vte::parser::Sequence const& seq)
 {
         /*
          * DECRQDE - request-display-extent
+         * Request how much of the curren tpage is shown on screen.
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -2887,6 +3451,8 @@ VteTerminalPrivate::DECRQKT(vte::parser::Sequence const& seq)
         /*
          * DECRQKT - request-key-type
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2898,6 +3464,8 @@ VteTerminalPrivate::DECRQLP(vte::parser::Sequence const& seq)
          * DECRQLP - request-locator-position
          * See DECELR for locator-information.
          *
+         * References: VT525
+         *
          * TODO: document and implement
          */
 }
@@ -2975,6 +3543,8 @@ VteTerminalPrivate::DECRQPKFM(vte::parser::Sequence const& seq)
         /*
          * DECRQPKFM - request-program-key-free-memory
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -2984,9 +3554,41 @@ VteTerminalPrivate::DECRQPSR(vte::parser::Sequence const& seq)
 {
         /*
          * DECRQPSR - request-presentation-state-report
+         * Requests a report of the terminal state, that can later
+         * be restored with DECRSPS.
          *
-         * Probably not worth implementing.
+         * References: VT525
          */
+
+        switch (seq.collect1(0)) {
+        case -1:
+        case 0:
+                /* Error; ignore request */
+                break;
+
+        case 1:
+                /* Cursor information report. This contains:
+                 *   - the cursor position, including character attributes and
+                 *     character protection attribute,
+                 *   - origin mode (DECOM),
+                 *   - the character sets designated to the G0, G1, G2, and G3 sets.
+                 *
+                 * Reply: DECCIR
+                 *   DATA: the report in a unspecified format
+                 *         See WY370 for a possible format to use.
+                 */
+                break;
+
+        case 2:
+                /* Tabstop report.
+                 *
+                 * Reply: DECTABSR
+                 */
+                break;
+
+        default:
+                break;
+        }
 }
 
 void
@@ -3045,11 +3647,11 @@ VteTerminalPrivate::DECRQSS(vte::parser::Sequence const& seq)
                 else
                         return reply(seq, VTE_REPLY_DECRPSS, {0}, {VTE_REPLY_DECSTBM, {}});
 
-        /* case VTE_CMD_DECAC: */
-        /* case VTE_CMD_DECARR: */
-        /* case VTE_CMD_DECATC: */
-        /* case VTE_CMD_DECCRTST: */
-        /* case VTE_CMD_DECDLDA: */
+        case VTE_CMD_DECAC:
+        case VTE_CMD_DECARR:
+        case VTE_CMD_DECATC:
+        case VTE_CMD_DECCRTST:
+        case VTE_CMD_DECDLDA:
         case VTE_CMD_DECSACE:
         case VTE_CMD_DECSASD:
         case VTE_CMD_DECSCA:
@@ -3059,25 +3661,25 @@ VteTerminalPrivate::DECRQSS(vte::parser::Sequence const& seq)
         case VTE_CMD_DECSCS:
         case VTE_CMD_DECSDDT:
         case VTE_CMD_DECSDPT:
-        /* case VTE_CMD_DECSEST: */
+        case VTE_CMD_DECSEST:
         case VTE_CMD_DECSFC:
         case VTE_CMD_DECSKCV:
         case VTE_CMD_DECSLCK:
         case VTE_CMD_DECSLPP:
-        /* case VTE_CMD_DECSLRM: */
+        case VTE_CMD_DECSLRM:
         case VTE_CMD_DECSMBV:
         case VTE_CMD_DECSNLS:
-        /* case VTE_CMD_DECSPMA: */
+        case VTE_CMD_DECSPMA:
         case VTE_CMD_DECSPP:
         case VTE_CMD_DECSPPCS:
         case VTE_CMD_DECSPRTT:
         case VTE_CMD_DECSSCLS:
         case VTE_CMD_DECSSDT:
         case VTE_CMD_DECSSL:
-        /* case VTE_CMD_DECSTGLT: */
+        case VTE_CMD_DECSTGLT:
         case VTE_CMD_DECSTRL:
         case VTE_CMD_DECSWBV:
-        /* case VTE_CMD_DECSZS: */
+        case VTE_CMD_DECSZS:
         case VTE_CMD_DECTME:
         case VTE_CMD_SGR:
         default:
@@ -3090,12 +3692,45 @@ VteTerminalPrivate::DECRQTSR(vte::parser::Sequence const& seq)
 {
         /*
          * DECRQTSR - request-terminal-state-report
+         * Requests a report of the terminal state, that can later
+         * be restored by DECRSTS.
          *
          * References: VT525
          */
 
-        if (seq.collect1(0) != 1)
-                return;
+        switch (seq.collect1(0)) {
+        case -1:
+        case 0:
+                /* Ignore */
+                break;
+
+        case 1:
+                /* Terminal state report.
+                 *
+                 * Reply: DECTSR
+                 *   DATA: the report in an unspecified format
+                 */
+                /* return reply(seq, VTE_REPLY_DECTSR, {1}, "FIXME"); */
+                break;
+
+        case 2:
+                /* Color table report.
+                 *
+                 * Arguments:
+                 *   args[1]: color coordinate system
+                 *     0: invalid
+                 *     1: HLS (0…360, 0…100, 0…100)
+                 *     2: RGB (0…100, 0…100, 0…100) (yes, really!)
+                 *
+                 * Reply: DECTSR
+                 *   DATA: the report
+                 */
+                /* return reply(seq, VTE_REPLY_DECTSR, {2}, "FIXME"); */
+                break;
+
+        default:
+                break;
+        }
 }
 
 void
@@ -3103,9 +3738,16 @@ VteTerminalPrivate::DECRQUPSS(vte::parser::Sequence const& seq)
 {
         /*
          * DECRQUPSS - request-user-preferred-supplemental-set
+         * Requests the user-preferred supplemental set.
+         *
+         * Reply: DECAUPSS
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
+
+        // FIXMEchpe send a dummy reply?
 }
 
 void
@@ -3113,9 +3755,28 @@ VteTerminalPrivate::DECRSPS(vte::parser::Sequence const& seq)
 {
         /*
          * DECRSPS - restore presentation state
+         * Restores terminal state from a DECRQPSR response.
          *
          * References: VT525
          */
+
+        switch (seq.collect1(0)) {
+        case -1:
+        case 0:
+                /* Error; ignore */
+                break;
+
+        case 1:
+                /* Cursor information report*/
+                break;
+
+        case 2:
+                /* Tabstop report */
+                break;
+
+        default:
+                break;
+        }
 }
 
 void
@@ -3123,9 +3784,28 @@ VteTerminalPrivate::DECRSTS(vte::parser::Sequence const& seq)
 {
         /*
          * DECRSTS - restore terminal state
+         * Restore terminal state from a DECRQTSR response.
          *
          * References: VT525
          */
+
+        switch (seq.collect1(0)) {
+        case -1:
+        case 0:
+                /* Ignore */
+                break;
+
+        case 1:
+                /* Terminal state report */
+                break;
+
+        case 2:
+                /* Color table report */
+                break;
+
+        default:
+                break;
+        }
 }
 
 void
@@ -3133,8 +3813,23 @@ VteTerminalPrivate::DECSACE(vte::parser::Sequence const& seq)
 {
         /*
          * DECSACE - select-attribute-change-extent
+         * Selects which positions a rectangle command (DECCARA, DECCRA,
+         * DECERA, DECFRA, DECRARA, DECSERA) affects.
          *
-         * Probably not worth implementing.
+         * Arguments:
+         *   args[0]:
+         *     0, 1: the stream of positions beginning at the
+         *           (top, left) and ending at the (bottom, right)
+         *           position
+         *     2: the positions in the rectangle with corners
+         *        (top, left) and (bottom, right)
+         *
+         * Defaults;
+         *   args[0]: 0
+         *
+         * References: VT525
+         *
+         * Not worth implementing unless we implement all the rectangle functions.
          */
 }
 
@@ -3143,6 +3838,17 @@ VteTerminalPrivate::DECSASD(vte::parser::Sequence const& seq)
 {
         /*
          * DECSASD - select-active-status-display
+         * Selects between main screen and status line.
+         *
+         * Arguments:
+         *   args[0]:
+         *     0: main screen
+         *     1: status line
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3176,7 +3882,15 @@ void
 VteTerminalPrivate::DECSCA(vte::parser::Sequence const& seq)
 {
         /*
-         * DECSCA - select-character-protection-attribute
+         * DECSCA - select character protection attribute
+         * Sets whether characters inserted are protected or not.
+         * Protected characters will not be erased by DECSED or DECSEL.
+         * SGR attributes are unchanged.
+         *
+         * Arguments:
+         *   args[0]:
+         *     0, 2: not protected
+         *     1: protected
          *
          * Defaults:
          *   args[0]: 0
@@ -3227,6 +3941,8 @@ VteTerminalPrivate::DECSCL(vte::parser::Sequence const& seq)
          * Defaults:
          *   args[0]: 64
          *   args[1]: 0
+         *
+         * References: VT525
          */
 #if 0
         unsigned int level = 64, bit = 0;
@@ -3261,6 +3977,8 @@ VteTerminalPrivate::DECSCP(vte::parser::Sequence const& seq)
         /*
          * DECSCP - select-communication-port
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -3281,7 +3999,9 @@ VteTerminalPrivate::DECSCPP(vte::parser::Sequence const& seq)
          * Defaults:
          *   args[0]: 0
          *
-         * TODO: implement
+         * References: VT525
+         *
+         * FIXMEchpe: implement this instead of deprecated DECCOLM
          */
 }
 
@@ -3291,6 +4011,8 @@ VteTerminalPrivate::DECSCS(vte::parser::Sequence const& seq)
         /*
          * DECSCS - select-communication-speed
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -3333,6 +4055,8 @@ VteTerminalPrivate::DECSDDT(vte::parser::Sequence const& seq)
         /*
          * DECSDDT - select-disconnect-delay-time
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -3343,6 +4067,8 @@ VteTerminalPrivate::DECSDPT(vte::parser::Sequence const& seq)
         /*
          * DECSDPT - select-digital-printed-data-type
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -3396,6 +4122,52 @@ VteTerminalPrivate::DECSERA(vte::parser::Sequence const& seq)
 {
         /*
          * DECSERA - selective-erase-rectangular-area
+         * Selectively erases characters in the specified rectangle,
+         * replacing them with SPACE (2/0). Character attributes,
+         * protection attribute (DECSCA) and line attributes (DECDHL,
+         * DECDWL) are unchanged.
+         *
+         * Arguments;
+         *   args[0..3]: top, left, bottom, right of the source rectangle (1-based)
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         *   args[2]: height of current page
+         *   args[3]: width of current page
+         *
+         * If the top > bottom or left > right the command is ignored.
+         *
+         * These coordinates are interpreted according to origin mode (DECOM),
+         * but unaffected by the page margins (DECSLRM?). Current SGR defaults
+         * and cursor position are unchanged.
+         *
+         * Note: DECSACE selects whether this function operates on the
+         * rectangular area or the data stream between the star and end
+         * positions.
+         *
+         * References: VT525
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::DECSEST(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECSEST - energy saver time
+         * Sets the enerty saver timer. When DECCRTSM is set, the
+         * screen switches to suspend mode when the time elapsed
+         * since the last keystroke or output is greater than the
+         * time set here.
+         *
+         * Arguments:
+         *   args[0]: the time in minutes (0…60) (0 = never)
+         *
+         * Default: 15
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3407,11 +4179,12 @@ VteTerminalPrivate::DECSFC(vte::parser::Sequence const& seq)
         /*
          * DECSFC - select-flow-control
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
 
-
 void
 VteTerminalPrivate::DECSIXEL(vte::parser::Sequence const& seq)
 {
@@ -3427,6 +4200,18 @@ VteTerminalPrivate::DECSKCV(vte::parser::Sequence const& seq)
 {
         /*
          * DECSKCV - set-key-click-volume
+         * Sets the key click volume.
+         *
+         * Arguments:
+         *   args[0]: the volume setting
+         *     0, 5…8: high
+         *     1: off
+         *     2…4: low
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3437,6 +4222,9 @@ VteTerminalPrivate::DECSLCK(vte::parser::Sequence const& seq)
 {
         /*
          * DECSLCK - set-lock-key-style
+         * Allow host control of the CapsLock key
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3448,6 +4236,8 @@ VteTerminalPrivate::DECSLE(vte::parser::Sequence const& seq)
         /*
          * DECSLE - select-locator-events
          *
+         * References: VT330
+         *
          * TODO: implement
          */
 }
@@ -3457,30 +4247,74 @@ VteTerminalPrivate::DECSLPP(vte::parser::Sequence const& seq)
 {
         /*
          * DECSLPP - set-lines-per-page
-         * Set the number of lines used for the page. @args[0] specifies the
-         * number of lines to be used. DEC only allows a limited number of
-         * choices, however, we allow all integers. 0 is equivalent to 24.
+         * Set the number of lines per page.
+         *
+         * Arguments:
+         *   args[0]: the number of lines per page
          *
          * Defaults:
-         *   args[0]: 0
+         *   args[0]: 0 (meaning 24)
          *
-         * TODO: implement
+         * Note that VT525 only allows a limited number of choices,
+         * (24, 25, 36, 41, 42, 48, 52, 53, 72); VTE is not so limited
+         * and supports any value >= 24.
+         *
+         * Top and bottom scrolling margins are unaffected, unless their
+         * current values exceed the new page size, in which case they are
+         * reset to the default.
+         *
+         * References: VT525
          */
+
+        auto param = seq.collect1(0);
+        if (param == 0)
+                param = 24;
+        else if (param < 24)
+                return;
+
+        _vte_debug_print(VTE_DEBUG_EMULATION, "Resizing to %d rows.\n", param);
+
+        emit_resize_window(m_column_count, param);
 }
 
 void
-VteTerminalPrivate::DECSLRM_OR_SC(vte::parser::Sequence const& seq)
+VteTerminalPrivate::DECSLRM(vte::parser::Sequence const& seq)
 {
         /*
-         * DECSLRM_OR_SC - set-left-and-right-margins or save-cursor
+         * DECSLRM - set left and right margins
+         * Sets the left and right margins of the scrolling region.
+         * This is only applicable if the vertical split-screen mode
+         * (DECLRMM) is set.
+         *
+         * Arguments:
+         *   args[0]: left margin
+         *   args[1]: right margin
+         *
+         * Default:
+         *   args[0]: 1
+         *   args[2]: page width
+         *
+         * If left > right, the command is ignored.
+         * The maximum of right is the page size (set with DECSCPP);
+         * the minimum size of the scrolling region is 2 columns.
          *
-         * TODO: Detect save-cursor and run it. DECSLRM is not worth
-         *       implementing.
+         * Homes to cursor to (1,1) of the page (scrolling region?).
          *
          * References: VT525
+         *
+         * Note: There is a conflict between SCOSC and DECSLRM that both
+         * have final character 's' (7/3). SCOSC has 0 parameters, and
+         * DECSLRM has 2 parameters which both have default values, and
+         * my reading of ECMA-48 § 5.4.2h says that this allows for an
+         * empty parameter string to represent them.
+         *
+         * We could either fudge it by dispatching zero params to SCOSC
+         * and anything else to DECSLRM, or, since we already implement
+         * DECSC/DECRC, we can just drop support for the extra SCOSC/SCORC.
+         * Do the latter.
+         *
+         * FIXMEchpe: Consider implementing this.
          */
-
-        save_cursor();
 }
 
 void
@@ -3488,6 +4322,18 @@ VteTerminalPrivate::DECSMBV(vte::parser::Sequence const& seq)
 {
         /*
          * DECSMBV - set-margin-bell-volume
+         * Sets the margin bell volume.
+         *
+         * Arguments:
+         *   args[0]: the volume setting
+         *     0, 1: off
+         *     2…4: low
+         *     5…8: high
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3498,6 +4344,11 @@ VteTerminalPrivate::DECSMKR(vte::parser::Sequence const& seq)
 {
         /*
          * DECSMKR - select-modifier-key-reporting
+         * Make modifier keys send extended keyboard reports (DECEKBD)
+         * when pressed or released in key position mode (DECKPM).
+         * [...]
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3508,8 +4359,32 @@ VteTerminalPrivate::DECSNLS(vte::parser::Sequence const& seq)
 {
         /*
          * DECSNLS - set-lines-per-screen
+         * Sets the number of lines per screen.
+         * DEC only supports 26, 42, 53 lines here; but VTE has no
+         * such restriction.
          *
-         * Probably not worth implementing.
+         * Arguments:
+         *   args[0]: the number of lines
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: VT525
+         *
+         * FIXMEchpe: implement this
+         */
+}
+
+void
+VteTerminalPrivate::DECSPMA(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECSPMA - session page memory allocation
+         * Allocate pages of 25 lines to each session.
+         *
+         * References: VT525
+         *
+         * VTE does not support sessions.
          */
 }
 
@@ -3518,6 +4393,10 @@ VteTerminalPrivate::DECSPP(vte::parser::Sequence const& seq)
 {
         /*
          * DECSPP - set-port-parameter
+         * Sets parameters for the communications or printer port.
+         * [...]
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3528,6 +4407,9 @@ VteTerminalPrivate::DECSPPCS(vte::parser::Sequence const& seq)
 {
         /*
          * DECSPPCS - select-pro-printer-character-set
+         * [...]
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3538,6 +4420,9 @@ VteTerminalPrivate::DECSPRTT(vte::parser::Sequence const& seq)
 {
         /*
          * DECSPRTT - select-printer-type
+         * [...]
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3548,8 +4433,22 @@ VteTerminalPrivate::DECSR(vte::parser::Sequence const& seq)
 {
         /*
          * DECSR - secure-reset
+         * Hard reset, with confirmation.
+         * Like RIS, but the terminal replies with the token.
+         * [long list of things this resets]
          *
-         * Probably not worth implementing.
+         * Arguments:
+         *   args[0]: a token
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * Reply: DECSRC
+         *   args[0]: the token
+         *
+         * References: VT525
+         *
+         * FIXMEchpe: implement this
          */
 }
 
@@ -3558,6 +4457,9 @@ VteTerminalPrivate::DECSRFR(vte::parser::Sequence const& seq)
 {
         /*
          * DECSRFR - select-refresh-rate
+         * [...]
+         *
+         * References: VT510
          *
          * Probably not worth implementing.
          */
@@ -3568,6 +4470,9 @@ VteTerminalPrivate::DECSSCLS(vte::parser::Sequence const& seq)
 {
         /*
          * DECSSCLS - set-scroll-speed
+         * [...]
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3578,8 +4483,20 @@ VteTerminalPrivate::DECSSDT(vte::parser::Sequence const& seq)
 {
         /*
          * DECSSDT - select-status-display-line-type
+         * Sets the type of status line shown.
          *
-         * Probably not worth implementing.
+         * Arguments:
+         *   args[0]: the type
+         *     0: no status line
+         *     1: indicator status line
+         *     2: host-writable status line
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: VT525
+         *
+         * Not worth implementing.
          */
 }
 
@@ -3589,7 +4506,17 @@ VteTerminalPrivate::DECSSL(vte::parser::Sequence const& seq)
         /*
          * DECSSL - select-setup-language
          *
-         * Probably not worth implementing.
+         * Selects set-up language
+         *
+         * References: VT525
+         *
+         * VTE does not implement a set-up.
+         *
+         * or:
+         *
+         * WYDRBX - draw a box
+         *
+         * References: WY370
          */
 }
 
@@ -3617,17 +4544,18 @@ VteTerminalPrivate::DECSTBM(vte::parser::Sequence const& seq)
 {
         /*
          * DECSTBM - set-top-and-bottom-margins
-         * This control function sets the top and bottom margins for the current
-         * page. You cannot perform scrolling outside the margins.
-         *
-         * @args[0] defines the top margin, @args[1] defines the bottom margin.
-         * The bottom margin must be lower than the top-margin.
-         *
-         * This call resets the cursor position to (1,1).
+         * Sets the top and bottom scrolling margins.
+         * Arguments:
+         *   args[0]: the top margin
+         *   args[1]: the bottom margin
          *
          * Defaults:
          *   args[0]: 1
-         *   args[1]: number of lines in screen
+         *   args[1]: number of lines
+         *
+         * If top > bottom, the command is ignored.
+         * The maximum size of the scrolling region is the whole page.
+         * Homes the cursor to position (1,1) (of the scrolling region?).
          *
          * References: VT525 5–149
          */
@@ -3696,17 +4624,43 @@ VteTerminalPrivate::DECSTBM(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::DECSTGLT(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECSTGLT - select color lookup table
+         * Selects color mapping.
+         *
+         * Arguments:
+         *   args[0]: mode
+         *     0: Text colors are shown in monochrome or grey levels
+         *     1: Text attributes (bold, blink, reverse, (single) underline,
+         *        and any combinations thereof) are shown with alternate
+         *        colors (defined by set-up), plus the attribute
+         *     2: Like 1, but attributes are only represented by the color
+         *     3: Text color as specified by SGR, and attributes
+         *        as specified.
+         *
+         * Defaults:
+         *   args[0]: 3
+         *
+         * Set-up default: 3
+         *
+         * References: VT525
+         *
+         * Maybe worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::DECSTR(vte::parser::Sequence const& seq)
 {
         /*
          * DECSTR - soft-terminal-reset
          * Perform a soft reset to the default values.
+         * [list of default values]
          *
          * References: VT525
          */
-#if 0
-        vte_screen_soft_reset(screen);
-#endif
 
        reset(false, false);
 }
@@ -3717,6 +4671,8 @@ VteTerminalPrivate::DECSTRL(vte::parser::Sequence const& seq)
         /*
          * DECSTRL - set-transmit-rate-limit
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
@@ -3726,8 +4682,11 @@ VteTerminalPrivate::DECSTUI(vte::parser::Sequence const& seq)
 {
         /*
          * DECSTUI - set terminal unit ID
+         * Sets the terminal unit ID that DA3 reports.
          *
          * References: VT525
+         *
+         * VTE does not implement this.
          */
 }
 
@@ -3736,6 +4695,18 @@ VteTerminalPrivate::DECSWBV(vte::parser::Sequence const& seq)
 {
         /*
          * DECSWBV - set-warning-bell-volume
+         * Sets the warning bell volume.
+         *
+         * Arguments:
+         *   args[0]: the volume setting
+         *     0, 5…8: high
+         *     1: off
+         *     2…4: low
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3747,15 +4718,44 @@ VteTerminalPrivate::DECSWL(vte::parser::Sequence const& seq)
         /*
          * DECSWL - single-width-single-height-line
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
 
 void
+VteTerminalPrivate::DECSZS(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECSZS - select zero symbol
+         * Selects the zero glyph shape.
+         *
+         * Aguments:
+         *   args[0]: shape
+         *     0: oval zero
+         *     1: zero with slash
+         *     2: zero with dot
+         *
+         * Default:
+         *  args[0]: 0
+         *
+         * References: VT525
+         *
+         * Maybe worth implementing; could use the opentype "zero" feature
+         * to get the slashed zero.
+         */
+}
+
+void
 VteTerminalPrivate::DECTID(vte::parser::Sequence const& seq)
 {
         /*
          * DECTID - select-terminal-id
+         * Selects the response to DA1.
+         * [...]
+         *
+         * References: VT525
          *
          * Probably not worth implementing.
          */
@@ -3766,8 +4766,14 @@ VteTerminalPrivate::DECTME(vte::parser::Sequence const& seq)
 {
         /*
          * DECTME - terminal-mode-emulation
+         * Selects the terminal emulation mode.
+         * Available values are various VTxxx, Wyse, TVI, ADDS, SCO
+         * terminals.
+         * Changing the emulation mode effects a soft reset.
          *
-         * Probably not worth implementing.
+         * References: VT525
+         *
+         * Not worth implementing.
          */
 }
 
@@ -3776,8 +4782,15 @@ VteTerminalPrivate::DECTST(vte::parser::Sequence const& seq)
 {
         /*
          * DECTST - invoke-confidence-test
+         * Executes self-tests.
          *
-         * Probably not worth implementing.
+         * Arguments:
+         *   args[0]: 4
+         *   args[1]: which test to perform
+         *
+         * References: VT525
+         *
+         * Not worth implementing.
          */
 }
 
@@ -3786,8 +4799,23 @@ VteTerminalPrivate::DECUDK(vte::parser::Sequence const& seq)
 {
         /*
          * DECUDK - user define keys
+         * Loads key definitions.
          *
          * References: VT525
+         *
+         * For security reasons, VTE does not implement this.
+         */
+}
+
+void
+VteTerminalPrivate::DECUS(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECUS - update session
+         *
+         * References: VT525
+         *
+         * VTE does not support sessions.
          */
 }
 
@@ -3796,6 +4824,13 @@ VteTerminalPrivate::DL(vte::parser::Sequence const& seq)
 {
         /*
          * DL - delete-line
+         * Delete lines starting from the active line (presentation).
+         *
+         * This function is affected by the DCSM, TSM and VEM modes,
+         * and the SLH and SEE functions.
+         *
+         * Arguments:
+         *  args[0]: number of lines to delete
          *
          * Defaults:
          *   args[0]: 1
@@ -3820,6 +4855,32 @@ VteTerminalPrivate::DL(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::DLE(vte::parser::Sequence const& seq)
+{
+        /*
+         * DLE - data link escape
+         * Supplementary transmission control functions.
+         *
+         * References: ECMA-48 § 8.3.33
+         *             ISO 1745
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::DMI(vte::parser::Sequence const& seq)
+{
+        /*
+         * DMI - disable manual input
+         *
+         * References: ECMA-48 § 8.3.34
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::DOCS(vte::parser::Sequence const& seq)
 {
         /*
@@ -3840,6 +4901,9 @@ VteTerminalPrivate::DSR_ECMA(vte::parser::Sequence const& seq)
          *
          * Reports status, or requests a status report.
          *
+         * Arguments:
+         *   args[0]: type
+         *
          * Defaults:
          *   arg[0]: 0
          *
@@ -3867,7 +4931,7 @@ VteTerminalPrivate::DSR_ECMA(vte::parser::Sequence const& seq)
                 break;
 
         case 6:
-                /* Request extended cursor position report
+                /* Request cursor position report
                  * Reply: CPR
                  *   @arg[0]: line
                  *   @arg[1]: column
@@ -3972,7 +5036,7 @@ VteTerminalPrivate::DSR_DEC(vte::parser::Sequence const& seq)
                  *   @arg[2]: Keyboard status
                  *     0 = ready
                  *     3 = no keyboard
-                 *     8 = keyboard busy
+                 *     8 = keyboard busy (used by other session)
                  *
                  *   @arg[3]: Keyboard type
                  *     0 = LK201 (XTERM response)
@@ -4058,14 +5122,81 @@ VteTerminalPrivate::DSR_DEC(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::DTA(vte::parser::Sequence const& seq)
+{
+        /*
+         * DTA - dimension text area
+         * Set the dimension of the text area.
+         *
+         * Arguments:
+         *  args[0]:
+         *  args[1]:
+         *
+         * Defaults:
+         *   args[0]: no default
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.36
+         */
+}
+
+void
+VteTerminalPrivate::EA(vte::parser::Sequence const& seq)
+{
+        /*
+         * EA - erase in area
+         * Erase some/all character positions in the qualified area.
+         *
+         * Arguments:
+         *  args[0]: type
+         *    0 = Erase the active position and all positions to the end
+         *        of the qualified area (inclusive).
+         *    1 = Erase from the beginning of the qualified area to
+         *        the active position (inclusive).
+         *    2 = Erase all of the qualified area.
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * If ERM is set, erases only non-protected areas; if
+         * ERM is reset, erases all areas.
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.37
+         */
+
+        switch (seq.collect1(0)) {
+        case -1:
+        case 0:
+                break;
+        }
+}
+
+void
 VteTerminalPrivate::ECH(vte::parser::Sequence const& seq)
 {
         /*
          * ECH - erase-character
+         * Erase characters from the active position.
+         *
+         * DSCM mode controls whether this function operates on the
+         * presentation or data position.
+         * Also affected by ERM mode.
+         *
+         * Arguments:
+         *   args[0]: number of characters to erase
          *
          * Defaults:
          *   args[0]: 1
          *
+         * If ERM is set, erases only non-protected characters; if
+         * ERM is reset, erases all characters.
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
          * References: ECMA-48 § 8.3.38
          */
 #if 0
@@ -4093,28 +5224,120 @@ VteTerminalPrivate::ED(vte::parser::Sequence const& seq)
 {
         /*
          * ED - erase-in-display
+         * Erases characters.
+         * Line attributes of completely erased lines are reset to
+         * single-width single-height, and all character attributes
+         * are reset to default.
+         *
+         * Arguments:
+         *   args[0]: mode
+         *     0 = erase from the cursor position to the end of the screen
+         *     1 = erase from the beginning of the screen to the cursor
+         *         position (inclusive)
+         *     2 = erase display
+         *     3 = erase scrollback (XTERM extension)
          *
          * Defaults:
          *   args[0]: 0
+         *
+         * This function does not respect the scrolling margins.
+         *
+         * If ERM is set, erases only non-protected characters; if
+         * ERM is reset, erases all characters.
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.39
+         *             VT525
          */
 
         erase_in_display(seq);
 }
 
 void
+VteTerminalPrivate::EF(vte::parser::Sequence const& seq)
+{
+        /*
+         * EF - erase in field
+         * Erases characters in the active field.
+         *
+         * Arguments:
+         *   args[0]: mode
+         *    0 = Erase the active position and all positions to the end
+         *        of the field (inclusive).
+         *    1 = Erase from the beginning of the field to
+         *        the active position (inclusive).
+         *    2 = Erase all of the qualified area.
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * If ERM is set, erases only non-protected characters; if
+         * ERM is reset, erases all characters.
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.40
+         */
+}
+
+void
 VteTerminalPrivate::EL(vte::parser::Sequence const& seq)
 {
         /*
          * EL - erase-in-line
+         * Erases characters.
+         *
+         * Arguments:
+         *   args[0]: mode
+         *     0 = erase from the cursor position to the end of the line
+         *     1 = erase from the beginning of the line to the cursor
+         *         position (inclusive)
+         *     2 = erase line (FIXME: does this clear line attributes?)
          *
          * Defaults:
          *   args[0]: 0
+         *
+         * This function does not respect the scrolling margins.
+         *
+         * If ERM is set, erases only non-protected characters; if
+         * ERM is reset, erases all characters.
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.41
+         *             VT525
          */
 
         erase_in_line(seq);
 }
 
 void
+VteTerminalPrivate::EM(vte::parser::Sequence const& seq)
+{
+        /*
+         * EM - end of medium
+         *
+         * References: ECMA-48 § 8.3.42
+         */
+}
+
+void
+VteTerminalPrivate::EMI(vte::parser::Sequence const& seq)
+{
+        /*
+         * DMI - enable manual input
+         *
+         * References: ECMA-48 § 8.3.43
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::ENQ(vte::parser::Sequence const& seq)
 {
         /*
@@ -4122,24 +5345,78 @@ VteTerminalPrivate::ENQ(vte::parser::Sequence const& seq)
          * Transmit the answerback-string. If none is set, do nothing.
          *
          * References: ECMA-48 § 8.3.44
+         *             ISO 1745
          */
-#if 0
-        if (screen->answerback)
-                return screen_write(screen,
-                                    screen->answerback,
-                                    strlen(screen->answerback));
-#endif
 
         /* No-op for security reasons */
 }
 
 void
+VteTerminalPrivate::EOT(vte::parser::Sequence const& seq)
+{
+        /*
+         * EOT - end of transmission
+         *
+         * References: ECMA-48 § 8.3.45
+         *             ISO 1745
+         *
+         * Not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::EPA(vte::parser::Sequence const& seq)
 {
         /*
-         * EPA - end-of-guarded-area
+         * EPA - end of guarded area
+         * Marks the end of an area of positions (presentation)
+         * that are protected; the beginning of the area was
+         * marked by SPA.
+         *
+         * The contents of the area will be protected against
+         * alteration, transfer (depending on the GATM setting),
+         * and erasure (depending on the ERM setting).
+         *
+         * References: ECMA-48 § 8.3.46
+         */
+}
+
+void
+VteTerminalPrivate::ESA(vte::parser::Sequence const& seq)
+{
+        /*
+         * ESA - end of selected area
+         * Marks the end of an area of positions (presentation)
+         * that are selected for transfer; the beginning of the area
+         * was marked by SSA.
+         *
+         * References: ECMA-48 § 8.3.47
+         */
+}
+
+void
+VteTerminalPrivate::ETB(vte::parser::Sequence const& seq)
+{
+        /*
+         * ETB - end of transmission block
          *
-         * TODO: What is this?
+         * References: ECMA-48 § 8.3.49
+         *             ISO 1745
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::ETX(vte::parser::Sequence const& seq)
+{
+        /*
+         * ETX - end of text
+         *
+         * References: ECMA-48 § 8.3.49
+         *             ISO 1745
+         *
+         * Not worth implementing.
          */
 }
 
@@ -4148,8 +5425,7 @@ VteTerminalPrivate::FF(vte::parser::Sequence const& seq)
 {
         /*
          * FF - form-feed
-         * This causes the cursor to jump to the next line. It is treated the
-         * same as LF.
+         * This causes the cursor to jump to the next line (presentation).
          *
          * References: ECMA-48 § 8.3.51
          */
@@ -4158,6 +5434,105 @@ VteTerminalPrivate::FF(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::FNK(vte::parser::Sequence const& seq)
+{
+        /*
+         * FNK - function key
+         *
+         * Arguments:
+         *  args[0]: function key that was operated
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.52
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::FNT(vte::parser::Sequence const& seq)
+{
+        /*
+         * FNT - font selection
+         * Select the font to be used by subsequent SGR 10…19.
+         *
+         * Arguments:
+         *  args[0]: the font 0…9
+         *  args[1]: font identifier
+         *
+         * Defaults:
+         *   args[0]: 0
+         *   args[1]: 0
+         *
+         * References: ECMA-48 § 8.3.53
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::GCC(vte::parser::Sequence const& seq)
+{
+        /*
+         * GCC - graphic character combination
+         * Two or more graphic characters that follow should be
+         * imaged as one symbol.
+         *
+         * Arguments:
+         *  args[0]: mode
+         *    0 = Combine the following two graphic characters
+         *    1 = Start of string of characters to be combined
+         *    2 = End of string of characters to be combined
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.54
+         *             ECMA-43 Annex C
+         */
+}
+
+void
+VteTerminalPrivate::GSM(vte::parser::Sequence const& seq)
+{
+        /*
+         * GSM - graphic size modification
+         *
+         * Arguments:
+         *  args[0]: height as percentage of height set by GSS
+         *  args[1]: width as percentage of width set by GSS
+         *
+         * Defaults:
+         *   args[0]: 100
+         *   args[0]: 100
+         *
+         * References: ECMA-48 § 8.3.55
+         *
+         * Not applicable to VTE.
+         */
+}
+
+void
+VteTerminalPrivate::GSS(vte::parser::Sequence const& seq)
+{
+        /*
+         * GSM - graphic size selection
+         *
+         * Arguments:
+         *  args[0]: size in the unit set by SSU
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.56
+         *
+         * Not applicable to VTE.
+         */
+}
+
+void
 VteTerminalPrivate::GnDm(vte::parser::Sequence const& seq)
 {
         /*
@@ -4169,7 +5544,7 @@ VteTerminalPrivate::GnDm(vte::parser::Sequence const& seq)
          *             ISO 2375 IR
          */
 
-        /* Since we don't implement ISO-2022 anymore, we can mostly ignore this. */
+        /* Since we mostly don't implement ECMA-35 anymore, we can mostly ignore this. */
 
         VteCharacterReplacement replacement;
         switch (seq.charset()) {
@@ -4211,27 +5586,25 @@ VteTerminalPrivate::GnDMm(vte::parser::Sequence const& seq)
          *             ISO 2375 IR
          */
 
-        /* Since we don't implement ISO-2022 anymore, we can ignore this */
+        /* Since we mostly don't implement ECMA-35 anymore, we can ignore this */
 }
 
 void
 VteTerminalPrivate::HPA(vte::parser::Sequence const& seq)
 {
         /*
-         * HPA - horizontal-position-absolute
-         * HPA causes the active position to be moved to the n-th horizontal
-         * position of the active line. If an attempt is made to move the active
-         * position past the last position on the line, then the active position
-         * stops at the last position on the line.
-         *
-         * @args[0] defines the horizontal position. 0 is treated as 1.
+         * HPA - horizontal position absolute
+         * Move the active position (data) to the position specified by @args[0]
+         * in the active line.
          *
-         * Note: This does the same as CHA
+         * Arguments:
+         *   args[0]: position (data)
          *
          * Defaults:
          *   args[0]: 1
          *
          * References: ECMA-48 § 8.3.57
+         *             VT525
          */
 
 #if 0
@@ -4249,19 +5622,39 @@ VteTerminalPrivate::HPA(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::HPB(vte::parser::Sequence const& seq)
+{
+        /*
+         * HPA - horizontal position backward
+         * Move the active position (data) to the backward by @args[0] positions
+         * in the active line.
+         *
+         * Arguments:
+         *   args[0]: number of positions to move
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.58
+         */
+}
+
+void
 VteTerminalPrivate::HPR(vte::parser::Sequence const& seq)
 {
         /*
          * HPR - horizontal-position-relative
-         * HPR causes the active position to be moved to the n-th following
-         * horizontal position of the active line. If an attempt is made to move
-         * the active position past the last position on the line, then the
-         * active position stops at the last position on the line.
+         * Move the active position (data) to the foward by @args[0] positions
+         * in the active line.
          *
-         * @args[0] defines the horizontal position. 0 is treated as 1.
+         * Arguments:
+         *   args[0]: number of positions to move
          *
          * Defaults:
          *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.59
+         *             VT525
          */
 #if 0
         unsigned int num = 1;
@@ -4278,12 +5671,33 @@ void
 VteTerminalPrivate::HT(vte::parser::Sequence const& seq)
 {
         /*
-         * HT - horizontal-tab
-         * Moves the cursor to the next tab stop. If there are no more tab
-         * stops, the cursor moves to the right margin. HT does not cause text
-         * to auto wrap.
+         * HT - character tabulation
+         * Move the active position (presentation) to the next tab stop.
+         * If there are no more tab stops, the cursor moves to the right
+         * margin. Does not cause text to auto wrap.
+         *
+         * (If that next tabstop was set by TAC, TALE, TATE or TCC,
+         * the properties of that tabstop will determine how subsequently
+         * inserted text is positioned.)
          *
          * References: ECMA-48 § 8.3.60
+         *             VT525
+         */
+#if 0
+        screen_cursor_clear_wrap(screen);
+#endif
+
+        move_cursor_tab_forward();
+}
+
+void
+VteTerminalPrivate::HTJ(vte::parser::Sequence const& seq)
+{
+        /*
+         * HTJ - character tabulation with justification
+         *
+         * References: ECMA-48 § 8.3.61
+         *             VT525
          */
 #if 0
         screen_cursor_clear_wrap(screen);
@@ -4297,12 +5711,12 @@ VteTerminalPrivate::HTS(vte::parser::Sequence const& seq)
 {
         /*
          * HTS - horizontal-tab-set
-         * XXX
+         * Set a tabstop at the active position (presentation).
          *
-         * Executing an HTS does not effect the other horizontal tab stop
-         * settings.
+         * Affected by TSM mode.
          *
          * References: ECMA-48 § 8.3.62
+         *             VT525
          */
 
         m_tabstops.set(m_screen->cursor.col);
@@ -4313,13 +5727,20 @@ VteTerminalPrivate::HVP(vte::parser::Sequence const& seq)
 {
         /*
          * HVP - horizontal-and-vertical-position
-         * XXX
+         * Sets the active position (data)
+         *
+         * Arguments:
+         *   args[0]: the line
+         *   args[1]: the column
          *
          * Defaults:
          *   args[0]: 1
          *   args[1]: 1
          *
-         * References: ECMA-48 FIXME
+         * If DECOM is set, the position is relative to the top/bottom
+         * margins, and may not be outside it.
+         *
+         * References: ECMA-48 § 8.3.63
          *             VT525
          */
 
@@ -4331,12 +5752,21 @@ VteTerminalPrivate::ICH(vte::parser::Sequence const& seq)
 {
         /*
          * ICH - insert-character
-         * XXX
+         * Inserts SPACE (2/0) character(s) at the cursor position.
+         *
+         * Arguments:
+         *   args[0]: the number of characters to insert
          *
          * Defaults:
          *   args[0]: 1
          *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+
+         * Also affected by HEM mode, and the SLH, and SEE functions.
+         *
          * References: ECMA-48 §8.3.64
+         *             VT525
          */
 #if 0
         unsigned int num = 1;
@@ -4361,15 +5791,64 @@ VteTerminalPrivate::ICH(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::IDCS(vte::parser::Sequence const& seq)
+{
+        /*
+         * IDCS - identify device control string
+         *
+         * Arguments:
+         *   args[0]: mode
+         *     1 = reserved for use with SRTM mode
+         *     2 = reservewd for DRCS according to ECMA-35
+
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.65
+         */
+}
+
+void
+VteTerminalPrivate::IGS(vte::parser::Sequence const& seq)
+{
+        /*
+         * IGS - identify graphic subrepertoire
+         * Specifies a repertoire of graphic characters to be used
+         * in the following text.
+         *
+         * Arguments:
+         *   args[0]: identifier from ISO 7350 registry
+
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.66
+         *             ISO/IEC 7350
+         *             ISO/IEC 10367
+         *
+         * Not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::IL(vte::parser::Sequence const& seq)
 {
         /*
          * IL - insert-line
-         * XXX
+         * Insert (a) blank line(s) at the active position.
+         *
+         * Arguments:
+         *   args[0]: the number of lines
          *
          * Defaults:
          *   args[0]: 1
          *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * Also affected by the TSM and VEM modes,
+         * and the SLH and SEE functions.
+         *
          * References: ECMA-48 § 8.3.67
          */
 #if 0
@@ -4403,6 +5882,16 @@ VteTerminalPrivate::IND(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::INT(vte::parser::Sequence const& seq)
+{
+        /*
+         * INT - interrupt
+         *
+         * References: ECMA-48 § 8.3.68
+         */
+}
+
+void
 VteTerminalPrivate::IRR(vte::parser::Sequence const& seq)
 {
         /*
@@ -4413,7 +5902,59 @@ VteTerminalPrivate::IRR(vte::parser::Sequence const& seq)
          * Probably not worth implementing.
          */
 
-        /* Since we don't implement ISO-2022 anymore, we can ignore this */
+        /* Since we mostly don't implement ECMA-35 anymore, we can ignore this */
+}
+
+void
+VteTerminalPrivate::IS1(vte::parser::Sequence const& seq)
+{
+        /*
+         * IS1 - information separator 1 / unit separator (US)
+         *
+         * References: ECMA-48 § 8.3.69, § 8.2.10
+         */
+}
+
+void
+VteTerminalPrivate::IS2(vte::parser::Sequence const& seq)
+{
+        /*
+         * IS2 - information separator 2 / record separator (RS)
+         *
+         * References: ECMA-48 § 8.3.70, § 8.2.10
+         */
+}
+
+void
+VteTerminalPrivate::IS3(vte::parser::Sequence const& seq)
+{
+        /*
+         * IS3 - information separator 3 / group separator (GS)
+         *
+         * References: ECMA-48 § 8.3.71, § 8.2.10
+         */
+}
+
+void
+VteTerminalPrivate::IS4(vte::parser::Sequence const& seq)
+{
+        /*
+         * IS4 - information separator 4 / file separator (FS)
+         *
+         * References: ECMA-48 § 8.3.72, § 8.2.10
+         */
+}
+
+void
+VteTerminalPrivate::JFY(vte::parser::Sequence const& seq)
+{
+        /*
+         * JFY - justify
+         *
+         * References: ECMA-48 § 8.3.73
+         *
+         * Probably not worth implementing.
+         */
 }
 
 void
@@ -4421,8 +5962,7 @@ VteTerminalPrivate::LF(vte::parser::Sequence const& seq)
 {
         /*
          * LF - line-feed
-         * Causes a line feed or a new line operation, depending on the setting
-         * of line feed/new line mode.
+         * XXXX
          *
          * References: ECMA-48 § 8.3.74
          */
@@ -4437,6 +5977,44 @@ VteTerminalPrivate::LF(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::LS0(vte::parser::Sequence const& seq)
+{
+        /*
+         * LS0 -locking shift 0 (8 bit)
+         * SI - shift-in (7 bit)
+         *
+         * Map G0 into GL.
+         *
+         * References: ECMA-35 § 9.3.1
+         *             ECMA-48 § 8.3.75, 8.3.119
+         */
+#if 0
+        screen->state.gl = &screen->g0;
+#endif
+
+        set_character_replacement(0);
+}
+
+void
+VteTerminalPrivate::LS1(vte::parser::Sequence const& seq)
+{
+        /*
+         * LS1 -locking shift 1 (8 bit)
+         * SO - shift-out (7 bit)
+         *
+         * Map G1 into GL.
+         *
+         * References: ECMA-35 § 9.3.1
+         *             ECMA-48 § 8.3.76, 8.3.126
+         */
+#if 0
+        screen->state.gl = &screen->g1;
+#endif
+
+        set_character_replacement(1);
+}
+
+void
 VteTerminalPrivate::LS1R(vte::parser::Sequence const& seq)
 {
         /*
@@ -4513,10 +6091,13 @@ VteTerminalPrivate::LS3R(vte::parser::Sequence const& seq)
 }
 
 void
-VteTerminalPrivate::MC_ANSI(vte::parser::Sequence const& seq)
+VteTerminalPrivate::MC_ECMA(vte::parser::Sequence const& seq)
 {
         /*
-         * MC_ANSI - media-copy-ansi
+         * MC_ECMA - media-copy-ecma
+         *
+         * References: ECMA-48 § 8.3.82
+         *             VT525
          *
          * Probably not worth implementing.
          */
@@ -4528,16 +6109,56 @@ VteTerminalPrivate::MC_DEC(vte::parser::Sequence const& seq)
         /*
          * MC_DEC - media-copy-dec
          *
+         * References: VT525
+         *
          * Probably not worth implementing.
          */
 }
 
 void
+VteTerminalPrivate::MW(vte::parser::Sequence const& seq)
+{
+        /*
+         * MW - message waiting
+         *
+         * References: ECMA-48 § 8.3.83
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::NAK(vte::parser::Sequence const& seq)
+{
+        /*
+         * NAK - negative acknowledge
+         *
+         * References: ECMA-48 § 8.3.84
+         *             ISO 1745
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::NBH(vte::parser::Sequence const& seq)
+{
+        /*
+         * BPH - no break permitted here
+         *
+         * References: ECMA-48 § 8.3.85
+         *
+         * Not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::NEL(vte::parser::Sequence const& seq)
 {
         /*
          * NEL - next-line
-         * XXX
+         * Moves the cursor to the first column in the next line.
+         * If the cursor is on the bottom margin, this scrolls up.
          *
          * References: ECMA-48 § 8.3.86
          */
@@ -4556,12 +6177,19 @@ VteTerminalPrivate::NP(vte::parser::Sequence const& seq)
 {
         /*
          * NP - next-page
-         * XXX
+         * Move cursor to home on the next page (presentation).
+         * (Ignored if there is only one page.)
+         *
+         * Arguments:
+         *   args[0]: number of pages to move forward
          *
          * Defaults:
          *   args[0]: 1
          *
-         * Probably not worth implementing. We only support a single page.
+         * References: ECMA-48 § 8.3.87
+         *             VT525
+         *
+         * Since VTE only has one page, this is ignored.
          */
 }
 
@@ -4569,6 +6197,9 @@ void
 VteTerminalPrivate::NUL(vte::parser::Sequence const& seq)
 {
         /*
+         * NUL - nothing
+         *
+         * References: ECMA-48 § 8.3.88
          */
 }
 
@@ -4722,16 +6353,71 @@ VteTerminalPrivate::OSC(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::PEC(vte::parser::Sequence const& seq)
+{
+        /*
+         * PEC - presentation expand or contract
+         *
+         * References: ECMA-48 § 8.3.90
+         *
+         * Not applicable in VTE.
+         */
+}
+
+void
+VteTerminalPrivate::PFS(vte::parser::Sequence const& seq)
+{
+        /*
+         * PFS - page format selection
+         *
+         * References: ECMA-48 § 8.3.91
+         *
+         * Not applicable in VTE.
+         */
+}
+
+void
+VteTerminalPrivate::PLD(vte::parser::Sequence const& seq)
+{
+        /*
+         * PLD - partial line forward
+         *
+         * References: ECMA-48 § 8.3.92
+         *
+         * Could use this to implement subscript text.
+         */
+}
+
+void
+VteTerminalPrivate::PLU(vte::parser::Sequence const& seq)
+{
+        /*
+         * PLU - partial line backward
+         *
+         * References: ECMA-48 § 8.3.93
+         *
+         * Could use this to implement superscript text.
+         */
+}
+
+void
 VteTerminalPrivate::PP(vte::parser::Sequence const& seq)
 {
         /*
-         * PP - preceding-page
-         * XXX
+         * PP - preceding page
+         * Move cursor to home on the previous page (presentation).
+         * (Ignored if there is only one page.)
+         *
+         * Arguments:
+         *   args[0]: number of pages to move backward
          *
          * Defaults:
          *   args[0]: 1
          *
-         * Probably not worth implementing. We only support a single page.
+         * References: ECMA-48 § 8.3.95
+         *             VT525
+         *
+         * Since VTE only has one page, this is ignored.
          */
 }
 
@@ -4739,13 +6425,21 @@ void
 VteTerminalPrivate::PPA(vte::parser::Sequence const& seq)
 {
         /*
-         * PPA - page-position-absolute
-         * XXX
+         * PPA - page position absolute
+         * Move the cursor to the current position on the specified page
+         * (data).
+         * (Ignored if there is only one page.)
+         *
+         * Arguments:
+         *   args[0]: absolute page number
          *
          * Defaults:
          *   args[0]: 1
          *
-         * Probably not worth implementing. We only support a single page.
+         * References: ECMA-48 § 8.3.96
+         *             VT525
+         *
+         * Since VTE only has one page, this is ignored.
          */
 }
 
@@ -4753,13 +6447,20 @@ void
 VteTerminalPrivate::PPB(vte::parser::Sequence const& seq)
 {
         /*
-         * PPB - page-position-backward
-         * XXX
+         * PPB - page position backward
+         * Move the cursor to the current position on a preceding page (data).
+         * (Ignored if there is only one page.)
+         *
+         * Arguments:
+         *   args[0]: number of pages to move backward
          *
          * Defaults:
          *   args[0]: 1
          *
-         * Probably not worth implementing. We only support a single page.
+         * References: ECMA-48 § 8.3.97
+         *             VT525
+         *
+         * Since VTE only has one page, this is ignored.
          */
 }
 
@@ -4767,26 +6468,85 @@ void
 VteTerminalPrivate::PPR(vte::parser::Sequence const& seq)
 {
         /*
-         * PPR - page-position-relative
-         * XXX
+         * PPR - page position foward
+         * Move the cursor to the current position on a following page (data).
+         * (Ignored if there is only one page.)
+         *
+         * Arguments:
+         *   args[0]: number of pages to move forward
          *
          * Defaults:
          *   args[0]: 1
          *
-         * Probably not worth implementing. We only support a single page.
+         * References: ECMA-48 § 8.3.98
+         *             VT525
+         *
+         * Since VTE only has one page, this is ignored.
          */
 }
 
 void
-VteTerminalPrivate::RC(vte::parser::Sequence const& seq)
+VteTerminalPrivate::PTX(vte::parser::Sequence const& seq)
 {
         /*
-         * RC - restore-cursor
+         * PTX - parallel texts
+         *
+         * Arguments:
+         *   args[0]: mode
+         *     0 = End of parallel texts
+         *     1 = Start of a string of principal parallel text
+         *     2 = Start of a string of supplementary parallel text
+         *     3 = Start of a string of supplementary japanese
+         *         phonetic annotations
+         *     4 = Start of a string of supplementary chinese
+         *         phonetic annotations
+         *     5 = Start of a string of supplementary phonetic
+         *        annotations
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.99
+         *             VT525
+         *
+         * Since VTE only has one page, this is ignored.
          */
+}
 
-#if 0
-        screen_DECRC(screen, seq);
-#endif
+void
+VteTerminalPrivate::PU1(vte::parser::Sequence const& seq)
+{
+        /*
+         * PU1 - private use 1
+         *
+         * References: ECMA-48 § 8.3.100
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::PU2(vte::parser::Sequence const& seq)
+{
+        /*
+         * PU1 - private use 2
+         *
+         * References: ECMA-48 § 8.3.101
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::QUAD(vte::parser::Sequence const& seq)
+{
+        /*
+         * QUAD - quad
+         *
+         * References: ECMA-48 § 8.3.102
+         *
+         * Probably not worth implementing.
+         */
 }
 
 void
@@ -4862,7 +6622,8 @@ VteTerminalPrivate::RIS(vte::parser::Sequence const& seq)
 {
         /*
          * RIS - reset-to-initial-state
-         * XXX
+         * Reset to initial state.
+         * [list of things reset]
          *
          * References: ECMA-48 § 8.3.105
          */
@@ -4875,6 +6636,18 @@ VteTerminalPrivate::RIS(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::RLOGIN_MML(vte::parser::Sequence const& seq)
+{
+        /*
+         * RLOGIN_MML - RLogin music markup language
+         *
+         * Probably not worth implementing.
+         *
+         * References: RLogin
+         */
+}
+
+void
 VteTerminalPrivate::RM_ECMA(vte::parser::Sequence const& seq)
 {
         /*
@@ -4904,16 +6677,128 @@ VteTerminalPrivate::RM_DEC(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::SCORC(vte::parser::Sequence const& seq)
+{
+        /*
+         * SCORC - SCO restore-cursor
+         *
+         * References: VT525
+         *
+         * Not worth implementing, given that we already support DECSC/DECRC.
+         */
+}
+
+void
+VteTerminalPrivate::SACS(vte::parser::Sequence const& seq)
+{
+        /*
+         * SACS - set additional character separation
+         *
+         * Arguments:
+         *   args[0]: spacing (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.107
+         *
+         * Not applicable in VTE.
+         */
+}
+
+void
+VteTerminalPrivate::SAPV(vte::parser::Sequence const& seq)
+{
+        /*
+         * SAPV - select alternative presentation variants
+         * Set variants for the presentation of following text.
+         *
+         * Arguments:
+         *   args[0]: type
+         *     0 = default presentation; cancels the previous SAPV
+         *     ...
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.108
+         */
+}
+
+void
+VteTerminalPrivate::SCO(vte::parser::Sequence const& seq)
+{
+        /*
+         * SCO - select character orientation
+         * Set the rotation for the presentation of following text.
+         * (positive orientation).
+         *
+         * Arguments:
+         *   args[0]: orientation 0…7 specifying a multiple of 45°
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.110
+         */
+}
+
+void
+VteTerminalPrivate::SCP(vte::parser::Sequence const& seq)
+{
+        /*
+         * SCP - select character path
+         * Set the character path relative to the line orientation
+         * (presentation).
+         *
+         * Arguments:
+         *   args[0]: path
+         *     1 = LTR or TTB (for horizontal/vertical line orientation)
+         *     2 = RTL or BTT (for horizontal/vertical line orientation)
+         *   args[1]: effect
+         *     0 = implementation-defined
+         *     1 = ...
+         *     2 = ...
+         *
+         * Defaults:
+         *   args[0]: no default
+         *   args[1]: no default
+         *
+         * References: ECMA-48 § 8.3.111
+         */
+}
+
+void
+VteTerminalPrivate::SCS(vte::parser::Sequence const& seq)
+{
+        /*
+         * SCS - set character spacing
+         *
+         * Arguments:
+         *   args[0]: spacing (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.112
+         */
+}
+
+void
 VteTerminalPrivate::SD(vte::parser::Sequence const& seq)
 {
         /*
-         * SD - scroll-down
-         * XXX
+         * SD - scroll down / pan up
+         * Scrolls down a number of lines (presentation).
+         *
+         * Arguments:
+         *   args[0]: number of lines to scroll
          *
          * Defaults:
          *   args[0]: 1
          *
          * References: ECMA-48 § 8.3.113
+         *             VT525
          */
 #if 0
         unsigned int num = 1;
@@ -4943,8 +6828,70 @@ VteTerminalPrivate::SD_OR_XTERM_IHMT(vte::parser::Sequence const& seq)
          */
         if (seq.size_final() <= 1)
                 SD(seq);
+        #ifdef PARSER_INCLUDE_NOP
         else
                 XTERM_IHMT(seq);
+        #endif
+}
+
+void
+VteTerminalPrivate::SDS(vte::parser::Sequence const& seq)
+{
+        /*
+         * SDS - start directed string
+         *
+         * Arguments:
+         *   args[0]: direction
+         *     0 = End of directed string
+         *     1 = Start of LTR string
+         *     2 = Start of RTL string
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.114
+         */
+}
+
+void
+VteTerminalPrivate::SEE(vte::parser::Sequence const& seq)
+{
+        /*
+         * SEE - select editing extent
+         *
+         * Arguments:
+         *   args[0]: extent
+         *     0 = ...
+         *     1 = ...
+         *     2 = ...
+         *     3 = ...
+         *     4 = ...
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.115
+         */
+}
+
+void
+VteTerminalPrivate::SEF(vte::parser::Sequence const& seq)
+{
+        /*
+         * SEF - sheet eject and feed
+         *
+         * Arguments:
+         *   args[0]:
+         *   args[1]:
+         *
+         * Defaults:
+         *   args[0]: 0
+         *   args[1]: 0
+         *
+         * References: ECMA-48 § 8.3.116
+         *
+         * Probably not worth implementing.
+         */
 }
 
 void
@@ -4952,6 +6899,18 @@ VteTerminalPrivate::SGR(vte::parser::Sequence const& seq)
 {
         /*
          * SGR - select-graphics-rendition
+         * Selects the character attributes to use for newly inserted
+         * characters.
+         *
+         * Arguments:
+         *   args[0:]: the attributes
+         *     0 = reset all attributes
+         *
+         * Defaults:
+         *   args[0]: 0 (reset all attributes)
+         *
+         * References: ECMA-48 § 8.3.117
+         *             VT525
          */
         auto const n_params = seq.size();
 
@@ -5081,20 +7040,113 @@ VteTerminalPrivate::SGR(vte::parser::Sequence const& seq)
 }
 
 void
-VteTerminalPrivate::SI(vte::parser::Sequence const& seq)
+VteTerminalPrivate::SHS(vte::parser::Sequence const& seq)
 {
         /*
-         * SI - shift-in
-         * Map G0 into GL.
+         * SHS - select character spacing
          *
-         * References: ECMA-35 § 9.3.1
-         *             ECMA-48 § 8.3.119
+         * Arguments:
+         *   args[0]: spacing (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.118
+         *
+         * Not applicable in VTE.
          */
-#if 0
-        screen->state.gl = &screen->g0;
-#endif
+}
 
-        set_character_replacement(0);
+void
+VteTerminalPrivate::SIMD(vte::parser::Sequence const& seq)
+{
+        /*
+         * SIMD - select implicit movement direction
+         *
+         * Arguments:
+         *   args[0]: direction
+         *     0 = character progression
+         *     1 = opposite of character progression
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.120
+         */
+}
+
+void
+VteTerminalPrivate::SL(vte::parser::Sequence const& seq)
+{
+        /*
+         * SL - scroll left
+         *
+         * Arguments:
+         *   args[0]: number of character positions (presentation)
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.121
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::SLH(vte::parser::Sequence const& seq)
+{
+        /*
+         * SLH - set line home
+         *
+         * Arguments:
+         *   args[0]: position in the active line
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.122
+         */
+}
+
+void
+VteTerminalPrivate::SLL(vte::parser::Sequence const& seq)
+{
+        /*
+         * SLL - set line limit
+         *
+         * Arguments:
+         *   args[0]: position in the active line
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.123
+         */
+}
+
+void
+VteTerminalPrivate::SLS(vte::parser::Sequence const& seq)
+{
+        /*
+         * SLS - set line spacing
+         *
+         * Arguments:
+         *   args[0]: spacing (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.124
+         *
+         * Not applicable in VTE.
+         */
 }
 
 void
@@ -5127,29 +7179,235 @@ VteTerminalPrivate::SM_DEC(vte::parser::Sequence const& seq)
 }
 
 void
-VteTerminalPrivate::SO(vte::parser::Sequence const& seq)
+VteTerminalPrivate::SOH(vte::parser::Sequence const& seq)
 {
         /*
-         * SO - shift-out
-         * Map G1 into GL.
+         * SOH - start of heading
          *
-         * References: ECMA-35 § 9.3.1
-         *             ECMA-48 § 8.3.126
+         * References: ECMA-48 § 8.3.127
          */
-#if 0
-        screen->state.gl = &screen->g1;
-#endif
-
-        set_character_replacement(1);
 }
 
 void
 VteTerminalPrivate::SPA(vte::parser::Sequence const& seq)
 {
         /*
-         * SPA - start-of-protected-area
+         * SPA - start of protected area
+         * Marks the start of an area of positions (presentation)
+         * that are protected; the end of the area will be
+         * marked by EPA.
+         *
+         * The contents of the area will be protected against
+         * alteration, transfer (depending on the GATM setting),
+         * and erasure (depending on the ERM setting).
+         *
+         * References: ECMA-48 § 8.3.129
+         */
+}
+
+void
+VteTerminalPrivate::SPD(vte::parser::Sequence const& seq)
+{
+        /*
+         * SPD - select presentation directions
+         *
+         * Arguments:
+         *   args[0]: line orientation, progression, character path
+         *     0 = horizontal, TTB, LTR
+         *     1 = vertical,   RTL, TTB
+         *     2 = vertical,   LTR, TTB
+         *     3 = horizontal, TTB, RTL
+         *     4 = vertical,   LTR, BTT
+         *     5 = horizontal, BTT, RTL
+         *     6 = horizontal, BTT, LTR
+         *     7 = vertical,   RTL, BTT
+         *
+         *   args[1]: effect
+         *     0 = implementation-defined
+         *     1 = ...
+         *     2 = ...
+         *
+         * Defaults:
+         *   args[0]: 0
+         *   args[1]: 0
+         *
+         * References: ECMA-48 § 8.3.130
+         */
+}
+
+void
+VteTerminalPrivate::SPH(vte::parser::Sequence const& seq)
+{
+        /*
+         * SPH - set page home
+         *
+         * Arguments:
+         *   args[0]: position in the active page
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.131
+         */
+}
+
+void
+VteTerminalPrivate::SPI(vte::parser::Sequence const& seq)
+{
+        /*
+         * SPI - spacing increment
+         * Set line and character spacing for following text.
+         *
+         * Arguments:
+         *   args[0]: line spacing (in the unit set by SSU)
+         *   args[0]: character spacing (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: no default
+         *   args[1]: no default
          *
-         * TODO: What is this?
+         * References: ECMA-48 § 8.3.132
+         */
+}
+
+void
+VteTerminalPrivate::SPL(vte::parser::Sequence const& seq)
+{
+        /*
+         * SPL - set page limit
+         *
+         * Arguments:
+         *   args[0]: line position in the active page
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * Depending on DCSM, this function works on the presentation
+         * or data position.
+         *
+         * References: ECMA-48 § 8.3.133
+         */
+}
+
+void
+VteTerminalPrivate::SPQR(vte::parser::Sequence const& seq)
+{
+        /*
+         * SPQR - select print quality and rapidity
+         *
+         * Arguments:
+         *   args[0]:
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.134
+         */
+}
+
+void
+VteTerminalPrivate::SR(vte::parser::Sequence const& seq)
+{
+        /*
+         * SL - scroll right
+         *
+         * Arguments:
+         *   args[0]: number of character positions (presentation)
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.135
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::SRCS(vte::parser::Sequence const& seq)
+{
+        /*
+         * SRCS - set reduced character separation
+         *
+         * Arguments:
+         *   args[0]: spacing (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.136
+         *
+         * Not applicable in VTE.
+         */
+}
+
+void
+VteTerminalPrivate::SRS(vte::parser::Sequence const& seq)
+{
+        /*
+         * SRS - start reversed string
+         *
+         * Arguments:
+         *   args[0]: direction
+         *     0 = End of reversed string
+         *     1 = Start of reversed string
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.137
+         */
+}
+
+void
+VteTerminalPrivate::SSA(vte::parser::Sequence const& seq)
+{
+        /*
+         * SSA - start of selected area
+         * Marks the start of an area of positions (presentation)
+         * that are selected for transfer; the end of the area will
+         * be marked by ESA.
+         *
+         * What will actually be transmitted depends on the setting
+         * of the GATM mode, and areas set by the DAQ and SPA/EPA
+         * functions.
+         *
+         * References: ECMA-48 § 8.3.138
+         */
+}
+
+void
+VteTerminalPrivate::SSU(vte::parser::Sequence const& seq)
+{
+        /*
+         * SSU - set size unit
+         *
+         * Arguments:
+         *   args[0]: unit
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.139
+         */
+}
+
+void
+VteTerminalPrivate::SSW(vte::parser::Sequence const& seq)
+{
+        /*
+         * SSW - set space width
+         *
+         * Arguments:
+         *   args[0]: width (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.140
          */
 }
 
@@ -5159,6 +7417,10 @@ VteTerminalPrivate::SS2(vte::parser::Sequence const& seq)
         /*
          * SS2 - single-shift-2
          * Temporarily map G2 into GL for the next graphics character.
+         *
+         * References: ECMA-35 § 8.4, 9.4
+         *             ECMA-48 § 8.3.141
+         *             VT525
          */
 #if 0
         screen->state.glt = &screen->g2;
@@ -5171,6 +7433,10 @@ VteTerminalPrivate::SS3(vte::parser::Sequence const& seq)
         /*
          * SS3 - single-shift-3
          * Temporarily map G3 into GL for the next graphics character
+         *
+         * References: ECMA-35 § 8.4, 9.4
+         *             ECMA-48 § 8.3.142
+         *             VT525
          */
 #if 0
         screen->state.glt = &screen->g3;
@@ -5185,6 +7451,50 @@ VteTerminalPrivate::ST(vte::parser::Sequence const& seq)
          * The string-terminator is usually part of control-sequences and
          * handled by the parser. In all other situations it is silently
          * ignored.
+         *
+         * References: ECMA-48 § 8.3.143
+         */
+}
+
+void
+VteTerminalPrivate::STAB(vte::parser::Sequence const& seq)
+{
+        /*
+         * STAB - selective tabulation
+         *
+         * Arguments:
+         *   args[0]:
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.144
+         *             ITU-T Rec. T.416 (Open Document Architecture)
+         */
+}
+
+void
+VteTerminalPrivate::STS(vte::parser::Sequence const& seq)
+{
+        /*
+         * STS - set transmit state
+         *
+         * References: ECMA-48 § 8.3.145
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::STX(vte::parser::Sequence const& seq)
+{
+        /*
+         * STX - start of text
+         *
+         * References: ECMA-48 § 8.3.146
+         *             ISO 1745
+         *
+         * Not worth implementing.
          */
 }
 
@@ -5192,13 +7502,17 @@ void
 VteTerminalPrivate::SU(vte::parser::Sequence const& seq)
 {
         /*
-         * SU - scroll-up
-         * XXX
+         * SU - scroll-up / pan down
+         * Scrolls up a number of lines (presentation).
+         *
+         * Arguments:
+         *   args[0]: number of lines to scroll
          *
          * Defaults:
          *   args[0]: 1
          *
          * References: EMCA-48 § 8.3.147
+         *             VT525
          */
 #if 0
         unsigned int num = 1;
@@ -5225,6 +7539,8 @@ VteTerminalPrivate::SUB(vte::parser::Sequence const& seq)
          * Cancel the current control-sequence and print a replacement
          * character. Our parser already handles this so all we have to do is
          * print the replacement character.
+         *
+         * References: ECMA-48 § 8.3.148
          */
 #if 0
         static const struct vte_seq rep = {
@@ -5238,6 +7554,38 @@ VteTerminalPrivate::SUB(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::SVS(vte::parser::Sequence const& seq)
+{
+        /*
+         * SVS - select line spacing
+         *
+         * Arguments:
+         *   args[0]: spacing
+         *     0 = ...
+         *     ...
+         *     9 = ...
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * References: ECMA-48 § 8.3.149
+         */
+}
+
+void
+VteTerminalPrivate::SYN(vte::parser::Sequence const& seq)
+{
+        /*
+         * SYN - synchronous idle
+         *
+         * References: ECMA-48 § 8.3.150
+         *             ISO 1745
+         *
+         * Not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::TAC(vte::parser::Sequence const& seq)
 {
         /*
@@ -5359,14 +7707,38 @@ VteTerminalPrivate::TSR(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::TSS(vte::parser::Sequence const& seq)
+{
+        /*
+         * TSS - thin space specification
+         *
+         * Arguments:
+         *   args[0]: width (in the unit set by SSU)
+         *
+         * Defaults:
+         *   args[0]: no default
+         *
+         * References: ECMA-48 § 8.3.157
+         *
+         * Not applicable in VTE.
+         */
+}
+
+void
 VteTerminalPrivate::VPA(vte::parser::Sequence const& seq)
 {
         /*
-         * VPA - vertical-line-position-absolute
-         * XXX
+         * VPA - vertical line position absolute
+         * Moves the cursor to the specified line on the current column (data).
+         *
+         * Arguments:
+         *   args[0]: line number
          *
          * Defaults:
          *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.158
+         *             VT525
          */
 #if 0
         unsigned int pos = 1;
@@ -5386,14 +7758,49 @@ VteTerminalPrivate::VPA(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::VPB(vte::parser::Sequence const& seq)
+{
+        /*
+         * VPB - line position backward
+         * Moves the cursor up the specified number of lines on
+         * the current column (data).
+         *
+         * Arguments:
+         *   args[0]: line number
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.159
+         *             VT525
+         */
+#if 0
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_down(screen, num, false);
+#endif
+}
+
+void
 VteTerminalPrivate::VPR(vte::parser::Sequence const& seq)
 {
         /*
-         * VPR - vertical-line-position-relative
-         * XXX
+         * VPR - vertical line position relative
+         * Moves the cursor down the specified number of lines
+         * on the current column (data).
+         *
+         * Arguments:
+         *   args[0]: line number
          *
          * Defaults:
          *   args[0]: 1
+         *
+         * References: ECMA-48 § 8.3.160
+         *             VT525
          */
 #if 0
         unsigned int num = 1;
@@ -5413,20 +7820,232 @@ VteTerminalPrivate::VT(vte::parser::Sequence const& seq)
          * VT - vertical-tab
          * This causes a vertical jump by one line. Terminals treat it exactly
          * the same as LF.
+         *
+         * References: ECMA-48 § 8.3.161
          */
 
         LF(seq);
 }
 
 void
-VteTerminalPrivate::XTERM_CLLHP(vte::parser::Sequence const& seq)
+VteTerminalPrivate::VTS(vte::parser::Sequence const& seq)
 {
         /*
-         * XTERM_CLLHP - xterm-cursor-lower-left-hp-bugfix
-         * Move the cursor to the lower-left corner of the page. This is an HP
-         * bugfix by xterm.
+         * VTS - line tabulation set
+         * Sets a tabstop in the active line (presentation).
+         *
+         * References: ECMA-48 § 8.3.162
+         *
+         * Not worth implementing.
+         */
+}
+
+void
+VteTerminalPrivate::WYCAA(vte::parser::Sequence const& seq)
+{
+        /*
+         * WYCAA - redefine character display attribute association
+         *
+         * Arguments:
+         *   args[0]: mode
+         *
+         * Defaults:
+         *   args[0]: no defaults
          *
          * Probably not worth implementing.
+         *
+         * References: WY370
+         */
+
+        switch (seq.collect1(0)) {
+        case -1:
+                break;
+
+        case 0 ... 47:
+                /* WYCAA - redefine character attribute association
+                 *
+                 * Arguments:
+                 *   args[0]: character attribute association to be set (0…47)
+                 *   args[1]: palette color index for foreground color (0…64)
+                 *   args[2]: palette color index for background color (0…64)
+                 *   args[3]: new definition for the attribute association @args[0]
+                 *
+                 * Defaults:
+                 *   args[0]: ?
+                 *   args[1]: ?
+                 *   args[2]: ?
+                 *   args[3]: ?
+                 */
+                break;
+
+        case 48:
+                /* WYCOLOR - select foreground color palette
+                 *
+                 * Arguments:
+                 *   args[1]: color palette number 0…7
+                 *
+                 * Defaults:
+                 *   args[1]: ?
+                 */
+                break;
+
+        case 49:
+        case 51 ... 52:
+                /* WYCOLOR - select background (49)/screen border(51)/cursor(52) color
+                 * Selects the background (and screen border) color.
+                 *
+                 * Arguments:
+                 *   args[1]: palette color index 0…64
+                 *
+                 * Defaults:
+                 *   args[1]: ?
+                 */
+                break;
+
+        case 50:
+                /* WYCOLOR - restore fore- and background colors to set-up default */
+                break;
+
+        case 53:
+                /* WYSOVR - select overstrike position
+                 *
+                 * Arguments:
+                 *   args[1]: scanline number in the charcell (0=top, …bottom) to
+                 *            put the overstrike
+                 *
+                 * Defaults:
+                 *   args[1]:
+                 */
+                break;
+
+        case 54 ... 57:
+                /* WYCOLOR - select attributes and colors
+                 * for user status line (54), system status line(55),
+                 * replacement character(56), noneraseable character(57).
+                 *
+                 * Arguments:
+                 *   args[1]:
+                 *   args[2]:
+                 *
+                 * Defaults:
+                 *   args[1]:
+                 *   args[2]:
+                 */
+
+        case 58:
+                /* WYDTSET - set date and time */
+                break;
+
+        case 59:
+                /* WYDFPG - define page for session
+                 *
+                 * Arguments:
+                 *   args[1]:
+                 *   args[2]:
+                 *   args[3]:
+                 *   args[4]:
+                 *
+                 * Defaults:
+                 *   args[1]:
+                 *   args[2]:
+                 *   args[3]:
+                 *   args[4]:
+                 */
+                break;
+
+        case 60:
+                /* WYIND - restore default color index values */
+                break;
+
+        case 61 ... 62:
+        case 64 ... 65:
+                /* WYIND - set current fore/background color
+                 * Sets the current fore- (61, 64) or background (62, 65)
+                 * color for eraseable (61, 62) or noneraseable (64, 65)
+                 * characters.
+                 *
+                 * Also turns on color index mode.
+                 *
+                 * Arguments:
+                 *   args[1]: color index
+                 *
+                 * Defaults:
+                 *   args[1]: ?
+                 */
+                break;
+
+        case 63:
+                /* WYIND - turn color index mode on/off
+                 *
+                 * Arguments:
+                 *   args[1]: setting (0 = off, 1 = on)
+                 *
+                 * Defaults:
+                 *   args[1]: ?
+                 */
+                break;
+
+        case 66:
+                /* WYIND - redefine color index
+                 *
+                 * Arguments:
+                 *   args[1]: index
+                 *   args[2]: value
+                 *
+                 * Defaults:
+                 *   args[1]: ?
+                 *   args[2]: ?
+                 */
+                break;
+        }
+}
+
+void
+VteTerminalPrivate::WYDHL_BH(vte::parser::Sequence const& seq)
+{
+        /*
+         * WYDHL_BH - single width double height line: bottom half
+         *
+         * Probably not worth implementing.
+         *
+         * References: WY370
+         */
+}
+
+void
+VteTerminalPrivate::WYDHL_TH(vte::parser::Sequence const& seq)
+{
+        /*
+         * WYDHL_TH - single width double height line: top half
+         *
+         * Probably not worth implementing.
+         *
+         * References: WY370
+         */
+}
+
+void
+VteTerminalPrivate::WYSCRATE(vte::parser::Sequence const& seq)
+{
+        /*
+         * WYSCRATE - set smooth scroll rate
+         * Selects scrolling rate if DECSCLM is set.
+         *
+         * Probably not worth implementing.
+         *
+         * References: WY370
+         */
+}
+
+void
+VteTerminalPrivate::WYLSFNT(vte::parser::Sequence const& seq)
+{
+        /*
+         * WYLSFNT - load soft font
+         *
+         * Probably not worth implementing.
+         *
+         * References: WY370
          */
 }
 
@@ -5475,6 +8094,16 @@ VteTerminalPrivate::XTERM_RPM(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::XTERM_RQTCAP(vte::parser::Sequence const& seq)
+{
+        /*
+         * XTERM_TQTCAP - xterm request termcap/terminfo
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::XTERM_RRV(vte::parser::Sequence const& seq)
 {
         /*
@@ -5539,6 +8168,16 @@ VteTerminalPrivate::XTERM_STM(vte::parser::Sequence const& seq)
 }
 
 void
+VteTerminalPrivate::XTERM_STCAP(vte::parser::Sequence const& seq)
+{
+        /*
+         * XTERM_STCAP - xterm set termcap/terminfo
+         *
+         * Probably not worth implementing.
+         */
+}
+
+void
 VteTerminalPrivate::XTERM_WM(vte::parser::Sequence const& seq)
 {
         /*
@@ -5790,18 +8429,7 @@ VteTerminalPrivate::XTERM_WM(vte::parser::Sequence const& seq)
                 break;
 
         default:
-                /* DECSLPP.
-                 *
-                 * VTxxx variously supported 24, 25, 36, 41, 42, 48, 52, 53, 72, or 144 rows,
-                 * but we support any value >= 24.
-                 */
-                if (param >= 24) {
-                        _vte_debug_print(VTE_DEBUG_EMULATION,
-                                         "Resizing to %d rows.\n",
-                                         param);
-                        /* Resize to the specified number of rows. */
-                        emit_resize_window(m_column_count, param);
-                }
+                DECSLPP(seq);
                 break;
         }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]