]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - misc/terminfo.src
ncurses 6.1 - patch 20180407
[ncurses.git] / misc / terminfo.src
index c2437c63c54523c30b97034408f277020b90d895..9600dabc0917782f21e6b2e964c6818f19a2934b 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.644 $
-#      $Date: 2017/11/18 21:38:11 $
+#      $Revision: 1.684 $
+#      $Date: 2018/03/18 00:08:38 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -334,59 +334,60 @@ vanilla|dumb tty,
 
 # ANSI capabilities are broken up into pieces, so that a terminal
 # implementing some ANSI subset can use many of them.
-ansi+local1,
+ansi+local1|ANSI normal-mode cursor-keys,
        cub1=\E[D, cud1=\E[B, cuf1=\E[C, cuu1=\E[A,
-ansi+local,
+ansi+local|ANSI normal-mode parameterized cursor-keys,
        cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
        cuu=\E[%p1%dA, use=ansi+local1,
-ansi+tabs,
+ansi+tabs|ANSI tab-stops,
        cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[3g,
-ansi+inittabs,
+ansi+inittabs|ANSI initial tab-stops,
        it#8, use=ansi+tabs,
-ansi+erase,
+ansi+erase|ANSI clear screen/line,
        clear=\E[H\E[J, ed=\E[J, el=\E[K,
-ansi+rca,
+ansi+rca|ANSI relative cursor-addressing,
        hpa=\E[%p1%{1}%+%dG, vpa=\E[%p1%{1}%+%dd,
-ansi+cup,
+ansi+cup|ANSI absolute cursor-addressing,
        cup=\E[%i%p1%d;%p2%dH, home=\E[H,
-ansi+rep,
+ansi+rep|ANSI repeat-character,
        rep=%p1%c\E[%p2%{1}%-%db,
-ansi+idl1,
+ansi+idl1|ANSI insert/delete one line,
        dl1=\E[M, il1=\E[L,
-ansi+idl,
+ansi+idl|ANSI insert/delete lines,
        dl=\E[%p1%dM, il=\E[%p1%dL, use=ansi+idl1,
-ansi+idc,
-       dch1=\E[P, ich=\E[%p1%d@, ich1=\E[@, rmir=\E[4l,
-       smir=\E[4h,
-ansi+arrows,
+ansi+idc1|ANSI insert/delete one character,
+       dch1=\E[P, ich1=\E[@, rmir=\E[4l, smir=\E[4h,
+ansi+idc|ANSI insert/delete characters,
+       dch=\E[%p1%dP, ich=\E[%p1%d@, use=ansi+idc1,
+ansi+arrows|ANSI normal-mode cursor-keys,
        kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
        khome=\E[H,
-ansi+sgr|ansi graphic renditions,
+ansi+sgr|ANSI graphic renditions,
        blink=\E[5m, invis=\E[8m, rev=\E[7m,
        sgr=\E[0%?%p3%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
        sgr0=\E[0m,
-ansi+sgrso|ansi standout only,
+ansi+sgrso|ANSI standout only,
        rmso=\E[m, smso=\E[7m,
-ansi+sgrul|ansi underline only,
+ansi+sgrul|ANSI underline only,
        rmul=\E[m, smul=\E[4m,
-ansi+sgrbold|ansi graphic renditions; assuming terminal has bold; not dim,
+ansi+sgrbold|ANSI graphic renditions; assuming terminal has bold; not dim,
        bold=\E[1m,
        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;
            %;%?%p7%t8;%;m,
        use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul,
-ansi+sgrdim|ansi graphic renditions; assuming terminal has dim; not bold,
+ansi+sgrdim|ANSI graphic renditions; assuming terminal has dim; not bold,
        dim=\E[2m,
        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p5%t2;
            %;%?%p7%t8;%;m,
        use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul,
-ansi+csr|ansi scroll-region plus cursor save & restore,
+ansi+csr|ANSI scroll-region plus cursor save & restore,
        csr=\E[%i%p1%d;%p2%dr, rc=\E8, sc=\E7,
 
 # The normal (ANSI) flavor of "media copy" building block asserts that
 # characters sent to the printer do not echo on the screen. DEC terminals
 # can also be put into autoprinter mode, where each line is sent to the
 # printer as you move off that line, e.g., by a carriage return.
-ansi+pp|ansi printer port,
+ansi+pp|ANSI printer port,
        mc5i,
        mc0=\E[i, mc4=\E[4i, mc5=\E[5i,
 dec+pp|DEC autoprinter mode,
@@ -543,7 +544,7 @@ ansi-mtabs|any ansi terminal with pessimistic assumptions,
 # USENET {akgua,msdc,sb1,sb6,gatech}!emory!mlhhh.
 #
 # (Added vt100 <rc>,<sc> to quiet a tic warning --esr)
-ansi77|ansi 3.64 standard 1977 version,
+ansi77|ANSI 3.64 standard 1977 version,
        OTbs, am, mir,
        cols#80, it#8, lines#24,
        bel=^G, clear=\E[;H\E[2J, cr=\r, csr=\E[%i%p1%d;%p2%dr,
@@ -1292,11 +1293,11 @@ nsterm-bce|AppKit Terminal.app v71+/v100.1.8+ with Mac OS X version 10.3/10.4 (b
 nsterm-256color|Terminal.app in OS X 10.8,
        use=xterm+256setaf, use=nsterm-bce,
 
+# removed bogus kDC7 -TD
 nsterm-build326|Terminal.app in OS X 10.9,
        kDC=\E[3;2~, kLFT=\E[1;2D, kRIT=\E[1;2C, kcbt=\E[Z,
-       kf18=\E[32~, kDC5=\E[3;5~, kDC7=\E[3;5~, kLFT3=\Eb,
-       kLFT5=\E[1;5D, kRIT3=\Ef, kRIT5=\E[1;5C,
-       use=nsterm-256color,
+       kf18=\E[32~, kDC5=\E[3;5~, kLFT3=\Eb, kLFT5=\E[1;5D,
+       kRIT3=\Ef, kRIT5=\E[1;5C, use=nsterm-256color,
 
 # actually "343.7"
 nsterm-build343|Terminal.app in OS X 10.10,
@@ -1341,11 +1342,21 @@ nsterm-build343|Terminal.app in OS X 10.10,
 # + no support for "dynamic colors"
 # + no support for tcap-query.
 nsterm-build361|Terminal.app in OS X 10.11,
+       XT,
        kmous=\E[M, use=nsterm-build343,
 
+# reviewed Terminal.app in High Sierra (version 2.8 build 400) -TD
+# Comparing with build361, little has changed, except that italics work.
+# Direct-color is not supported, by the way.
+#
+# Improved rmso/rmul -TD
+nsterm-build400|Terminal.app in OS X 10.13,
+       rmso=\E[27m, rmul=\E[24m, use=xterm+sm+1006,
+       use=ecma+italics, use=nsterm-build361,
+
 # This is an alias which should always point to the "current" version
 nsterm|Apple_Terminal|AppKit Terminal.app,
-       use=nsterm-build361,
+       use=nsterm-build400,
 
 ######## iTerm, iTerm2
 
@@ -1361,7 +1372,7 @@ nsterm|Apple_Terminal|AppKit Terminal.app,
 # According to its documentation, iTerm uses terminfo to obtain function key
 # definitions.  For example, if it is started with TERM=xterm, it uses key
 # definitons from that terminal description from the local OSX machine.  Those
-# $TERM settings may be augmented using the bookmark and profile dialogs. 
+# $TERM settings may be augmented using the bookmark and profile dialogs.
 # However, the behavior seen with tack does not agree with either the terminfo
 # description or the function keys in its "xterm" profile.
 #
@@ -1392,17 +1403,17 @@ iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
-       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
-       dsl=\E]2;\007, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
-       flash=\E[?5h$<200/>\E[?5l, fsl=^G, home=\E[H,
-       hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
-       il=\E[%p1%dL, il1=\E[L, ind=\n, kLFT=\E[1;2D, kRIT=\E[1;2C,
-       kbs=^?, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
-       kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP,
-       kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR,
-       kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
-       kf9=\E[20~, khome=\EOH, knp=\E[6~, kpp=\E[5~, op=\E[0m,
-       rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
+       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
+       el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
+       flash=\E[?5h$<200/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
+       ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
+       il1=\E[L, ind=\n, kLFT=\E[1;2D, kRIT=\E[1;2C, kbs=^?,
+       kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+       kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
+       kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
+       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+       khome=\EOH, knp=\E[6~, kpp=\E[5~, op=\E[0m, rc=\E8,
+       rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
        rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
        rmso=\E[m, rmul=\E[m,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
@@ -1410,9 +1421,9 @@ iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
            %p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h,
        smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
-       tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
-       u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, TS=\E]2;,
-       kEND5=\E[1;5F, kHOM5=\E[1;5H, use=vt100+keypad,
+       tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c,
+       vpa=\E[%i%p1%dd, kEND5=\E[1;5F, kHOM5=\E[1;5H,
+       use=xterm+sl-twm, use=vt100+keypad, use=xterm+x11mouse,
        use=xterm+256setaf,
 
 # iTerm2 3.0.15
@@ -1444,6 +1455,8 @@ iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
 # Italic text did not work initially, apparently because upgrading did not
 # add/change that preference (set in Preferences, Profiles, Text).  A new
 # install of iTerm 3.0.15 provides italics by default (blinking text:no).
+#
+# 2018/01/21: found xterm+sm+1006 did not work with version 3.1.5
 iTerm2.app|iterm2|terminal emulator for Mac OS X,
        blink@, dim=\E[2m, kEND=\E[1;2F, kHOM=\E[1;2H, ka1@, ka3@,
        kb2@, kc1@, kc3@, kent@, kf13=\E[1;2P, kf14=\E[1;2Q,
@@ -1948,7 +1961,7 @@ kon|kon2|jfbterm|Kanji ON Linux console,
 # Not used here, the program recognizes escapes for italic, underline and
 # dim, rendering those as green, cyan and gray respectively.
 fbterm|FbTerm for Linux with framebuffer,
-       colors#0x100, pairs#0x7fff,
+       colors#0x100, pairs#0x10000,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i
             \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u
             \264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
@@ -2714,7 +2727,7 @@ rcons-color|BSD rasterconsole with ANSI color,
 # for PocketBSD,PocketLinux,NetBSD/{hpcmips,mac68k}
 # -- the setf/setb are probably incorrect, more likely setaf/setab -TD
 # -- compare with cons25w
-mgterm,
+mgterm|MGL/MGL2 MobileGear Graphic Library,
        OTbs, OTpt, am, bce, bw, eo, km, msgr, npc,
        colors#8, cols#80, it#8, lines#18, pairs#64,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J,
@@ -3565,7 +3578,7 @@ vt340|dec-vt340|vt330|dec-vt330|dec vt340 graphics terminal with 24 line page,
        cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
        cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
        dl=\E[%p1%dM, dl1=\E[M, dsl=\E[2$~\r\E[1$}\E[K\E[$},
-       ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l$<200/>, fsl=\E[$},
+       ed=\E[J, el=\E[K, flash=\E[?5h$<200/>\E[?5l, fsl=\E[$},
        home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL,
        il1=\E[L, ind=\ED,
        is2=\E<\E\sF\E>\E[?1h\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r
@@ -3615,7 +3628,7 @@ vt400|vt400-24|dec-vt400|dec vt400 24x80 column autowrap,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
        dsl=\E[2$~\r\E[1$}\E[K\E[$}, ed=\E[J$<10/>,
-       el=\E[K$<4/>, flash=\E[?5h\E[?5l$<200/>, fsl=\E[$},
+       el=\E[K$<4/>, flash=\E[?5h$<200/>\E[?5l, fsl=\E[$},
        home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
        il=\E[%p1%dL, il1=\E[L, ind=\ED,
        is2=\E<\E\sF\E>\E[?1h\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r
@@ -3813,7 +3826,10 @@ crt|crt-vt220|CRT 2.3 emulating VT220,
 #
 # Several features such as backspace/delete are optional; this entry documents
 # the default behavior -TD
-
+#
+# PuTTY recognizes xterm's 1049 mode for switching to/from alternate screen,
+# but implements it incorrectly as mentioned here:
+#      http://stackoverflow.com/questions/24613237/terminal-retains-bg-color-after-closing-vim-using-color-scheme-and-putty-256co/37869114#37869114
 putty|PuTTY terminal emulator,
        am, bce, bw, ccc, mir, msgr, xenl, xon, XT,
        colors#8, it#8, ncv#22, pairs#64, U8#1,
@@ -4012,8 +4028,37 @@ teraterm4.59|Tera Term Pro,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        kmous=\E[M, use=teraterm2.3,
 
+# Version 4.97
+#
+# Testing with tack:
+#      - no bell (flash works)
+#      - bold is yellow, blink is red.
+#      - default keyboard sends ^? for Delete, can be configured for kdch1
+#      - no meta mode
+# Testing with vttest:
+#      + autowrap has problems...
+#      + color-tests for bce feature match xterm's behavior
+#      + handles most of xterm's mouse-controls other than highlight-tracking.
+#        xterm's SGR 1006 works.
+#      + partial support for DEC locator-events
+#      + implements ECMA-48 SD/SU, but not REP, SL/SR.
+#      + has a "Tek" window, but does not work with vttest's examples
+#      + supports the dtterm window modify/report controls
+#      + responds to DECRQM and DECRQSS controls, but not consistent with DSR
+#        e.g., for VT220
+#      + VT220 screen-display tests are ok
+#      + no VT52 support
+# Other tests:
+#      + recognizes xterm's original direct-colors sequences, but result is
+#        poor.
+#      + no UTF-8 apparent when UTF-8 is set, with font Lucida Control
+teraterm4.97|Tera Term Pro,
+       XT, use=ecma+color, use=xterm+sm+1006, use=teraterm4.59,
+teraterm-256color|TeraTerm with xterm 256-colors,
+       use=xterm+256setaf, use=teraterm,
+
 teraterm|Tera Term,
-       use=teraterm4.59,
+       use=teraterm4.97,
 
 # Tested with WinNT 4.0, the telnet application assumes the screensize is
 # 25x80.  This entry uses the 'Terminal' font, to get line-drawing characters.
@@ -4135,21 +4180,20 @@ xterm-r5|xterm R5 version,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
        el=\E[K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
-       il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^H, kcub1=\EOD,
-       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~,
-       kdl1=\E[31~, kel=\E[8~, kend=\E[4~, kf0=\EOq, kf1=\E[11~,
-       kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~,
-       kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~,
-       kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
-       kil1=\E[30~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, rc=\E8,
-       rev=\E[7m, ri=\EM, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m,
-       rmul=\E[m,
+       il=\E[%p1%dL, il1=\E[L, ind=\n, kcub1=\EOD, kcud1=\EOB,
+       kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kdl1=\E[31~,
+       kel=\E[8~, kend=\E[4~, kf0=\EOq, kf1=\E[11~, kf10=\E[21~,
+       kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~,
+       kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
+       kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kil1=\E[30~,
+       kmous=\E[M, knp=\E[6~, kpp=\E[5~, rc=\E8, rev=\E[7m, ri=\EM,
+       rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
        rs2=\E>\E[?1;3;4;5;6l\E[4l\E[?7h\E[m\E[r\E[2J\E[H,
        sc=\E7,
        sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1
            %;m,
        sgr0=\E[m, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m,
-       smul=\E[4m, tbc=\E[3g, use=vt100+enq,
+       smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=xterm+kbs,
 # Compatible with the R6 xterm
 # (from XFree86 3.2 distribution, <acsc> and <it> added, <blink@> removed)
 # added khome/kend, hts based on the R6 xterm code - TD
@@ -4166,7 +4210,7 @@ xterm-r6|xterm X11R6 version,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
        el=\E[K, enacs=\E)0, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL,
        il1=\E[L, ind=\n,
-       is2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8, kbs=^H,
+       is2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8,
        kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kdch1=\E[3~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
        kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
@@ -4180,7 +4224,7 @@ xterm-r6|xterm X11R6 version,
        rs2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8, sc=\E7,
        sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
-       use=vt100+enq,
+       use=xterm+kbs, use=vt100+enq,
 xterm-old|antique xterm version,
        use=xterm-r6,
 # This is the base xterm entry for the xterm supplied with XFree86 3.2 & up.
@@ -4200,18 +4244,18 @@ xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System),
        ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
        il1=\E[L, ind=\n,
        is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
-       kbeg=\EOE, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
-       kcuu1=\EOA, kdch1=^?, kend=\EOF, kf1=\E[11~, kf10=\E[21~,
-       kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
-       kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
-       kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~,
-       kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
-       kf9=\E[20~, kfnd=\E[1~, khome=\EOH, kich1=\E[2~,
-       kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, meml=\El,
-       memu=\Em, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
-       rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
-       rmso=\E[27m, rmul=\E[24m, rs1=^O,
-       rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sc=\E7,
+       kbeg=\EOE, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+       kdch1=^?, kend=\EOF, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
+       kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
+       kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
+       kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~,
+       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+       kfnd=\E[1~, khome=\EOH, kich1=\E[2~, kmous=\E[M, knp=\E[6~,
+       kpp=\E[5~, kslt=\E[4~, meml=\El, memu=\Em, rc=\E8, rev=\E[7m,
+       ri=\EM, rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8,
+       rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
+       rs1=^O, rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>,
+       sc=\E7,
        setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
             %=%t3%e%p1%d%;m,
        setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
@@ -4220,7 +4264,7 @@ xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System),
            %;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h,
        smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
-       tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt100+enq,
+       tbc=\E[3g, vpa=\E[%i%p1%dd, use=xterm+kbs, use=vt100+enq,
        use=ecma+color, use=vt220+keypad,
 
 # This is the stock xterm entry supplied with XFree86 3.3, which uses VT100
@@ -4284,8 +4328,8 @@ xterm-xfree86|xterm terminal emulator (XFree86),
 xterm-new|modern xterm terminal emulator,
        npc,
        indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM,
-       rin=\E[%p1%dT, use=ansi+rep, use=ansi+enq,
-       use=xterm+pcfkeys, use=xterm+tmux, use=ecma+strikeout,
+       rin=\E[%p1%dT, use=ansi+rep, use=ecma+strikeout,
+       use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux,
        use=xterm-basic,
 
 # This fragment is for people who cannot agree on what the backspace key
@@ -4339,6 +4383,18 @@ xterm+app|fragment with cursor keys in application mode,
 # compatibility reasons, they are still available as a setting of xterm's
 # modifyCursorKeys resource.  These fragments list the modified cursor-keys
 # that might apply to xterm+pcfkeys with different values of that resource.
+#
+# These entries will have warnings when checking with tic because the kri/kind
+# capabilities duplicate the kUP/kDN extensions.  This is intentional, though
+# not part of the original plan.  The changes for xterm patch #206 (2005/11/3)
+# show that kri/kind were seen much later as part of a set including kLFT/kRIT:
+#
+#   * modify  xterm-new  terminfo  entry to use capabilities for shifted       
+#     scroll forward/reverse as shifted cursor up/down.
+#
+# In the 1980s when terminfo was defined, the developers made more of
+# a distinction between shifted up/down versus shifted left/right since most
+# terminals can index (scroll up/down), while few can scroll left/right.
 xterm+pcc3|fragment with modifyCursorKeys:3,
        kLFT=\E[>1;2D, kRIT=\E[>1;2C, kind=\E[>1;2B,
        kri=\E[>1;2A, kDN=\E[>1;2B, kDN3=\E[>1;3B, kDN4=\E[>1;4B,
@@ -4442,6 +4498,19 @@ xterm+pc+edit|fragment for pc-style editing keypad,
 xterm+vt+edit|fragment for vt220-style editing keypad,
        kfnd=\E[1~, kslt=\E[4~,
 
+# These variations for alternate-screen and title-stacking were introduced by
+# xterm patch #331:
+xterm+noalt|xterm without altscreen,
+       rmcup@, smcup@,
+
+xterm+alt1049|xterm 90 feature,
+       rmcup=\E[?1049l, smcup=\E[?1049h,
+
+xterm+titlestack|xterm 251 feature,
+       rmcup=\E[23;0;0t, smcup=\E[22;0;0t,
+
+xterm+alt+title|xterm 90 and 251 features combined,
+       rmcup=\E[?1049l\E[23;0;0t, smcup=\E[?1049h\E[22;0;0t,
 #
 # Those chunks use the new-style (the xterm oldFunctionKeys resource is false).
 # Alternatively, the same scheme with old-style function keys as in xterm-r6
@@ -4472,27 +4541,29 @@ xterm-basic|modern xterm terminal emulator - common,
        il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m,
        is2=\E[!p\E[?3;4l\E[4l\E>, kmous=\E[M, meml=\El,
        memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
-       rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l,
-       rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m,
-       rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
-       setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+       rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>,
+       rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+       rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, setab=\E[4%p1%dm,
+       setaf=\E[3%p1%dm,
        setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
             %=%t3%e%p1%d%;m,
        setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
             %=%t3%e%p1%d%;m,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;
            %?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
-       sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
-       smir=\E[4h, smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m,
-       smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, E3=\E[3J,
-       use=ecma+italics, use=ansi+pp, use=xterm+kbs,
-       use=vt100+enq,
+       sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h,
+       smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m, smul=\E[4m,
+       tbc=\E[3g, vpa=\E[%i%p1%dd, E3=\E[3J, use=ecma+italics,
+       use=ansi+pp, use=xterm+kbs, use=xterm+alt+title,
+       use=ansi+enq,
 
 # From: David J. MacKenzie <djm@va.pubnix.com>, 14 Nov 1997
 # In retrospect, something like xterm-r6 was intended here -TD
 xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1,
        rmso=\E[m, rmul=\E[m, use=xterm-xf86-v33,
 
+#### XTERM Colors
+
 # 16-colors is one of the variants of XFree86 3.3 xterm, updated for 4.0
 # (T.Dickey)
 #
@@ -4509,7 +4580,7 @@ xterm-16color|xterm with 16 colors like aixterm,
 # xterm patch #111 (1999/7/10) -TD
 xterm+256color|xterm 256-color feature,
        ccc,
-       colors#0x100, pairs#0x7fff,
+       colors#0x100, pairs#0x10000,
        initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*
              %{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
        oc=\E]104\007,
@@ -4522,7 +4593,7 @@ xterm+256color|xterm 256-color feature,
 # palette is hardcoded...
 xterm+256setaf|xterm 256-color (set-only),
        ccc@,
-       colors#0x100, pairs#0x7fff,
+       colors#0x100, pairs#0x10000,
        initc@, op=\E[39;49m,
        setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;
              5;%p1%d%;m,
@@ -4556,6 +4627,81 @@ xterm-88color|xterm with 88 colors,
        rs1=\Ec\E]104\007, use=xterm+88color,
        use=xterm-256color,
 
+# Emacs 26.1 and later support direct color mode in terminals, using a
+# combination of user-defined capabilities and ncurses-dependent function
+# calls.  We will not include that here.
+#
+# Here is a first revision, which (disregarding the reuse of colors 1-7 which
+# is of interest only to the numerically illiterate), is compatible with other
+# terminal descriptions written for curses.  It relies upon the extended range
+# for numeric capabilities provided in ncurses 6.1:
+xterm+direct2|xterm with direct-color indexing,
+       RGB,
+       colors#0x1000000, pairs#0x10000,
+       initc@, op=\E[39;49m,
+       setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:%p1%{65536}%/%d\:%p1
+             %{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
+       setaf=\E[%?%p1%{8}%<%t3%p1%d%e38\:2\:%p1%{65536}%/%d\:%p1
+             %{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
+       setb@, setf@,
+xterm-direct2|xterm with direct-color indexing (old),
+       use=xterm+direct2, use=xterm+titlestack, use=xterm,
+
+# That in turn had a problem: in the original patch submitted for KDE konsole
+# in 2006, the submitter and the developer alike overlooked a "color space
+# identifier" parameter.  This version provides for that parameter:
+xterm+direct|xterm with direct-color indexing,
+       RGB,
+       colors#0x1000000, pairs#0x10000,
+       initc@, op=\E[39;49m,
+       setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:\:%p1%{65536}%/%d\:%p1
+             %{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
+       setaf=\E[%?%p1%{8}%<%t3%p1%d%e38\:2\:\:%p1%{65536}%/%d\:%p1
+             %{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
+       setb@, setf@,
+xterm-direct|xterm with direct-color indexing,
+       use=xterm+direct, use=xterm,
+
+# Here are corresponding flavors for terminals which could use the feature:
+iterm2-direct|iTerm2 with direct-color indexing,
+       use=xterm+direct, use=iterm2,
+mlterm-direct|mlterm with direct-color indexing,
+       use=xterm+direct, use=mlterm,
+
+# Meanwhile, in KDE #107487, the patch submitter and the developer both saw
+# that xterm's original implementation should have used colons for the
+# subparameter separators, but chose not to correct this in konsole.  As of
+# late 2017, konsole still accepts only the nonstandard semicolon delimiters.
+xterm+indirect|xterm with direct-color indexing (old),
+       RGB,
+       colors#0x1000000, pairs#0x10000,
+       initc@, op=\E[39;49m,
+       setab=\E[%?%p1%{8}%<%t4%p1%d%e48;2;%p1%{65536}%/%d;%p1%{256}
+             %/%{255}%&%d;%p1%{255}%&%d%;m,
+       setaf=\E[%?%p1%{8}%<%t3%p1%d%e38;2;%p1%{65536}%/%d;%p1%{256}
+             %/%{255}%&%d;%p1%{255}%&%d%;m,
+       setb@, setf@,
+konsole-direct|konsole with direct-color indexing,
+       use=xterm+indirect, use=konsole,
+st-direct|st with direct-color indexing,
+       use=xterm+indirect, use=st,
+vte-direct|vte with direct-color indexing,
+       use=xterm+indirect, use=vte,
+
+# As for others:
+# + Apple's Terminal.app does not recognize either form of the direct-color
+#   sequences.
+# + Cygwin's mintty recognizes xterm's original implementation, does okay with
+#   the colors.  Like vte, it is a subset of xterm, although different
+#   omissions/reservations of modified-keys are seen in testing.
+# + PuTTY 0.70 seems to recognize xterm's original implementation but does
+#   nothing useful with the colors.
+# + Teraterm 4.97, like PuTTY (no good).
+# + terminology 0.91 recognizes xterm's original implementation, but does
+#   nothing useful with it.
+
+#### XTERM Features
+
 # This chunk is based on suggestions by Ailin Nemui and Nicholas Marriott, who
 # asked for some of xterm's advanced features to be added to its terminfo
 # entry.  It defines extended capabilities not found in standard terminfo or
@@ -4630,8 +4776,8 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System),
        sgr0=\2330m\E(B, smacs=\E(0, smam=\233?7h,
        smcup=\233?1049h, smir=\2334h, smkx=\233?1h\E=,
        smso=\2337m, smul=\2334m, tbc=\2333g, u6=\233[%i%d;%dR,
-       u7=\E[6n, u8=\233[?1;2c, u9=\E[c, vpa=\233%i%p1%dd,
-       use=xterm+kbs,
+       u7=\E[6n, u8=\233[?%[;0123456789]c, u9=\E[c,
+       vpa=\233%i%p1%dd, use=xterm+kbs,
 
 xterm-hp|xterm with hpterm function keys,
        kclr=\EJ, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
@@ -4911,6 +5057,7 @@ kterm-color|kterm-co|kterm with ANSI colors,
        ncv@, use=kterm, use=ecma+color,
 
 #### Other XTERM
+
 # These (xtermc and xtermm) are distributed with Solaris.  They refer to a
 # variant of xterm which is apparently no longer supported, but are interesting
 # because they illustrate SVr4 curses mouse controls - T.Dickey
@@ -5142,12 +5289,12 @@ vte-2012|VTE 0.34.1,
 gnome-2012|GNOME Terminal 3.6.0,
        use=vte-2012,
 
-# GNOME terminal may automatically use the contents of the "xterm" terminfo to
-# supply key information which is not built into the program.  With 2.22.3,
-# this list is built into the program (which addresses the inadvertent use of
-# random terminfo data, though using a set of values which does not correspond
-# to any that xterm produces - still not solving the problem that GNOME
-# terminal hardcodes the $TERM variable as "xterm").
+# Before 2008, GNOME terminal could automatically use the contents of the
+# "xterm" terminfo to supply key information which is not built into the
+# program.  With 2.22.3, this list was built into the program (which addressed
+# the inadvertent use of random terminfo data, though using a set of values
+# which did not correspond to any that xterm produced - still not solving the
+# problem that GNOME terminal hardcoded the $TERM variable as "xterm").
 #
 #      terminfo        modifier        code    keys
 #      kf13-kf24       shift           2       F1 to F12
@@ -5174,14 +5321,35 @@ gnome|GNOME Terminal,
        use=vte-2012,
 
 # relevant changes were made in January 2014, and later.
+#
+# Originally VTE was promoted as a library able to emulate any terminal by
+# reading its terminal description.  In practice, that never got beyond the
+# ability to read definitions of special keys (function-, editing-, cursor).
+#
+# Before 2014, VTE had a termcap reader (originally pointing to a private copy
+# of a termcap file derived from xterm).  That was incomplete because it did
+# not have any of the modifier-key information used for xterm's function-,
+# editing-, and cursor-keys.  Having its own reader was unnecessary since
+# ncurses provides that information; used since xterm patch #225 in 2007.
+#
+# During April/May 2014, a few bug reports (e.g., gnome #169295, gnome #728900,
+# gnome #730137) dealt with attempts to recast that termcap reader as library
+# calls, then attempting to adapt a chunk of code from ncurses (src/vteti.c),
+# abandoning that and finally constructing a table to match xterm's default
+# behavior, e.g., for "xterm+pcfkeys".
 vte-2014|VTE 0.35.1,
        ncv@,
        cbt=\E[Z, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l,
        ich=\E[%p1%d@, indn=\E[%p1%dS, kent=\EOM, rin=\E[%p1%dT,
-       use=xterm+pcfkeys, use=vte-2012,
+       use=xterm+sm+1006, use=xterm+pcfkeys, use=vte-2012,
+
+# As of January 2018, this is the  most recent release,
+# e.g., with gnome-terminal 3.26.2
+vte-2017|VTE 0.50.2,
+       use=ecma+strikeout, use=vte-2014,
 
 vte|VTE aka GNOME Terminal,
-       use=vte-2014,
+       use=vte-2017,
 
 vte-256color|VTE with xterm 256-colors,
        use=xterm+256color, use=vte,
@@ -5197,6 +5365,52 @@ gnome-256color|GNOME Terminal with xterm 256-colors,
 xfce|Xfce Terminal,
        use=vte-2008,
 
+# TERMITE
+#
+# https://github.com/thestinger/termite
+#
+# A review requires install of Arch Linux since Fedora and Debian don't have
+# this program.  It uses "vte3-ng" (a conflicting package), which is here:
+#      https://github.com/thestinger/vte-ng
+# which (based on the default branch setting) seems to be a fork of vte
+# 0.48.2, and is noted as such in Arch:
+#      https://www.archlinux.org/packages/community/x86_64/vte3-ng/
+# It won't be merged:
+#      https://bugzilla.gnome.org/show_bug.cgi?id=679658#c10
+#      https://bugzilla.gnome.org/show_bug.cgi?id=78291
+# but perhaps made obsolete.
+#
+# The entry as given was mislabeled "xterm-termite" (it is not xterm), and
+# was mostly cut/paste from xterm-256color, but since VTE does not actually
+# implement several of the features in that terminal description, this one is
+# trimmed to eliminate those.  Also, since it is a slightly older version of
+# VTE, it lacks a few more features (again, trimmed).
+termite|VTE-based terminal,
+       am, ccc, km, mir, msgr, npc, xenl,
+       cols#80, it#8, lines#24, ncv@,
+       acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy
+            yzz{{||}}~~,
+       bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
+       clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=\r,
+       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
+       cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+       dch=\E[%p1%dP, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
+       flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
+       ht=^I, hts=\EH, ind=\n, indn=\E[%p1%dS, invis=\E[8m,
+       is2=\E[!p\E[?3;4l\E[4l\E>, kb2=\EOE, kbs=^?, kcbt=\E[Z,
+       kent=\EOM, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM,
+       rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l,
+       rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+       rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|
+           %t;7%;%?%p7%t;8%;m,
+       sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
+       smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+       vpa=\E[%i%p1%dd, use=ansi+idc, use=ansi+idl,
+       use=ansi+enq, use=ecma+italics, use=xterm+256color,
+       use=ecma+color, use=xterm+pcfkeys, use=xterm+sl-twm,
+
 #### Other GNOME
 # Multi-Gnome-Terminal 1.6.2
 #
@@ -5212,7 +5426,7 @@ kvt|KDE terminal,
        bce, km@,
        kdch1=^?, kend=\E[F, khome=\E[H, use=xterm-color,
 
-# Konsole 1.0.1
+# Konsole 1.0.1 (2001/11/25)
 # (formerly known as kvt)
 #
 # This program hardcodes $TERM to 'xterm', which is not accurate.  However, to
@@ -5246,27 +5460,91 @@ kvt|KDE terminal,
 # Updated for konsole 1.6.6:
 #    add control-key modifiers for function-keys, etc.
 #
-# Updated for konsole 2.12.4:
+# Updated for konsole 2.3 (October 2008):
+#    vttest menu 1 shows that both konsole and gnome terminal do wrapping
+#    different from xterm (and vt100's).  They have the same behavior in
+#    this detail, but it is unclear which copies the other.
+#
+# Updated for konsole 2.12.4 (late 2013):
 #    add sitm/ritm
 #
-# vttest menu 1 shows that both konsole and gnome terminal do wrapping
-# different from xterm (and vt100's).  They have the same behavior in this
-# detail, but it is unclear which copies the other.
+# Updated for konsole 16.07 (mid 2016):
+#    add dim, invis, strikeout
+#    (also overline, which is too rarely used to provide as an extension)
+#
+# Updated for konsole 17.12.0 (late 2017):
 konsole-base|KDE console window,
        bce, km@, npc, XT,
        ncv@,
-       bel@, blink=\E[5m, civis=\E[?25l, cnorm=\E[?25h,
+       bel@, blink=\E[5m, civis=\E[?25l, cnorm=\E[?25h, dim=\E[2m,
        ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l,
-       hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=^?, kdch1=\E[3~,
-       kend=\E[4~, kf1@, kf10@, kf11@, kf12@, kf13@, kf14@, kf15@, kf16@,
-       kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@,
-       kf9@, kfnd@, khome=\E[1~, kslt@, rin=\E[%p1%dT, rmam=\E[?7l,
-       rmso=\E[27m, rmul=\E[24m,
+       hpa=\E[%i%p1%dG, indn=\E[%p1%dS, invis=\E[8m, kbs=^?,
+       kdch1=\E[3~, kend=\E[4~, kf1@, kf10@, kf11@, kf12@, kf13@, kf14@,
+       kf15@, kf16@, kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, kf4@, kf5@, kf6@,
+       kf7@, kf8@, kf9@, kfnd@, khome=\E[1~, kslt@, rin=\E[%p1%dT,
+       rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m,
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?
-           %p9%t\016%e\017%;,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?
+           %p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[0m\017, smam=\E[?7h, vpa=\E[%i%p1%dd,
-       use=ecma+italics, use=ecma+color, use=xterm-r6,
+       use=ecma+strikeout, use=ecma+italics, use=ecma+color,
+       use=xterm-r6,
+
+# The keytab feature was introduced in 0.9.12 (February 2000) with "linux" and
+# "vt100" key-table files along with a compiled-in default key-table.
+#
+# The main difference between the two keytabs was that the developer equated
+# "vt100" with xterm, and noticed that the Linux console's F1-F5 differed from
+# that.  For the same reason, the home/end keys differ.  A VT100 had none of
+# that.  The otherwise identical keytabs have definitions to model the VT52
+# cursor-keys and the VT100 cursor-keys with application versus normal modes.
+#
+# An "x11r5" keytab (displayed in the menu as "X11 R5") was added in January
+# 2001, and shortly after retitled to "XFree 3.x.x".  Both it and "vt100" were
+# dropped from the install in June 2008.
+#
+# The default keytab added in January 2000 was originally titled "X11 R6",
+# and likewise retitled to "XFree 4".
+#
+# A "solaris" keytab was added in Febrary 2005, copying the "vt100" keytab
+# and changing backspace to ^H, removing that keytab's attempt to model the
+# VT100 keypad and VT52 (KDE #20459).
+#
+# The developers made changes to the default and linux keytabs.  Comparing
+# the original and 2018 versions using diffstat:
+#      default: 119 added, 147 deleted, 28 unchanged
+#      linux:   47 added, 28 deleted, 104 unchanged
+#
+# Most of the change for the default keytab was to make konsole act more like
+# xterm.  That was a feature named AnyMod which came in May 2005 for KDE #92749
+# (see also Redhat #122815).  Later, in June 2007 the compiled-in keytab was
+# made an external file (like "linux" and "solaris"), and some further
+# refinement made.  But there are still flaws in the scheme.
+#
+# Essentially AnyMod maps the xterm "PC-style" modifier codes such as 2 for
+# Shift into a placeholder in the table entries.  That works well if all of the
+# modified keys are modified in the same way.  But xterm does not do that.  The
+# first 4 function keys are used in xterm to support the VT100 PF1-PF4 keypad
+# keys.  For example, F2 sends \EOQ in both terminals because of this feature.
+# But a shifted F2 (F14=F2+12) differs like this, in infocmp's listing:
+#      kf14: '\E[1;2Q', '\EO2Q'.
+#
+# In effect, a quarter of konsole's function-keys are different from xterm.
+#
+# It is not a simple blunder:
+# a) xterm patch #121 (November 1999), providing the first version of the
+#    PC-style modifiers would send \EO2Q
+# b) xterm patch #216 (July 2006) amended this and other details, provided
+#    better documentation for the modifiers and made the behavior configurable,
+#    e.g., using the modifyFunctionKeys resource.  The reason why it sends
+#    \E[1;2Q is that \E[O2Q is not a legal ECMA-48 control sequence.  The
+#    changelog points this out as "avoid sending SS3 with parameters".
+# c) That came after AnyMod was introduced, but still early enough that one
+#    might expect konsole's developers to followup.  Twelve years later that
+#    has yet to happen.
+#
+# As of 2018, konsole still provides 3 keyboard profiles ("XFree 4", "linux",
+# "solaris").
 konsole-linux|KDE console window with linux keyboard,
        kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13@,
        kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, kf2=\E[[B, kf20@,
@@ -5274,35 +5552,47 @@ konsole-linux|KDE console window with linux keyboard,
        kf8=\E[19~, kf9=\E[20~, use=konsole-base,
 konsole-solaris|KDE console window with Solaris keyboard,
        kbs=^H, kend=\E[4~, khome=\E[1~, use=konsole-vt100,
-# KDE's "XFree86 3.x.x" keyboard is based on reading the xterm terminfo rather
-# than testing the code.
+
+# Obsolete: x11r5.keymap
+# KDE's "XFree86 3.x.x" keyboard was obviously based on reading the xterm
+# terminfo at the time rather than testing the code.
 konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm,
        kend=\E[4~, khome=\E[1~, use=konsole-vt100,
-# The value for kbs reflects local customization rather than the settings used
-# for XFree86 xterm.
+
+# The value for kbs (see konsole-vt100) reflects local customization rather
+# than the settings used for XFree86 xterm.
 konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
        kend=\EOF, khome=\EOH, use=konsole+pcfkeys,
        use=konsole-vt100,
-# Konsole does not implement shifted cursor-keys.
+
 konsole+pcfkeys|konsole subset of xterm+pcfkeys,
-       kLFT@, kRIT@, kcbt=\E[Z, kind@, kri@, kDN@, kUP@, use=xterm+pcc2,
-       use=xterm+pcf0,
+       kcbt=\E[Z, use=xterm+pcc2, use=xterm+pcf0,
+       use=xterm+pce2,
+
+# Obsolete: vt100.keymap
 # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but
-# it is still useful for deriving the other entries.
+# it is still useful for deriving the other entries, since the developer
+# provided function-keys based on xterm.
 konsole-vt100|KDE console window with vt100 (sic) keyboard,
        kbs=^?, kdch1=\E[3~, kend=\E[F, kf1=\E[11~, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf13@, kf14@, kf15@, kf16@, kf17@,
        kf18@, kf19@, kf2=\E[12~, kf20@, kf3=\E[13~, kf4=\E[14~,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[H, use=konsole-base,
+
+# Obsolete: vt420pc.keytab was added in June 2000, dropped from the install in
+# September 2008 and removed in June 2016.  The developer who removed it stated
+# that it was never installed.
 konsole-vt420pc|KDE console window with vt420 pc keyboard,
        kbs=^H, kdch1=^?, use=konsole-vt100,
-konsole-16color|klone of xterm-16color,
-       ncv#32, use=ibm+16color, use=konsole,
+
 # make a default entry for konsole
 konsole|KDE console window,
        use=konsole-xf4x,
 
+# These were written for ncurses:
+konsole-16color|klone of xterm-16color,
+       ncv#32, use=ibm+16color, use=konsole,
 konsole-256color|KDE console window with xterm 256-colors,
        use=xterm+256setaf, use=konsole,
 
@@ -5314,11 +5604,13 @@ mlterm|multi lingual terminal emulator,
 
 # Tested mlterm 3.2.2:
 # mlterm 3.x has made changes, but they are not reflected in the included
-# mlterm.ti; this entry is based on testing with tack and vttest -TD
+# mlterm.ti; this entry is based on testing with ncurses, tack and vttest -TD
+# 2018/01/21: found xterm+sm+1006 did not work with version 3.3.8
 mlterm3|multi lingual terminal emulator,
        kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
        use=ecma+italics, use=xterm+app, use=xterm+pcf0,
-       use=xterm+pcc2, use=xterm+pce2, use=mlterm2,
+       use=xterm+pcc2, use=xterm+pce2, use=xterm+x11mouse,
+       use=mlterm2,
 
 # This is mlterm 2.9.3's mlterm.ti, with some additions/corrections -TD
 #
@@ -5537,7 +5829,37 @@ rxvt+pcfkeys|fragment for PC-style fkeys,
        kPRV6=\E[5@, kRIT5=\EOc, kUP=\E[a, kUP5=\EOa,
 
 # rxvt was originally "xvt", first announced in April 1993:
-#      http://www.informatica.co.cr/linux-desktops/research/1993/0416.html
+#      http://www.krsaborio.net/linux-desktops/research/1993/0416.html
+#------------------------------------------------------------------------------
+# Article: 567 of comp.os.linux.announce
+# Path: pavo.csi.cam.ac.uk!warwick!uknet!pipex!uunet!zaphod.mps.ohio-state.edu!
+# caen!batcomputer!theory.TC.Cornell.EDU!mdw
+# From: nation@rocket.sanders.com (Robert Nation)
+# Newsgroups: comp.os.linux.announce
+# Subject: xvt upload
+# Date: 16 Apr 1993 18:13:07 GMT
+# Organization: Cornell Theory Center
+# Lines: 13
+# Approved: linux-announce@tc.cornell.edu (Matt Welsh)
+# Message-ID: <1qmsvj$pvj@fitz.TC.Cornell.EDU>
+# NNTP-Posting-Host: theory.tc.cornell.edu
+# Keywords: xvt, xterm, Xwindows
+# Originator: mdw@theory.TC.Cornell.EDU
+# 
+# Rxvt has been uploaded to /pub/Linux/Incoming/rxvt.tar.z and
+# rxvt.README on sunsite.unc.edu.
+# 
+# Xvt is an xterm replacement which uses a little less memory, and is 
+# suitable for use on machines with small memories. Tek4010 support
+# is removed.
+# 
+# Modifications were made by Rob Nation (nation@rocket.sanders.lockheed.com) 
+# to make it a little more compact, and to add and remove certain features.
+# 
+# 
+# -- 
+# Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu
+#------------------------------------------------------------------------------
 #
 # Though its change-log does not mention this, John Davis has stated that he
 # was the author of the changes to use the bce ("new color model") which was
@@ -5548,7 +5870,7 @@ rxvt+pcfkeys|fragment for PC-style fkeys,
 # rxvt had usable color support with 2.16 (April 2, 1996), with some help by my
 # work on vttest, as well as bug reports to Mark Olesen.  For instance, the fix
 # mentioned here
-#      http://web.archiveorange.com/archive/v/6ETvLb5wHtbbzCaS4S9J
+#      https://web.archive.org/web/20141016124430/http://web.archiveorange.com/archive/v/6ETvLb5wHtbbzCaS4S9J
 # was from one of my bug-reports -TD
 #
 # While the color model both for xterm and rxvt was based on Linux console,
@@ -5676,7 +5998,7 @@ aterm|AfterStep terminal,
 # xiterm  0.5-5.2
 # This is not based on xterm's source...
 # vttest shows several problems with keyboard, cursor-movements.
-# see also http://invisible-island.net/xterm/xterm.faq.html#bug_xiterm
+# see also https://invisible-island.net/xterm/xterm.faq.html#bug_xiterm
 xiterm|internationalized terminal emulator for X,
        km@,
        kbs=^?, kdch1=\E[3~, use=klone+color, use=xterm-r6,
@@ -5953,26 +6275,26 @@ st|stterm| simpleterm,
 
 # Reviewed 0.7:
 #      dim is intermittent, sometimes works, sometimes does not
-#      italics may show up with yellow color 
+#      italics may show up with yellow color
 #      has control cursor-keys, alt cursor-keys, still no combinations
 #      has control pageup/down
+# tmux extensions, see TERMINFO EXTENSIONS in tmux(1)
+#      Se and Ss are implemented in the source-code, but the terminfo
+#      provided with the source is incorrect, since Se/Ss are mis-coded
+#      as booleans rather than strings.
 st-0.7|simpleterm 0.7,
-       ccc, Se, Ss,
+       ccc,
        dim=\E[2m,
        initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*
              %{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
        kcbt@, kent@, oc=\E]104\007,
-       setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
-            %=%t3%e%p1%d%;m,
-       setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
-            %=%t3%e%p1%d%;m,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|
            %t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m,
-       Ss=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B,
+       Ms=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B,
        kLFT3=\E[1;3D, kLFT5=\E[1;5D, kNXT3=\E[6;3~,
        kNXT5=\E[6;5~, kPRV3=\E[5;3~, kPRV5=\E[5;5~,
        kRIT3=\E[1;3C, kRIT5=\E[1;5C, kUP3=\E[1;3A, kUP5=\E[1;5A,
-       rmxx=\E[29m, smxx=\E[9m, use=st-0.6,
+       use=ecma+strikeout, use=st-0.6,
 
 # st-0.4.1
 #
@@ -6003,7 +6325,7 @@ st-0.7|simpleterm 0.7,
 # still has no function keys past kf36 (no combinations of modifiers)
 # no application keypad mode, e.g, kent.
 st-0.6|simpleterm 0.6,
-       am, bce, hs, mir, msgr, npc, xenl, Tc, XT,
+       am, bce, hs, mir, msgr, npc, xenl, XT,
        colors#8, cols#80, it#8, lines#24, pairs#64,
        acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyy
             zz{{||}}~~,
@@ -6110,7 +6432,8 @@ st-256color|stterm-256color|simpleterm with 256 colors,
        initc@, oc@, use=xterm+256color, use=st,
 
 #### TERMINATOR
-# https://code.google.com/p/jessies/
+# https://github.com/software-jessies-org/jessies/wiki/Terminator
+#
 # Tested using their Debian package org.jessies.terminator 6.104.3256 on 64-bit
 # Debian/current -TD (2011/8/20)
 #
@@ -6150,7 +6473,7 @@ st-256color|stterm-256color|simpleterm with 256 colors,
 # e) removed km
 terminator|Terminator no line wrap,
        eo, mir, msgr, xenl, xon,
-       colors#0x100, cols#80, it#8, lines#24, lm#0, pairs#0x7fff,
+       colors#0x100, cols#80, it#8, lines#24, lm#0, pairs#0x10000,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bold=\E[1m, civis=\E[?25l, clear=\E[H\E[2J,
        cnorm=\E[?25h, cr=\r, csr=\E[%i%p1%d;%p2%dr,
@@ -6181,7 +6504,7 @@ terminator|Terminator no line wrap,
        use=xterm+sl-twm,
 
 #### TERMINOLOGY
-# http://enlightenment.org
+# https://www.enlightenment.org/about-terminology
 #
 # Tested terminology-0.3.0, 0.6.1, using tack and vttest.  This is not a vt100
 # emulator, nor is it compatible with xterm, but it uses a few features from
@@ -6434,10 +6757,11 @@ screen|VT 100/ANSI X3.64 virtual terminal,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
        cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
        dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
-       enacs=\E(B\E)0, flash=\Eg, home=\E[H, ht=^I, hts=\EH,
-       ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E)0,
-       kbs=^H, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
-       kcuu1=\EOA, kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~,
+       enacs=\E(B\E)0, flash=\Eg, home=\E[H, hpa=\E[%i%p1%dG,
+       ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
+       ind=\n, indn=\E[%p1%dS, is2=\E)0, kbs=^H, kcbt=\E[Z,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+       kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
@@ -6447,8 +6771,8 @@ screen|VT 100/ANSI X3.64 virtual terminal,
        sgr=\E[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;
            5%;%?%p5%t;2%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smcup=\E[?1049h, smir=\E[4h,
-       smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, tbc=\E[3g, E0=\E(B,
-       S0=\E(%p1%c, use=ecma+color,
+       smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, tbc=\E[3g,
+       vpa=\E[%i%p1%dd, E0=\E(B, S0=\E(%p1%c, use=ecma+color,
 # The bce and status-line entries are from screen 3.9.13 (and require some
 # changes to .screenrc).
 screen-bce|VT 100/ANSI X3.64 virtual terminal with bce,
@@ -6552,13 +6876,14 @@ screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm,
        invis@, kIC@, kNXT@, kPRV@, meml@, memu@, rep@,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|
            %t;7%;%?%p4%t;5%;%?%p5%t;2%;m,
-       E3@, use=screen+italics, use=screen+fkeys, use=xterm-new,
+       E3@, use=screen+italics, use=screen+fkeys,
+       use=xterm+x11mouse, use=xterm-new,
 #:screen.xterm|screen for modern xterm,
 #:     use=screen.xterm-new,
 # xterm-r6 does not really support khome/kend unless it is propped up by
 # the translations resource.
 screen.xterm-r6|screen customized for X11R6 xterm,
-       bw, use=screen+fkeys, use=xterm-r6,
+       bw, use=xterm+x11mouse, use=screen+fkeys, use=xterm-r6,
 # Color applications running in screen and TeraTerm do not play well together
 # on Solaris because Sun's curses implementation gets confused.
 screen.teraterm|disable ncv in teraterm,
@@ -6566,31 +6891,36 @@ screen.teraterm|disable ncv in teraterm,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i
             \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u
             \264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
-       use=screen+fkeys, use=screen,
+       use=screen+fkeys, use=xterm+x11mouse, use=screen,
 # Other terminals
 screen.rxvt|screen in rxvt,
        bw, XT,
        cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
        kcuu1=\EOA, use=screen+fkeys, use=vt100+enq,
-       use=rxvt+pcfkeys, use=vt220+keypad, use=screen,
+       use=rxvt+pcfkeys, use=xterm+x11mouse, use=vt220+keypad,
+       use=screen,
 screen.Eterm|screen in Eterm,
-       use=screen+fkeys, use=Eterm,
+       use=xterm+x11mouse, use=screen+fkeys, use=Eterm,
 screen.mrxvt|screen in mrxvt,
-       use=screen+fkeys, use=mrxvt,
+       use=xterm+x11mouse, use=screen+fkeys, use=mrxvt,
 screen.vte|screen in any VTE-based terminal,
-       use=screen+italics, use=screen+fkeys, use=vte,
+       use=xterm+x11mouse, use=screen+italics,
+       use=screen+fkeys, use=vte,
 screen.gnome|screen in GNOME Terminal,
-       use=screen+italics, use=screen+fkeys, use=gnome,
+       use=xterm+x11mouse, use=screen+italics,
+       use=screen+fkeys, use=gnome,
 screen.konsole|screen in KDE console window,
-       use=screen+italics, use=screen+fkeys, use=konsole,
+       use=xterm+x11mouse, use=screen+italics,
+       use=screen+fkeys, use=konsole,
 # fix the backspace key
 screen.linux|screen in linux console,
        bw,
-       kbs=^?, kcbt@, use=screen+fkeys, use=screen,
+       kbs=^?, kcbt@, use=xterm+x11mouse, use=screen+fkeys,
+       use=screen,
 screen.mlterm|screen in mlterm,
-       use=screen+fkeys, use=mlterm,
+       use=xterm+x11mouse, use=screen+fkeys, use=mlterm,
 screen.putty|screen in putty,
-       use=screen+fkeys, use=putty,
+       use=xterm+x11mouse, use=screen+fkeys, use=putty,
 
 # The default "screen" entry is reasonably portable, but not optimal for the
 # most widely-used terminal emulators.  The "bce" capability is supported in
@@ -6662,16 +6992,22 @@ screen3|older VT 100/ANSI X3.64 virtual terminal,
 
 #### Tmux
 
-# tmux is compatible with screen, but has support for italics, and some of the
-# xterm cursor bits.
+# tmux is mostly compatible with screen, but has support for italics, and some
+# of the xterm cursor bits.
+#
+# However, unlike screen, tmux has no provision for using derived terminal
+# descriptions.  When screen starts, it looks for a suitable "inner" terminal
+# such as "screen.$TERM" to correspond to the outer terminal's quirks.  The
+# various entries such as screen.xterm-new provide a way to more closely
+# match the terminal.
 tmux|tmux terminal multiplexer,
-       rmso=\E[27m,
+       invis=\E[8m, rmso=\E[27m,
        sgr=\E[0%?%p6%t;1%;%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;
            \s\s\s\s\s\s\s\s\s\s\s\s5%;%?%p5%t;2%;m%?%p9%t\016%e
            \017%;,
-       smso=\E[7m, use=ecma+italics, use=ecma+strikeout,
-       use=xterm+edit, use=xterm+pcfkeys, use=xterm+sl,
-       use=xterm+tmux, use=screen,
+       smso=\E[7m, E3=\E[3J, use=ecma+italics,
+       use=ecma+strikeout, use=xterm+edit, use=xterm+pcfkeys,
+       use=xterm+sl, use=xterm+tmux, use=screen,
 
 tmux-256color|tmux with 256 colors,
        use=xterm+256setaf, use=tmux,
@@ -6738,7 +7074,7 @@ dvtm|dynamic virtual terminal manager,
        use=ecma+italics,
 
 dvtm-256color|dynamic virtual terminal manager with 256 colors,
-       colors#0x100, pairs#0x7fff,
+       colors#0x100, pairs#0x10000,
        setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;
              5;%p1%d%;m,
        setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5
@@ -7109,33 +7445,33 @@ news-unk|SONY NEWS vt100 emulator common entry,
        sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
 #
 # (news-29: this had :TY=ascii: --esr)
-news-29,
+news-29|SONY NEWS vt100 emulator with 29 lines,
        lines#29, use=news-unk,
 # (news-29-euc: this had :TY=euc: --esr)
-news-29-euc,
+news-29-euc|SONY NEWS vt100 emulator with 29 lines and EUC,
        use=news-29,
 # (news-29-sjis: this had :TY=sjis: --esr)
-news-29-sjis,
+news-29-sjis|SONY NEWS vt100 emulator with 29 lines and SJIS,
        use=news-29,
 #
 # (news-33: this had :TY=ascii: --esr)
-news-33,
+news-33|SONY NEWS vt100 with 33 lines,
        lines#33, use=news-unk,
 # (news-33-euc: this had :TY=euc: --esr)
-news-33-euc,
+news-33-euc|SONY NEWS vt100 with 33 lines and EUC,
        use=news-33,
 # (news-33-sjis: this had :TY=sjis: --esr)
-news-33-sjis,
+news-33-sjis|SONY NEWS vt100 with 33 lines and SJIS,
        use=news-33,
 #
 # (news-42: this had :TY=ascii: --esr)
-news-42,
+news-42|SONY NEWS vt100 with 42 lines,
        lines#42, use=news-unk,
 # (news-42-euc: this had :TY=euc: --esr)
-news-42-euc,
+news-42-euc|SONY NEWS vt100 with 42 lines and EUC,
        use=news-42,
 # (news-42-sjis: this had :TY=sjis: --esr)
-news-42-sjis,
+news-42-sjis|SONY NEWS vt100 with 42 lines and SJIS,
        use=news-42,
 #
 #      NEWS-OS old termcap entry
@@ -7341,7 +7677,7 @@ mono-emx|stupid monochrome ansi terminal with only one kind of emphasis,
 # Use this for cygwin32 (tested with beta 19.1)
 # underline is colored bright magenta
 # shifted kf1-kf12 are kf11-kf22
-cygwinB19|ansi emulation for cygwin32,
+cygwinB19|ANSI emulation for cygwin32,
        kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
        kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
@@ -7402,7 +7738,7 @@ cygwinB19|ansi emulation for cygwin32,
 # 2005/11/12 -TD
 #      Remove cbt since it does not work in current cygwin
 #      Add 'mir' and 'in' flags based on tack
-cygwin|ansi emulation for Cygwin,
+cygwin|ANSI emulation for Cygwin,
        am, hs, mir, msgr, xon,
        colors#8, it#8, pairs#64,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j
@@ -7450,7 +7786,7 @@ cygwinDBG|Debug Version for Cygwin,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM,
        dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
-       flash=\E[?5h\E[?5l$<200/>, home=\E[H, hpa=\E[%i%p1%dG,
+       flash=\E[?5h$<200/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
        ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
        il1=\E[L, ind=\n, invis=\E[8m, kNXT=\E[6$, kPRV=\E[5$,
        kb2=\E[G, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
@@ -7589,7 +7925,7 @@ cygwinDBG|Debug Version for Cygwin,
 #      Alt-X                   \E[104~
 #      Alt-Y                   \E[105~
 #      Alt-Z                   \E[106~
-djgpp|ansi emulation for DJGPP alpha,
+djgpp|ANSI emulation for DJGPP alpha,
        am, bce, msgr, xhp, xon, xt,
        colors#8, it#8, pairs#64,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j
@@ -7739,16 +8075,16 @@ pcmw|PC running Microsoft Works,
 # the documentation dated from 1.9.9e) -TD
 #
 # For a US keyboard, with 12 function-kecbt=\E[Z, ys,
-#      kf1-kf12 are unmodifiedcbt=\E[Z, cbt=\E[Z, 
+#      kf1-kf12 are unmodifiedcbt=\E[Z, cbt=\E[Z,
 #      kf13-kf24 use the shift-key
 #      kf25-kf36 use the left alt-key
 #      kf37-kf38 use the control-key
 #      kf49-kf60 use the shift- and control-keys
 # The shifted cursor keys send the sequences originally used for kf61-kf64:
 #      down=\EF+       (kf61)
-#      up=\EF-         (kf62) 
+#      up=\EF-         (kf62)
 #      left=\EF^       (unassigned)
-#      right=\EF$      (kf64) 
+#      right=\EF$      (kf64)
 
 interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with color,
        am, bce, msgr,
@@ -7779,9 +8115,8 @@ interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with colo
        kll=\E[U, knp=\E[T, kpp=\E[S, kri=\EF-, ll=\E[U, nel=\r\n,
        op=\E[m, rc=\E[u, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT,
        rmcup=\E[2b\E[u\r\E[K, rmso=\E[m, rmul=\E[m, rs1=\Ec,
-       sc=\E[s, setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm,
-       sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[7m, smul=\E[4m,
-       use=ansi+rep, use=klone+color,
+       sc=\E[s, sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[7m,
+       smul=\E[4m, use=ansi+rep, use=klone+color,
 
 opennt-35|ntconsole-35|OpenNT-term35 compatible with color,
        lines#35, use=opennt,
@@ -13912,7 +14247,7 @@ cit101e-rv|Citoh CIT-101e (sets reverse video),
        cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        cvvis=\E[3;5v, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
-       dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5l\E[?5h$<200/>,
+       dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5l$<200/>\E[?5h,
        home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
        ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, indn=\E[%p1%dS,
        is2=\E<\E>\E[?1l\E[?3l\E[?4l\E[?5h\E[?7h\E[?8h\E[3g\E[>5g\E(
@@ -19326,7 +19661,7 @@ amiga-vnc|Amiga using VNC console (black on light gray),
 
 # MorphOS on Genesi Pegasos
 # By Pavel Fedin <sonic_amiga@rambler.ru>
-morphos,
+morphos|MorphOS on Genesi Pegasos,
        acsc=, dl=\233%p1%dM, dl1=\233M, il=\233%p1%dL, il1=\233L,
        ind=\204, indn@, kend=\23345~, kf11=\23320~, kf12=\23321~,
        khome=\23344~, kich1=\23340~, knp=\23342~, kpp=\23341~,
@@ -19449,7 +19784,7 @@ minix-3.0|minix console (v3.0),
        use=ecma+color, use=minix-1.7,
 
 # See
-#      http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html
+#      https://web.archive.org/web/20030914201935/http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html
 # This is the entry provided with minix 1.7.4, with bogus :ri: removed.
 minix-1.7|minix console (v1.7),
        am, xenl,
@@ -19823,7 +20158,7 @@ screen.minitel1|Screen specific for minitel1,
             yzz||}}~~,
        bel=\007\E\^ \E\\, bold@, csr@, flash=\Eg\E\^ \E\\, kmous@,
        rmul@, smul@, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\EZ,
-       use=screen,
+       use=xterm+x11mouse, use=screen,
 
 screen.minitel1b|Screen specific for minitel1b,
        kclr=\E[2J, kdl1=\E[M, kf13=^Y{1, kf14=^Y{2, kf15=^Y{3,
@@ -19951,7 +20286,7 @@ screen.linux-m1|Linux m1 specific for screen,
           \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
           \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
           \n\n\n\n\n\n\n\n\n\n,
-       use=screen,
+       use=xterm+x11mouse, use=screen,
 
 screen.linux-m1b|Linux m1b specific for screen,
        colors@, pairs@,
@@ -23494,7 +23829,8 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # "default".
 #
 # XT is harder, since screen's manpage does not give more details.  For that,
-# we must read screen's source-code.  When XT is set, screen assumes
+# we must read screen's source-code.  For example, when XT is set, screen
+# assumes
 #
 # a) OSC 1 sets the title string, e.g., for the icon.  Recent versions of
 #    screen may also set the terminal's name, which is (for xterm) distinct
@@ -23509,8 +23845,16 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #    sequence.  However, because screen uses only termcap, the values returned
 #    by Af/Ab are not usable because they rely on expressions that termcap
 #    does not support.  Therefore, screen uses a hardcoded string to work
-#    around the limitation.
+#    around the limitation.  In a few cases, screen also uses tparm, which
+#    is a terminfo function rather than termcap.
 # f) all entries named "*xterm*" or "*rxvt*" have the bce flag set.
+# g) screen also uses the feature to decide whether to pay attention to other
+#    xterm-related features which are unrelated to the description in the
+#    manual page.
+#
+# Since XT is useful only when the outer terminal matches screen's assumptions,
+# it is appropriate to use it in the derived terminal descriptions such as
+# "screen.xterm", but not in the generic "screen", "screen-bce" entries.
 #
 # The other ISO-2022 features are rarely used, but provided here to make
 # screen's termcap features available.
@@ -25337,4 +25681,58 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #        dm80, hpterm, emu-220, hp2, iTerm2.app, mterm-ansi, ncrvt100an,
 #        st-0.7, vi603, vwmterm -TD
 #
+# 2017-12-30
+#      + add xterm+noalt, xterm+titlestack, xterm+alt1049, xterm+alt+title
+#        blocks from xterm #331 -TD
+#      + add xterm+direct, xterm+indirect, xterm-direct entries from xterm
+#        #331 -TD
+#      + modify xterm+256color and xterm+256setaf to use correct number of
+#        color pairs, for ncurses 6.1 -TD
+#      + add rs1 capability to xterm-256color -TD
+#      + modify xterm-r5, xterm-r6 and xterm-xf86-v32 to use xterm+kbs to
+#        match xterm #272, reflecting packager's changes -TD
+#      + remove "boolean" Se, Ss from st-0.7 -TD
+#
+# 2017-01-04
+#      + add konsole-direct and st-direct -TD
+#      + remove unsupported "Tc" capability from st-0.7; use st-direct if
+#        direct-colors are wanted -TD
+#
+# 2017-01-17
+#      + add vte-direct -TD
+#      + add XT, hpa, indn, and vpa to screen, and invis, E3 to tmux (patch by
+#        Pierre Carru)
+#
+# 2017-01-21
+#      + use xterm+sm+1006 in xterm-new, vte-2014 -TD
+#      + use xterm+x11mouse in iterm, iterm2, mlterm3 because xterm's 1006
+#        mode does not work with those programs.  konsole is debatable -TD
+#      + add "termite" entry (report by Markus Pfeiffer) -TD
+#
+# 2017-01-27
+#      + trim "XT" from screen entry -TD
+#      + modify iterm to use xterm+sl-twm building block -TD
+#      + mark konsole-420pc, konsole-vt100, konsole-xf3x obsolete reflecting
+#        konsole's removal in 2008 -TD
+#      + expanded the history section of konsole to explain its flawed
+#        imitation of xterm's keyboard -TD
+#      + use xterm+x11mouse in screen.* entries because screen does not yet
+#        support xterm's 1006 mode -TD
+#      + add nsterm-build400 for macOS 10.13 -TD
+#      + add ansi+idc1, use that in ansi+idc adding dch for consistency -TD
+#      + update vte to vte-2017 -TD
+#      + add ecma+strikeout to vte-2017 -TD
+#      + add iterm2-direct -TD
+#      + updated teraterm, added teraterm-256color -TD
+#      + add mlterm-direct -TD
+#      + add descriptions for ANSI building-blocks -TD
+#
+# 2018-02-24
+#      + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD
+#      + fix remaining flash capabilities with trailing mandatory delays -TD
+#
+# 2018-03-17
+#      + trim some redundant capabilities from st-0.7 -TD
+#      + trim unnecessary setf/setb from interix -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!