]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - misc/terminfo.src
ncurses 5.5
[ncurses.git] / misc / terminfo.src
index 03add0e1252bad4125432819f9eb42b5d0c9f2f5..21eb3f0e0f6e7127af48fa916d5c3146f41572de 100644 (file)
@@ -4,13 +4,16 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
+#      $Revision: 1.268 $
+#      $Date: 2005/07/24 00:22:25 $
+#
 # The original header is preserved below for reference.  It is noted that there
-# is a newer version which differs in some cosmetic details; we have decided
-# to not change the header unless there is also a change in content.
+# is a "newer" version which differs in some cosmetic details (but actually
+# stopped updates several years ago); we have decided to not change the header
+# unless there is also a change in content.
 #
 #------------------------------------------------------------------------------
 #      Version 10.2.1
-#      $Date: 2002/10/05 18:40:53 $
 #      terminfo syntax
 #
 #      Eric S. Raymond         (current maintainer)
@@ -289,7 +292,7 @@ glasstty|classic glass tty interpreting ASCII control characters,
        bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, ht=^I, kcub1=^H, 
        kcud1=^J, nel=^M^J, .kbs=^H, 
 
-vanilla, 
+vanilla|dumb tty
        OTbs, 
        bel=^G, cr=^M, cud1=^J, ind=^J, 
 
@@ -327,7 +330,9 @@ ansi+arrows,
        kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, 
        khome=\E[H, 
 ansi+sgr|ansi graphic renditions, 
-       blink=\E[5m, invis=\E[8m, rev=\E[7m, sgr0=\E[0m, 
+       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, 
        rmso=\E[m, smso=\E[7m, 
 ansi+sgrul|ansi underline only, 
@@ -562,7 +567,7 @@ ansi-generic|generic ansi standard terminal,
 #
 # This completely describes the sequences specified in the DOS 2.1 ANSI.SYS
 # documentation (except for the keyboard key reassignment feature, which
-# doen't fit the <pfkey> model well).  The klone+acs sequences were valid
+# doesn't fit the <pfkey> model well).  The klone+acs sequences were valid
 # though undocumented.  The <pfkey> capability is untested but should work for
 # keys F1-F10 (%p1 values outside this range will yield unpredictable results).
 # From: Eric S. Raymond <esr@snark.thyrsus.com> Nov 7 1995
@@ -703,12 +708,12 @@ linux-basic|linux console,
        kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, 
        kf5=\E[[E, 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~, 
-       kspd=^Z, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, 
-       rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, 
+       kspd=^Z, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l, 
+       rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, 
        sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, 
-       smir=\E[4h, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR
-       u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd
-       use=klone+sgr, use=ecma+color, 
+       smam=\E[?7h, smir=\E[4h, smul=\E[4m, tbc=\E[3g
+       u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c
+       vpa=\E[%i%p1%dd, use=klone+sgr, use=ecma+color, 
 
 linux-m|Linux console no color, 
        colors@, pairs@, 
@@ -756,6 +761,14 @@ linux-lat|linux with latin1 or latin2 alternate character set,
        acsc=+\020\,\021-\030.^Y0\333`\004a\013f\370g\361h\260i\316j\211k\214l\206m\203n\305o~p\304q\212r\304s_t\207u\215v\301w\302x\205y\363z\362{\343|\330}\234~\376, 
        use=linux, 
 
+# This uses graphics from VT codeset instead of from cp437.
+# reason: cp437 (aka "straight to font") is not functional under luit.
+# from: Andrey V Lukyanov <land@long.yar.ru>.
+linux-vt|linux console using VT codes for graphics, 
+       acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz~~, 
+       rmacs=\E(K, rmpch@, sgr@, sgr0=\E[0m\E(K\017, smacs=\E(0, 
+       smpch@, use=linux, 
+
 #### Mach
 #
 
@@ -781,6 +794,63 @@ mach-color|Mach Console with ANSI color,
        dim=\E[2m, invis=\E[8m, op=\E[37;40m, rmso=\E[27m, 
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=mach, 
 
+# From: Marcus Brinkmann
+# http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/hurd/hurd/console/
+#
+# Comments in the original are summarized here:
+#
+# hurd uses 8-bit characters (km).
+#
+# Although it doesn't do XON/XOFF, we don't want padding characters (xon).
+#
+# Regarding compatibility to vt100:  hurd doesn't specify <xenl>, as we don't
+# have the eat_newline_glitch.  It doesn't support setting or removing tab
+# stops (hts/tbc).
+#
+# hurd uses ^H instead of \E[D for cub1, as only ^H implements <bw> and it is
+# one byte instead three.
+#
+# <ich1> is not included because hurd has insert mode.
+#
+# hurd doesn't use ^J for scrolling, because this could put things into the
+# scrollback buffer.
+#
+# gsbom/grbom are used to enable/disable real bold (not intensity bright) mode. 
+# This is a GNU extension.
+#
+# The original has commented-out ncv, but is restored here.
+#
+# Reading the source, RIS resets cnorm, but not xmous.
+hurd|The GNU Hurd console server, 
+       am, bce, bw, eo, km, mir, msgr, xon, 
+       colors#8, it#8, ncv#18, pairs#64, 
+       acsc=++\,\,--..00ii``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
+       bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, 
+       clear=\Ec, cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr, 
+       cub=\E[%p1%dD, cub1=^H, 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[34l, dch=\E[%p1%dP, 
+       dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, 
+       ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, flash=\Eg, 
+       home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, 
+       il=\E[%p1%dL, il1=\E[L, ind=\E[S, indn=\E[%p1%dS, 
+       invis=\E[8m, kb2=\E[G, kbs=\177, 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~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, 
+       kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, 
+       kf2=\EOQ, kf20=\E[34~, 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~, 
+       kspd=^Z, nel=^M^J, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\E[T, 
+       rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E[10m, rmir=\E[4l, 
+       rmso=\E[27m, rmul=\E[24m, rs1=\EM\E[?1000l, sc=\E7, 
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, 
+       sgr0=\E[0m, sitm=\E[3m, smacs=\E[11m, smir=\E[4h, 
+       smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, grbom=\E[>1l, 
+       gsbom=\E[>1h, 
+
 #### OSF Unix
 #
 
@@ -1454,7 +1524,7 @@ x68k|x68k-ite|NetBSD/x68k ITE,
 # Entry for the DNARD OpenFirmware console, close to ANSI but not quite.
 #
 # (still unfinished, but good enough so far.)
-ofcons, 
+ofcons|DNARD OpenFirmware console
        bw, 
        cols#80, lines#30, 
        bel=^G, blink=\2337;2m, bold=\2331m, clear=^L, cr=^M, 
@@ -1468,23 +1538,39 @@ ofcons,
        kf1=\2330P, kf10=\2330M, kf2=\2330Q, kf3=\2330W, 
        kf4=\2330x, kf5=\2330t, kf6=\2330u, kf7=\2330q, kf8=\2330r, 
        kf9=\2330p, knp=\233/, kpp=\233?, nel=^M^J, rev=\2337m, 
-       rmso=\2330m, rmul=\2330m, sgr0=\2330m, 
-
-# NetBSD "wscons" emulator in vt220 mode
-# These are micro-minimal and probably need to be redone for real
-# after the manner of the pcvt entries.
+       rmso=\2330m, rmul=\2330m, 
+       sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, 
+       sgr0=\2330m, 
+
+# NetBSD "wscons" emulator in vt220 mode.
+# This entry is based on the NetBSD termcap entry, correcting the ncv value.
+# The emulator renders underlined text in red.  Colors are otherwise usable.
+#
+# Testing the emulator and reading the source code (NetBSD 2.0), it appears
+# that "vt220" is inaccurate.  There are a few vt220-features, but most of the
+# vt220 screens in vttest do not work with this emulator.  For instance, it
+# identifies itself (primary DA response) as a vt220 with selective erase.  But
+# the selective erase feature does not work.  The secondary response is copied
+# from Kermit's emulation of vt220, does not correspond to actual vt220.  At
+# the level of detail in a termcap, it is a passable emulator, since ECH does
+# work.  Don't use it on a VMS system -TD
 wsvt25|NetBSD wscons in 25 line DEC VT220 mode, 
-       cols#80, lines#25, use=vt220, 
+       bce, msgr, 
+       colors#8, cols#80, it#8, lines#25, ncv#2, pairs#64, 
+       is2=\E[r\E[25;1H, kend=\E[8~, 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[7~, op=\E[m, setab=\E[4%p1%dm, 
+       setaf=\E[3%p1%dm, use=vt220, 
 
 wsvt25m|NetBSD wscons in 25 line DEC VT220 mode with Meta, 
-       km, 
-       cols#80, lines#25, use=vt220, 
+       km, use=wsvt25, 
 
 # `rasterconsole' provided by 4.4BSD, NetBSD and OpenBSD on SPARC, and 
 # DECstation/pmax.
 rcons|BSD rasterconsole, 
        use=sun-il, 
-# Color version of above. Color currenly only provided by NetBSD.
+# Color version of above. Color currently only provided by NetBSD.
 rcons-color|BSD rasterconsole with ANSI color, 
        bce, 
        colors#8, pairs#64, 
@@ -1551,31 +1637,34 @@ cons25w|ansiw|ansi80x25-raw|freebsd console (25-line raw mode),
        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[=1C, dch=\E[%p1%dP, dch1=\E[P, dim=\E[30;1m, 
-       dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, 
-       hpa=\E[%i%p1%d`, ht=^I, ich=\E[%p1%d@, ich1=\E[@, 
-       il=\E[%p1%dL, il1=\E[L, ind=\E[S, indn=\E[%p1%dS, kb2=\E[E, 
-       kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, 
-       kcuu1=\E[A, kdch1=\177, kend=\E[F, kf1=\E[M, kf10=\E[V, 
-       kf11=\E[W, kf12=\E[X, kf13=\E[Y, kf14=\E[Z, kf15=\E[a, 
-       kf16=\E[b, kf17=\E[c, kf18=\E[d, kf19=\E[e, kf2=\E[N, 
-       kf20=\E[f, kf21=\E[g, kf22=\E[h, kf23=\E[i, kf24=\E[j, 
-       kf25=\E[k, kf26=\E[l, kf27=\E[m, kf28=\E[n, kf29=\E[o, 
-       kf3=\E[O, kf30=\E[p, kf31=\E[q, kf32=\E[r, kf33=\E[s, 
-       kf34=\E[t, kf35=\E[u, kf36=\E[v, kf37=\E[w, kf38=\E[x, 
-       kf39=\E[y, kf4=\E[P, kf40=\E[z, kf41=\E[@, kf42=\E[[, 
-       kf43=\E[\\, kf44=\E[], kf45=\E[\^, kf46=\E[_, kf47=\E[`, 
-       kf48=\E[{, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, 
-       khome=\E[H, kich1=\E[L, knp=\E[G, kpp=\E[I, nel=\E[E, 
-       op=\E[x, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, 
-       rs2=\E[x\E[m\Ec, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, 
+       home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich=\E[%p1%d@, 
+       ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, 
+       indn=\E[%p1%dS, kb2=\E[E, kbs=^H, kcbt=\E[Z, kcub1=\E[D, 
+       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\177, kend=\E[F, 
+       kf1=\E[M, kf10=\E[V, kf11=\E[W, kf12=\E[X, kf13=\E[Y, 
+       kf14=\E[Z, kf15=\E[a, kf16=\E[b, kf17=\E[c, kf18=\E[d, 
+       kf19=\E[e, kf2=\E[N, kf20=\E[f, kf21=\E[g, kf22=\E[h, 
+       kf23=\E[i, kf24=\E[j, kf25=\E[k, kf26=\E[l, kf27=\E[m, 
+       kf28=\E[n, kf29=\E[o, kf3=\E[O, kf30=\E[p, kf31=\E[q, 
+       kf32=\E[r, kf33=\E[s, kf34=\E[t, kf35=\E[u, kf36=\E[v, 
+       kf37=\E[w, kf38=\E[x, kf39=\E[y, kf4=\E[P, kf40=\E[z, 
+       kf41=\E[@, kf42=\E[[, kf43=\E[\\, kf44=\E[], kf45=\E[\^, 
+       kf46=\E[_, kf47=\E[`, kf48=\E[{, kf5=\E[Q, kf6=\E[R, 
+       kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, kich1=\E[L, 
+       knp=\E[G, kpp=\E[I, nel=\E[E, op=\E[x, rc=\E8, rev=\E[7m, 
+       ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, rs2=\E[x\E[m\Ec, sc=\E7, 
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       sgr=\E[0%?%p1%t;2;7%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;30;1%;%?%p6%t;1%;m, 
        sgr0=\E[m, smso=\E[7m, vpa=\E[%i%p1%dd, 
 cons25|ansis|ansi80x25|freebsd console (25-line ansi mode), 
        acsc=-\030.^Y0\333`\004a\260f\370g\361h\261i\025j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263y\363z\362~\371, 
        use=cons25w, 
 cons25-m|ansis-mono|ansi80x25-mono|freebsd console (25-line mono ansi mode), 
        colors@, pairs@, 
-       bold@, dim@, op@, rmul=\E[m, setab@, setaf@, smul=\E[4m, 
-       use=cons25, 
+       bold@, dim@, op@, rmul=\E[m, setab@, setaf@, 
+       sgr=\E[0%?%p1%t;2;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;m, 
+       smul=\E[4m, use=cons25, 
 cons30|ansi80x30|freebsd console (30-line ansi mode), 
        lines#30, use=cons25, 
 cons30-m|ansi80x30-mono|freebsd console (30-line mono ansi mode), 
@@ -1597,7 +1686,9 @@ cons25r|pc3r|ibmpc3r|cons25-koi8-r|freebsd console w/koi8-r cyrillic,
        use=cons25w, 
 cons25r-m|pc3r-m|ibmpc3r-mono|cons25-koi8r-m|freebsd console w/koi8-r cyrillic (mono), 
        colors@, pairs@, 
-       op@, rmul=\E[m, setab@, setaf@, smul=\E[4m, use=cons25r, 
+       op@, rmul=\E[m, setab@, setaf@, 
+       sgr=\E[0%?%p1%t;2;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;30;1%;%?%p6%t;1%;m, 
+       smul=\E[4m, use=cons25r, 
 cons50r|cons50-koi8r|freebsd console w/koi8-r cyrillic (50 lines), 
        lines#50, use=cons25r, 
 cons50r-m|cons50-koi8r-m|freebsd console w/koi8-r cyrillic (50-line mono), 
@@ -1612,8 +1703,9 @@ cons25l1|cons25-iso8859|freebsd console w/iso 8859-1 chars,
        use=cons25w, 
 cons25l1-m|cons25-iso-m|freebsd console w/iso 8859-1 chars (mono), 
        colors@, pairs@, 
-       bold@, dim@, op@, rmul=\E[m, setab@, setaf@, smul=\E[4m, 
-       use=cons25l1, 
+       bold@, dim@, op@, rmul=\E[m, setab@, setaf@, 
+       sgr=\E[0%?%p1%t;2;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;m, 
+       smul=\E[4m, use=cons25l1, 
 cons50l1|cons50-iso8859|freebsd console w/iso 8859-1 chars (50 lines), 
        lines#50, use=cons25l1, 
 cons50l1-m|cons50-iso-m|freebsd console w/iso 8859-1 chars (50-line mono), 
@@ -1693,11 +1785,27 @@ bsdos-ppc|PowerPC BSD/OS Console,
 
 #### DEC VT52
 # (<acsc>/<rmacs>/<smacs> capabilities aren't in DEC's official entry -- esr)
+#
+# Actually (TD pointed this out at the time the acsc string was added):
+# vt52 shouldn't define full acsc since most of the cells don't match.
+# see vt100 manual page A-31.  This is the list that does match:
+#      f degree
+#      g plus/minus
+#      h right-arrow
+#      k down-arrow
+#      m scan-1
+#      o scan-3
+#      q scan-5
+#      s scan-7
+# The line-drawing happens to work in several terminal emulators, but should
+# not be used as a guide to the capabilities of the vt52.  Note in particular
+# that vt52 does not support line-drawing characters (the scan-X values refer
+# to a crude plotting feature) -TD
 vt52|dec vt52, 
        OTbs, 
        cols#80, it#8, lines#24, 
-       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~
-       bel=^G, clear=\EH\EJ, cr=^M, cub1=\ED, cud1=\EB, cuf1=\EC, 
+       acsc=ffgghhompoqqss.k, bel=^G, clear=\EH\EJ, cr=^M
+       cub1=\ED, cud1=\EB, cuf1=\EC, 
        cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, 
        el=\EK, home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, 
        kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, rmacs=\EG, smacs=\EF, 
@@ -1809,6 +1917,44 @@ vt52|dec vt52,
 #  |        $Op        |  $On    |         |
 #  |___kc1_______K4____|_kc3__K5_|_kent_@8_|
 #
+# Note however, that the arrangement of the 5-key ka1-kc3 do not follow the
+# terminfo guidelines.  That is a compromise used to assign the remaining
+# keys on the keypad to kf5-kf0, used on older systems with legacy termcap
+# support:
+vt100+keypad|dec vt100 numeric keypad no fkeys, 
+       ka1=\EOq, ka3=\EOs, kb2=\EOr, kc1=\EOp, kc3=\EOn, 
+vt100+pfkeys|dec vt100 numeric keypad, 
+       kent=\EOM, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, 
+       use=vt100+keypad, 
+vt100+fnkeys|dec vt100 numeric keypad, 
+       kf0=\EOy, kf10=\EOx, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, 
+       kf9=\EOw, use=vt100+pfkeys, 
+#
+# A better adaptation to modern keyboards such as the PC's, which have a dozen
+# function keys and the keypad 2,4,6,8 keys are labeled with arrows keys, is to
+# use the 5-key arrangement to model the arrow keys as suggested in the
+# terminfo guidelines:
+#   _______________________________________
+#  |   PF1   |   PF2   |   PF3   |   PF4   |
+#  |   $OP   |   $OQ   |   $OR   |   $OS   |
+#  |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_|
+#  |    7         8         9         -    |
+#  |   $Ow   |   $Ox   |   $Oy   |   $Om   |
+#  |_ka1__K1_|_________|_ka3__K3_|_________|
+#  |    4    |    5    |    6    |    ,    |
+#  |   $Ot   |   $Ou   |   $Ov   |   $Ol   |
+#  |_________|_kb2__K2_|_________|_________|
+#  |    1    |    2    |    3    |         |
+#  |   $Oq   |   $Or   |   $Os   |  enter  |
+#  |_kc1__K4_|_________|_kc3__K5_|  $OM    |
+#  |         0         |   .     |         |
+#  |        $Op        |  $On    |         |
+#  |___________________|_________|_kent_@8_|
+#
+vt220+keypad|dec vt220 numeric keypad, 
+       ka1=\EOw, ka3=\EOy, kb2=\EOu, kc1=\EOq, kc3=\EOs, kent=\EOM, 
+       kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, 
+#
 # And here, for those of you with orphaned VT100s lacking documentation, is
 # a description of the soft switches invoked when you do `Set Up'.
 # 
@@ -1844,7 +1990,7 @@ vt52|dec vt52,
 #
 # (vt100: I added <rmam>/<smam> based on the init string, also <OTbs>. -- esr)
 vt100|vt100-am|dec vt100 (w/advanced video), 
-       OTbs, am, msgr, xenl, xon, 
+       OTbs, am, mc5i, msgr, xenl, xon, 
        cols#80, it#8, lines#24, vt#3, 
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
        bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, 
@@ -1853,17 +1999,16 @@ vt100|vt100-am|dec vt100 (w/advanced video),
        cuf=\E[%p1%dC, cuf1=\E[C$<2>, 
        cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, 
        cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, 
-       enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, ka1=\EOq, 
-       ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, 
-       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, 
-       kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, 
-       kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, 
-       rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, 
+       enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, kbs=^H, 
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, lf1=pf1, 
+       lf2=pf2, lf3=pf3, lf4=pf4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, 
+       rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, 
        rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, 
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, 
        sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, 
        smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, 
+       use=vt100+fnkeys, 
 vt100nam|vt100-nam|vt100 no automargins, 
        am@, xenl@, use=vt100-am, 
 vt100-vb|dec vt100 (w/advanced video) & no beep, 
@@ -1907,7 +2052,6 @@ vt100-s-bot|vt100-bot-s|vt100 for use with bottom sysline,
 # This entry (or vt102-nsgr) is probably the right thing to use for
 # these.  
 vt102|dec vt102, 
-       mir, 
        dch1=\E[P, dl1=\E[M, il1=\E[L, rmir=\E[4l, smir=\E[4h, 
        use=vt100, 
 vt102-w|dec vt102 in wide mode, 
@@ -1926,7 +2070,9 @@ vt102-nsgr|vt102 no sgr (use if you see snowflakes after highlight changes),
        sgr@, sgr0=\E[m, use=vt102, 
 
 # VT125 Graphics CRT.  Clear screen also erases graphics
+# Some vt125's came configured with vt102 support.
 vt125|vt125 graphics terminal, 
+       mir, 
        clear=\E[H\E[2J\EPpS(E)\E\\$<50>, use=vt100, 
 
 # This isn't a DEC entry, it came from University of Wisconsin.
@@ -2010,12 +2156,14 @@ vt220|vt200|dec vt220,
        kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, 
        kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~, 
        kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, 
-       khome=\E[H, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, 
-       kslt=\E[4~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, mc0=\E[i, 
-       mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, 
+       kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, 
+       lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, mc0=\E[i, mc4=\E[4i, 
+       mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, 
        rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmso=\E[27m, 
-       rmul=\E[24m, rs1=\E[?3l, sc=\E7, sgr0=\E[m, smacs=\E(0$<2>, 
-       smam=\E[?7h, smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
+       rmul=\E[24m, rs1=\E[?3l, sc=\E7, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>, 
+       sgr0=\E[m\E(B, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h, 
+       smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
 vt220-w|vt200-w|DEC vt220 in wide mode, 
        cols#132, 
        rs3=\E[?3h, use=vt220, 
@@ -2041,12 +2189,13 @@ vt220-8bit|vt220-8|vt200-8bit|vt200-8|dec vt220/200 in 8-bit mode,
        kfnd=\2331~, khlp=\23328~, khome=\233H, kich1=\2332~, 
        knp=\2336~, kpp=\2335~, krdo=\23329~, kslt=\2334~, lf1=pf1, 
        lf2=pf2, lf3=pf3, lf4=pf4, mc0=\233i, mc4=\2334i, mc5=\2335i, 
-       nel=\EE, rc=\E8, rev=\2337m, ri=\EM, rmacs=^O, rmam=\233?7l, 
-       rmir=\2334l, rmso=\23327m, rmul=\23324m, rs1=\233?3l, 
-       sc=\E7, sgr0=\233m, smacs=^N, smam=\233?7h, smir=\2334h, 
+       nel=\EE, rc=\E8, rev=\2337m, ri=\EM, rmacs=\E(B, 
+       rmam=\233?7l, rmir=\2334l, rmso=\23327m, rmul=\23324m, 
+       rs1=\233?3l, sc=\E7, 
+       sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>, 
+       sgr0=\2330m\E(B, smacs=\E(0, smam=\233?7h, smir=\2334h, 
        smso=\2337m, smul=\2334m, tbc=\2333g, 
 
-#
 # vt220d:
 # This vt220 description regards F6--F10 as the second block of function keys
 # at the top of the keyboard.  This mapping follows the description given
@@ -2098,7 +2247,6 @@ vt200-js|vt220-js|dec vt200 series with jump scroll,
 #vt320|DEC VT320 in vt100 emulation mode,
 #      use=vt220,
 
-#
 # Use v320n for SCO's LYRIX.  Otherwise, use Adam Thompson's vt320-nam.
 #
 vt320nam|v320n|DEC VT320 in vt100 emul. mode with NO AUTO WRAP mode, 
@@ -2131,38 +2279,39 @@ vt320|vt300|dec vt320 7 bit terminal,
        ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, fsl=\E[0$}, 
        home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, 
        il1=\E[L, ind=\ED, 
-       is2=\E>\E[?3l\E[?4l\E[5?l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
-       ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=\177, kc1=\EOq, kc3=\EOs, 
-       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
-       kdch1=\E[3~, kel=\E[4~, kent=\EOM, kf1=\EOP, 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=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, 
-       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, 
-       khome=\E[1~, kich1=\E[2~, knp=\E[6~, knxt=^I, kpp=\E[5~, 
-       kprv=\E[Z, kslt=\E[4~, mc0=\E[i, mc4=\E[?4i, mc5=\E[?5i, 
-       nel=\EE, rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt300, 
-       ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, 
-       rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, 
-       rs2=\E>\E[?3l\E[?4l\E[5?l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
-       sc=\E7, sgr0=\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, 
+       is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
+       kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       kdch1=\E[3~, kel=\E[4~, 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~, 
+       kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, 
+       kf9=\E[20~, khome=\E[1~, kich1=\E[2~, knp=\E[6~, knxt=^I, 
+       kpp=\E[5~, kprv=\E[Z, kslt=\E[4~, mc0=\E[i, mc4=\E[?4i, 
+       mc5=\E[?5i, nel=\EE, rc=\E8, rev=\E[7m, 
+       rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B, 
+       rmam=\E[?7l, 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\E[1;24r\E[24;1H, 
+       sc=\E7, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>, 
+       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h, 
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
-       tsl=\E[1$}\E[H\E[K, 
+       tsl=\E[1$}\E[H\E[K, use=vt220+keypad, 
 vt320-nam|vt300-nam|dec vt320 7 bit terminal with no am to make SAS happy, 
        am@, 
-       is2=\E>\E[?3l\E[?4l\E[5?l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
-       rs2=\E>\E[?3l\E[?4l\E[5?l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
+       is2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
+       rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
        use=vt320, 
 # We have to init 132-col mode, not 80-col mode.
 vt320-w|vt300-w|dec vt320 wide 7 bit terminal, 
        cols#132, wsl#132, 
-       is2=\E>\E[?3h\E[?4l\E[5?l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
-       rs2=\E>\E[?3h\E[?4l\E[5?l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
+       is2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
+       rs2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
        use=vt320, 
 vt320-w-nam|vt300-w-nam|dec vt320 wide 7 bit terminal with no am, 
        am@, 
-       is2=\E>\E[?3h\E[?4l\E[5?l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
-       rs2=\E>\E[?3h\E[?4l\E[5?l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
+       is2=\E>\E[?3h\E[?4l\E[?5l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
+       rs2=\E>\E[?3h\E[?4l\E[?5l\E[?7l\E[?8h\E[1;24r\E[24;1H, 
        use=vt320-w, 
 
 # VT330 and VT340 -- These are ReGIS and SIXEL graphics terminals
@@ -2193,21 +2342,23 @@ vt340|dec-vt340|vt330|dec-vt330|dec vt340 graphics terminal with 24 line page,
        cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr, 
        cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, 
        cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, 
-       cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[?25h, 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[$}, home=\E[H, ht=^I
-       hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, 
+       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[$}
+       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL
+       il1=\E[L, ind=\ED, 
        is2=\E<\E F\E>\E[?1h\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
        kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
        kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~, 
        kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, 
        lf3=pf3, lf4=pf4, nel=^M\ED, rc=\E8, rev=\E[7m, 
-       rf=/usr/share/tabset/vt300, ri=\EM, rmacs=^O
+       rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B
        rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, 
-       rmul=\E[24m, rs1=\E[?3l, sc=\E7, sgr0=\E[m, smacs=^N, 
-       smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, 
-       smul=\E[4m, tbc=\E[3g, tsl=\E[2$~\E[1$}\E[1;%dH, 
+       rmul=\E[24m, rs1=\E[?3l, sc=\E7, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>, 
+       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h, 
+       smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
+       tsl=\E[2$~\E[1$}\E[1;%dH, 
 
 # DEC doesn't supply a vt400 description, so we add Daniel Glasser's
 # (originally written with vt420 as its primary name, and usable for it).
@@ -2239,8 +2390,8 @@ vt400|vt400-24|dec-vt400|dec vt400 24x80 column autowrap,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 
-       cvvis=\E[?25h, 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/>, 
+       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[$}, 
        home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, 
        il=\E[%p1%dL, il1=\E[L, ind=\ED, 
@@ -2249,11 +2400,12 @@ vt400|vt400-24|dec-vt400|dec vt400 24x80 column autowrap,
        kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~, 
        kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, lf1=pf1, lf2=pf2, 
        lf3=pf3, lf4=pf4, nel=^M\ED, rc=\E8, rev=\E[7m, 
-       rf=/usr/share/tabset/vt300, ri=\EM, rmacs=^O
+       rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B
        rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, 
-       rmul=\E[24m, rs1=\E<\E[?3l\E[!p\E[?7h, sc=\E7, sgr0=\E[m, 
-       smacs=^N, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, 
-       smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
+       rmul=\E[24m, rs1=\E<\E[?3l\E[!p\E[?7h, sc=\E7, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>, 
+       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h, 
+       smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
        tsl=\E[2$~\E[1$}\E[1;%dH, 
 
 # (vt420: I removed <kf0>, it collided with <kf10>.  I also restored
@@ -2282,7 +2434,6 @@ vt420|DEC VT420,
        sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h, 
        smkx=\E=, smso=\E[7m, smul=\E[4m, 
 
-#
 # DEC VT220 and up support DECUDK (user-defined keys).  DECUDK (i.e., pfx)
 # takes two parameters, the key and the string.  Translating the key is
 # straightforward (keys 1-5 are not defined on real terminals, though some
@@ -2446,12 +2597,17 @@ crt|crt-vt220|CRT 2.3 emulating VT220,
        hts=\EH, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 
        use=vt220, use=ecma+color, 
 
-# PuTTY 0.51 (released 14 December 2000)
+# PuTTY 0.55 (released 3 August 2004)
 # http://www.chiark.greenend.org.uk/~sgtatham/putty/
 #
+# Comparing with 0.51, vttest is much better (only a few problems with the
+# cursor position reports and wrapping).
+#
+# PuTTY 0.51 (released 14 December 2000)
+#
 # This emulates vt100 + vt52 (plus a few vt220 features:  ech, SRM, DECTCEM, as
 # well as SCO and Atari, color palettes from Linux console).  Reading the code,
-# it is intended to be VT102 plus selected features By default, it sets $TERM
+# it is intended to be VT102 plus selected features By default, it sets $TERM
 # to xterm, which is incorrect, since several features are misimplemented:
 #
 #      Alt+key always sends ESC+key, so 'km' capability is removed.
@@ -2463,39 +2619,48 @@ crt|crt-vt220|CRT 2.3 emulating VT220,
 #
 # Several features such as backspace/delete are optional; this entry documents
 # the default behavior -TD
-putty|xterm clone (win32), 
-       am, bw, ccc, km, mir, msgr, xenl, 
-       colors#8, cols#80, it#8, lines#24, pairs#64, 
-       acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
-       bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
-       clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, 
+
+putty|PuTTY terminal emulator, 
+       am, bce, bw, ccc, hs, mir, msgr, xenl, xon, 
+       colors#8, it#8, ncv#22, pairs#64, 
+       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
+       bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, 
+       clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, 
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
-       cud=\E[%p1%dB, cud1=^J, 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, 
-       ech=\E[%p1%dX, ed=\E[J, el=\E[K, enacs=\E)0, home=\E[H, 
-       hpa=\E[%i%p1%dG, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, 
-       ind=^J, 
-       initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{255}%&%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%p3%{255}%&%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%p4%{255}%&%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;, 
-       is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, 
-       kbs=\177, kcbt=\E[Z, 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~, 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~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, 
-       kpp=\E[5~, kslt=\E[4~, oc=\E]R, op=\E[39;49m, 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>, 
+       cud=\E[%p1%dB, cud1=\ED, cuf=\E[%p1%dC, cuf1=\E[C, 
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM, 
+       dch=\E[%p1%dP, dch1=\E[P, 
+       dispc=%?%p1%{8}%=%t\E%%G\342\227\230\E%%@%e%p1%{10}%=%t\E%%G\342\227\231\E%%@%e%p1%{12}%=%t\E%%G\342\231\0\E%%@%e%p1%{13}%=%t\E%%G\342\231\252\E%%@%e%p1%{14}%=%t\E%%G\342\231\253\E%%@%e%p1%{15}%=%t\E%%G\342\230\274\E%%@%e%p1%{27}%=%t\E%%G\342\206\220\E%%@%e%p1%{155}%=%t\E%%G\340\202\242\E%%@%e%p1%c%;, 
+       dl=\E[%p1%dM, dl1=\E[M, dsl=\E]0;\007, ech=\E[%p1%dX, 
+       ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, 
+       flash=\E[?5h\E[?5l, fsl=^G, home=\E[H, hpa=\E[%i%p1%dG, 
+       ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J, 
+       indn=\E[%p1%dS, 
+       initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x, 
+       is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>\E]R, 
+       kb2=\E[G, kbs=\177, kcan=^C, kcbt=\E[Z, kcub1=\E[D, 
+       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, 
+       kend=\E[4~, 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~, 
+       khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, 
+       kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m, 
+       ri=\EM, rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l, 
+       rmcup=\E[2J\E[?47l, rmir=\E[4l, rmpch=\E[10m, 
        rmso=\E[27m, rmul=\E[24m, 
-       rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sc=\E7, 
+       rs2=\E<\E["p\E[50;6"p\Ec\E[?3l\E]R\E[?1000l, 
+       s0ds=\E[10m, s1ds=\E[11m, s2ds=\E[12m, sc=\E7, 
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
-       sgr0=\E[m, 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, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 
-       vpa=\E[%i%p1%dd, 
+       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
+       sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[?47h, 
+       smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, 
+       tbc=\E[3g, tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, 
+       u9=\E[c, vpa=\E[%i%p1%dd, 
+vt100-putty|Reset Putty to pure vt100, 
+       rs2=\E<\E["p\Ec\E[?3l\E]R\E[40"p\E[61"p\E[50;1;2"p, 
+       use=vt100, 
 
 # This entry is for Tera Term Pro version 2.3, for MS-Windows 95/NT written by
 # T. Teranishi dated Mar 10, 1998.  It is a free software terminal emulator
@@ -2552,7 +2717,7 @@ teraterm|Tera Term Pro,
        kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, 
        kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, 
        kpp=\E[5~, kslt=\E[4~, op=\E[100m, rev=\E[7m, ri=\EM, 
-       rmso=\E[27m, rmul=\E[24m, sgr0=\E[m, smso=\E[7m, 
+       rmso=\E[27m, rmul=\E[24m, sgr0=\E[0m\017, smso=\E[7m, 
        smul=\E[4m, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 
        vpa=\E[%i%p1%dd, use=klone+color, use=vt100, 
 
@@ -2579,11 +2744,53 @@ ms-vt100|MS telnet imitating dec vt100,
 # a) This version has no function keys or numeric keypad.  Unlike the older
 #    version, the numeric keypad is entirely ignored.
 # b) The program sets $TERM to "ansi", which of course is inaccurate.
-ms-vt100-color|windows 2000 ansi (sic), 
+ms-vt100-color|vtnt|windows 2000 ansi (sic), 
        bce, 
        dch=\E[%p1%dP, ich=\E[%p1%d@, use=ecma+color, 
        use=ms-vt100, 
 
+# Based on comments from Federico Bianchi:
+#
+#      vt100+ is basically a VT102-noSGR with ANSI.SYS colors and a different
+#      scheme for PF keys.
+#
+# and PuTTY wishlist:
+#
+#      The modifiers are represented as the codes listed above, prefixed to
+#      the normal sequences.  If the modifier is pressed alone, its sequence
+#      is transmitted twice in succession.  If multiple modifiers apply,
+#      they're transmitted in the order shift, control, alt.
+#
+#      Shift   \E^S
+#      Alt     \E^A,
+#      Ctrl    \E^C,
+ms-vt100+|vt100+|windows XP vt100+ (sic), 
+       kdch1=\E-, kend=\Ek, kf1=\E1, kf10=\E0, kf11=\E!, kf12=\E@, 
+       kf13=\E\023\E1, kf14=\E\023\E2, kf15=\E\023\E3, 
+       kf16=\E\023\E4, kf17=\E\023\E5, kf18=\E\023\E6, 
+       kf19=\E\023\E7, kf2=\E2, kf20=\E\023\E8, kf21=\E\023\E9, 
+       kf22=\E\023\E0, kf23=\E\023\E!, kf24=\E\023\E@, 
+       kf25=\E\003\E1, kf26=\E\003\E2, kf27=\E\003\E3, 
+       kf28=\E\003\E4, kf29=\E\003\E5, kf3=\E3, kf30=\E\003\E6, 
+       kf31=\E\003\E7, kf32=\E\003\E8, kf33=\E\003\E9, 
+       kf34=\E\003\E0, kf35=\E\003\E!, kf36=\E\003\E@, 
+       kf37=\E\001\E1, kf38=\E\001\E2, kf39=\E\001\E3, kf4=\E4, 
+       kf40=\E\001\E4, kf41=\E\001\E5, kf42=\E\001\E6, 
+       kf43=\E\001\E7, kf44=\E\001\E8, kf45=\E\001\E9, 
+       kf46=\E\001\E0, kf47=\E\001\E!, kf48=\E\001\E@, kf5=\E5, 
+       kf6=\E6, kf7=\E7, kf8=\E8, kf9=\E9, khome=\Eh, kich1=\E+, 
+       knp=\E/, kpp=\E?, use=ms-vt100-color, 
+
+ms-vt-utf8|vt-utf8|UTF-8 flavor of vt100+, 
+       use=ms-vt100+, 
+
+# a minimal subset of a vt100 (compare with "news-unk).
+tt|tkterm|Don Libes' tk text widget terminal emulator, 
+       clear=\E[H\E[J, cr=^M, cuf1=\E[C, cup=\E[%p1%d;%p2%dH, 
+       cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, 
+       kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, rmso=\E[m, 
+       smso=\E[7m, 
+
 #### X terminal emulators
 #
 # You can add the following line to your .Xdefaults to change the terminal type
@@ -2691,9 +2898,8 @@ 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=^J, 
        is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, 
-       ka1=\EOw, ka3=\EOu, kb2=\EOy, kbeg=\EOE, kbs=^H, kc1=\EOq, 
-       kc3=\EOs, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
-       kdch1=\177, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~, 
+       kbeg=\EOE, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, 
+       kcuu1=\EOA, kdch1=\177, 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~, 
@@ -2710,7 +2916,7 @@ xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System),
        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, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 
-       vpa=\E[%i%p1%dd, use=ecma+color, 
+       vpa=\E[%i%p1%dd, use=ecma+color, use=vt220+keypad, 
 
 # This is the stock xterm entry supplied with XFree86 3.3, which uses VT100
 # codes for F1-F4 except while in VT220 mode.
@@ -2750,74 +2956,127 @@ xterm-xf86-v40|xterm terminal emulator (XFree86 4.0 Window System),
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
        smcup=\E[?1049h, use=xterm-xf86-v333, 
 
-xterm-xfree86|xterm-new|xterm terminal emulator (XFree86 4.0 Window System), 
+# This version was released in XFree86 4.3.
+xterm-xf86-v43|xterm terminal emulator (XFree86 4.3 Window System), 
+       kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, 
+       kLFT=\E[1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, 
+       kbeg@, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, 
+       use=xterm-xf86-v40, 
+
+# This version was released in XFree86 4.4.
+xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System), 
+       cnorm=\E[?12l\E[?25h, cvvis=\E[?12;25h, indn=\E[%p1%dS, 
+       rin=\E[%p1%dT, use=xterm-xf86-v43, 
+
+# This is the most common alias for xterm-new.
+xterm-xfree86|xterm terminal emulator (XFree86), 
+       use=xterm-new, 
+#      use=xterm-old, 
+
+# This version is current (XFree86 xterm patch #192).
+xterm-new|modern xterm terminal emulator, 
        npc, 
-       kDC=\E[3;2~, kEND=\EO2F, kHOM=\EO2H, kIC=\E[2;2~, 
-       kLFT=\EO2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\EO2C, 
-       kb2=\EOE, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, 
-       kcuu1=\EOA, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~, 
-       kf11=\E[23~, kf12=\E[24~, kf13=\EO2P, kf14=\EO2Q, 
-       kf15=\EO2R, kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, 
-       kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, 
-       kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P, 
-       kf26=\EO5Q, kf27=\EO5R, kf28=\EO5S, kf29=\E[15;5~, 
-       kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, 
+       indn=\E[%p1%dS, kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, 
+       kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, 
+       kRIT=\E[1;2C, kb2=\EOE, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, 
+       kcuf1=\EOC, kcuu1=\EOA, kend=\EOF, kent=\EOM, khome=\EOH, 
+       kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, 
+       rin=\E[%p1%dT, use=xterm+pcfkeys, use=xterm-basic, 
+#
+# This fragment describes as much of XFree86 xterm's "pc-style" function
+# keys as will fit into terminfo's 60 function keys.
+# From ctlseqs.ms:
+#    Code     Modifiers
+#  ---------------------------------
+#     2       Shift
+#     3       Alt
+#     4       Shift + Alt
+#     5       Control
+#     6       Shift + Control
+#     7       Alt + Control
+#     8       Shift + Alt + Control
+#  ---------------------------------
+# The meta key may also be used as a modifier in this scheme, adding another
+# bit to the parameter.
+xterm+pcfkeys|fragment for PC-style fkeys, 
+       kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, 
+       kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, kf16=\EO2S, 
+       kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, 
+       kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, 
+       kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P, kf26=\EO5Q, 
+       kf27=\EO5R, kf28=\EO5S, kf29=\E[15;5~, kf3=\EOR, 
+       kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, 
        kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~, 
        kf36=\E[24;5~, kf37=\EO6P, kf38=\EO6Q, kf39=\EO6R, 
        kf4=\EOS, kf40=\EO6S, kf41=\E[15;6~, kf42=\E[17;6~, 
        kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~, 
-       kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, kf5=\E[15~, 
-       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\EOH, 
-       kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, 
-       use=xterm-basic, 
+       kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, kf49=\EO3P, 
+       kf5=\E[15~, kf50=\EO3Q, kf51=\EO3R, kf52=\EO3S, 
+       kf53=\E[15;3~, kf54=\E[17;3~, kf55=\E[18;3~, 
+       kf56=\E[19;3~, kf57=\E[20;3~, kf58=\E[21;3~, 
+       kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~, kf61=\EO4P, 
+       kf62=\EO4Q, kf63=\EO4R, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, 
+       kDN=\E[1;2B, kDN5=\E[1;5B, kDN6=\E[1;6B, kLFT5=\E[1;5D, 
+       kLFT6=\E[1;6D, kRIT5=\E[1;5C, kRIT6=\E[1;6C, kUP=\E[1;2A, 
+       kUP5=\E[1;5A, kUP6=\E[1;6A, 
 #
 # This chunk is used for building the VT220/Sun/PC keyboard variants.
 xterm-basic|xterm terminal emulator - common (XFree86), 
-       am, bce, km, mc5i, mir, msgr, xenl
+       OTbs, am, bce, km, mc5i, mir, msgr, xenl, AX
        colors#8, cols#80, it#8, lines#24, pairs#64, 
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, 
-       clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, 
+       clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M, 
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
        cud=\E[%p1%dB, cud1=^J, 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, 
-       ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0
+       cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, 
+       dl1=\E[M, 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, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, 
        ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kbs=^H, 
        kdch1=\E[3~, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El, 
-       memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, 
-       rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>
-       rmso=\E[27m, rmul=\E[24m, rs1=\Ec, 
+       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>, 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=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;
-       sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[?1049h, 
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%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=, smso=\E[7m, smul=\E[4m, 
        tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 
        vpa=\E[%i%p1%dd, 
 
 # 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, 
 
 # This is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey)
 xterm-16color|xterm with 16 colors like aixterm, 
-       ncv#32, use=ibm+16color, use=xterm-xfree86
+       ncv#32, use=ibm+16color, use=xterm-new
 
 # These variants of XFree86 3.9.16 xterm are built as a configure option.
 xterm-256color|xterm with 256 colors, 
        ccc, 
-       colors#256, ncv#32, pairs#256
+       colors#256, pairs#32767
        initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, 
        setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm, 
        setb=\E[48;5;%p1%dm, setf=\E[38;5;%p1%dm, 
-       use=xterm-xfree86
+       use=xterm-new
 xterm-88color|xterm with 88 colors, 
-       colors#88, pairs#88, use=xterm-256color, 
+       colors#88, pairs#7744, use=xterm-256color, 
+
+# These two are used to demonstrate the any-event mouse support, i.e., by
+# using an extended name "XM" which tells ncurses to put the terminal into
+# a special mode when initializing the xterm mouse.
+xterm-1002|testing xterm-mouse, 
+       XM=\E[?1002%?%p1%{1}%=%th%el%;, use=xterm-new, 
+xterm-1003|testing xterm-mouse, 
+       XM=\E[?1003%?%p1%{1}%=%th%el%;, use=xterm-new, 
 
 # This is another variant, for XFree86 4.0 xterm (T.Dickey)
 # This is an 8-bit version of xterm, which emulates DEC vt220 with ANSI color.
@@ -2829,21 +3088,21 @@ xterm-88color|xterm with 88 colors,
 #      CSI     \E [    \233
 #
 xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), 
-       OTbs, am, bce, km, mc5i, mir, msgr, npc, xenl, 
+       OTbs, am, bce, km, mc5i, mir, msgr, npc, xenl, AX, 
        colors#8, cols#80, it#8, lines#24, pairs#64, 
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
        bel=^G, blink=\2335m, bold=\2331m, cbt=\233Z, 
-       civis=\233?25l, clear=\233H\2332J, cnorm=\233?25h, cr=^M, 
-       csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cub1=^H, 
-       cud=\233%p1%dB, cud1=^J, cuf=\233%p1%dC, cuf1=\233C, 
-       cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, cuu1=\233A, 
+       civis=\233?25l, clear=\233H\2332J, 
+       cnorm=\233?25l\233?25h, cr=^M, csr=\233%i%p1%d;%p2%dr, 
+       cub=\233%p1%dD, cub1=^H, cud=\233%p1%dB, cud1=^J, 
+       cuf=\233%p1%dC, cuf1=\233C, cup=\233%i%p1%d;%p2%dH, 
+       cuu=\233%p1%dA, cuu1=\233A, cvvis=\233?12;25h, 
        dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM, dl1=\233M, 
        ech=\233%p1%dX, ed=\233J, el=\233K, el1=\2331K, 
-       enacs=\E(B\E)0, flash=\233?5h$<100/>\233?5l, 
-       home=\233H, hpa=\233%i%p1%dG, ht=^I, hts=\210, 
-       ich=\233%p1%d@, il=\233%p1%dL, il1=\233L, ind=^J, 
-       invis=\2338m, 
-       is2=\E7\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>, 
+       flash=\233?5h$<100/>\233?5l, home=\233H, 
+       hpa=\233%i%p1%dG, ht=^I, hts=\210, ich=\233%p1%d@, 
+       il=\233%p1%dL, il1=\233L, ind=^J, invis=\2338m, 
+       is2=\E[62"p\E G\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r\E8, 
        ka1=\217w, ka3=\217u, kb2=\217y, kbeg=\217E, kbs=^H, 
        kc1=\217q, kc3=\217s, kcbt=\233Z, kcub1=\217D, kcud1=\217B, 
        kcuf1=\217C, kcuu1=\217A, kdch1=\2333~, kend=\2334~, 
@@ -2855,18 +3114,18 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System),
        kf9=\23320~, khome=\2331~, kich1=\2332~, kmous=\233M, 
        knp=\2336~, kpp=\2335~, mc0=\233i, mc4=\2334i, mc5=\2335i, 
        meml=\El, memu=\Em, op=\23339;49m, rc=\E8, rev=\2337m, 
-       ri=\215, rmacs=^O, rmam=\233?7l, rmcup=\233?1049l, 
+       ri=\215, rmacs=\E(B, rmam=\233?7l, rmcup=\233?1049l, 
        rmir=\2334l, rmkx=\233?1l\E>, rmso=\23327m, rmul=\23324m, 
        rs1=\Ec, 
-       rs2=\E[62"p\E G\E7\233r\E8\233m\233?7h\233?1;3;4;6l\2334l\E>
+       rs2=\E[62"p\E G\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r\E8
        sc=\E7, setab=\2334%p1%dm, setaf=\2333%p1%dm, 
        setb=\2334%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, 
        setf=\2333%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, 
-       sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, 
-       sgr0=\233m^O, smacs=^N, 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, 
+       sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;, 
+       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, 
 
 xterm-hp|XFree86 xterm with hpterm function keys, 
        kclr=\EJ, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, 
@@ -2885,7 +3144,7 @@ xterm-sco|XFree86 xterm with SCO function keys,
        kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, 
        kich1=\E[L, knp=\E[G, kpp=\E[I, use=xterm-basic, 
 
-# The xterm-xfree86 description has all of the features, but is not completely
+# The xterm-new description has all of the features, but is not completely
 # compatible with vt220.  If you are using a Sun or PC keyboard, set the
 # sunKeyboard resource to true:
 #      + maps the editing keypad
@@ -2895,15 +3154,13 @@ xterm-sco|XFree86 xterm with SCO function keys,
 #      + uses DEC-style control sequences for the application keypad.
 #        
 xterm-vt220|XFree86 xterm emulating vt220, 
-       ka1=\EOw, ka3=\EOy, kbeg=\EOu, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, 
-       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[4~, 
-       kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, 
+       kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       kend=\E[4~, 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=\EOQ, 
-       kf20=\E[34~, 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~, 
-       use=xterm-basic, 
+       kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, 
+       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~, 
+       use=xterm-basic, use=vt220+keypad, 
 
 xterm-vt52|XFree86 xterm emulating dec vt52, 
        cols#80, it#8, lines#24, 
@@ -2922,8 +3179,7 @@ xterm-24|vs100|xterms|xterm terminal emulator (X Window System),
 
 # This is xterm for ncurses.
 xterm|xterm terminal emulator (X Window System), 
-       use=xterm-r6, 
-#      use=xterm-xfree86, 
+       use=xterm-new, 
 
 # These entries allow access to the X titlebar and icon name as a status line. 
 # Note that twm (and possibly window managers descended from it such as tvtwm, 
@@ -2951,10 +3207,12 @@ xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold,
 #  -- MATSUMOTO Shoji)
 kterm|kterm kanji terminal emulator (X window system), 
        eslok, hs, 
-       acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
+       acsc=++\,\,--..00ii``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
        csr=\E[%i%p1%d;%p2%dr, dsl=\E[?H, enacs=, fsl=\E[?F, 
-       kmous=\E[M, rc=\E8, rmacs=\E(B, sc=\E7, smacs=\E(0, 
-       tsl=\E[?E\E[?%i%dT, use=xterm-r6, use=ecma+color, 
+       kmous=\E[M, rc=\E8, rmacs=\E(B, rmam=\E[?7l, sc=\E7, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, 
+       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, 
+       tsl=\E[?E\E[?%i%p1%dT, use=xterm-r6, use=ecma+color, 
 kterm-color|kterm-co|kterm with ANSI colors, 
        ncv@, use=kterm, use=ecma+color, 
 # See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file
@@ -2981,9 +3239,8 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X,
        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, home=\E[H, ht=^I, 
        ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=^J, 
-       is1=\E[r\E[m\E[?7h\E[?4;6l\E[4l, ka1=\EOw, ka3=\EOy, 
-       kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\EOD, kcud1=\EOB, 
-       kcuf1=\EOC, kcuu1=\EOA, kend=\E[8~, kent=\EOM, kf1=\E[11~, 
+       is1=\E[r\E[m\E[?7h\E[?4;6l\E[4l, kbs=^H, kcub1=\EOD, 
+       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[8~, 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[7~, kich1=\E[2~, 
@@ -2993,9 +3250,9 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X,
        rs1=\E(B\017\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<, 
        sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
-       sgr0=\E[m, smacs=^N, smam=\E[?7h, 
+       sgr0=\E[0m\017, smacs=^N, smam=\E[?7h, 
        smcup=\E[?1;41s\E[?1;41h\E=, smir=\E[4h, smso=\E[7m, 
-       smul=\E[4m, use=ecma+color, 
+       smul=\E[4m, use=ecma+color, use=vt220+keypad, 
 
 # The 'nxterm' distributed with Redhat Linux 5.2 is a slight rehack of
 # xterm-sb_right-ansi-3d, which implements ANSI colors, but does not support
@@ -3005,7 +3262,9 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X,
 #
 # Redhat Linux 6.x distributes XFree86 xterm as "nxterm", which uses bce
 # colors; note that this is not compatible with the 5.2 version.
-nxterm|xterm-color|generic color xterm, 
+# csw (2002-05-15): make xterm-color primary instead of nxterm, to 
+#   match XFree86's xterm.terminfo usage and prevent circular links
+xterm-color|nxterm|generic color xterm, 
        ncv@, 
        op=\E[m, use=xterm-r6, use=klone+color, 
 
@@ -3038,10 +3297,38 @@ gnome-rh72|GNOME Terminal,
        civis=\E[?25l, cnorm=\E[?25h, kdch1=\E[3~, kf1=\EOP, 
        kf2=\EOQ, kf3=\EOR, kf4=\EOS, rmam=\E[?7l, 
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\016%e\017%;, 
-       smam=\E[?7h, tbc@, use=xterm-color, 
+       sgr0=\E[0m\017, smam=\E[?7h, tbc@, use=xterm-color, 
+
+# GNOME Terminal 2.0.1 (Redhat 8.0)
+#
+# Documentation now claims it implements vt220 (which is demonstrably false). 
+# However, it does implement ECH, which is a vt220 feature.  And there are
+# workable vt100 LNM, DECALN, DECSNM modes, making it possible to display
+# more of its bugs using vttest.
+#
+# However, note that bce and msgr are broken in this release.  Tabs (tbc and
+# hts) are broken as well.  Sometimes flash (as in xterm-new) works.
+#
+# kf1 and kf10 are not tested since they're assigned (hardcoded?) to menu
+# operations.  Shift-tab generates a distinct sequence so it can be argued
+# that it implements kcbt.
+gnome-rh80|GNOME Terminal, 
+       bce@, msgr@, 
+       ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, kbs=\177, 
+       kcbt=\E^I, op=\E[39;49m, use=gnome-rh72, 
+
+# GNOME Terminal 2.2.1 (Redhat 9.0)
+#
+# bce and msgr are repaired.
+gnome-rh90|GNOME Terminal, 
+       bce, msgr, 
+       hpa=\E[%i%p1%dG, kDC=\E[3;2~, kLFT=\EO2D, kRIT=\EO2C, 
+       kb2=\E[E, kcbt=\E[Z, kend=\EOF, khome=\EOH, tbc=\E[3g, 
+       vpa=\E[%i%p1%dd, use=xterm+pcfkeys, use=gnome-rh80, 
 
 gnome|GNOME Terminal, 
-       use=gnome-rh72, 
+       rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h, 
+       use=gnome-rh90, 
 
 # This is kvt 0-18.7, shipped with Redhat 6.0 (though whether it supports bce
 # or not is debatable).
@@ -3071,17 +3358,24 @@ kvt|KDE terminal,
 #    vt220, which is doubly incorrect because it does not implement vt220
 #    control sequences except for a few special cases).  Treat it as a
 #    mildly-broken vt102.
+#
+# Update for konsole 1.3.2:
+#    The 1049 private mode works (but see the other xterm screens in vttest).
+#    Primary Device Attributes now returns the code for a vt100 with advanced
+#    video option.  Perhaps that's intended to be a "mildly-broken vt102".
 konsole-base|KDE console window, 
        bce, km@, npc, 
        bel@, blink=\E[5m, civis=\E[?25l, cnorm=\E[?25h, 
        ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, 
-       hpa=\E[%i%p1%dG, kbs@, kdch1@, kend@, kf1@, kf10@, kf11@, kf12@, 
-       kf13@, kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, 
-       kf4@, kf5@, kf6@, kf7@, kf8@, kf9@, kfnd@, khome@, kslt@, 
-       rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m, 
+       hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1@, 
+       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%;, 
-       smam=\E[?7h, vpa=\E[%i%p1%dd, use=ecma+color
-       use=xterm-r6, 
+       sgr0=\E[0m\017, smam=\E[?7h, vpa=\E[%i%p1%dd
+       use=ecma+color, use=xterm-r6, 
 konsole-linux|KDE console window with linux keyboard, 
        kdch1=\E[3~, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, 
        kf12=\E[24~, kf13@, kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, 
@@ -3095,7 +3389,10 @@ konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm,
 # The value for kbs reflects local customization rather than the settings used
 # for XFree86 xterm.
 konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm, 
-       kbs=^H, kend=\EOF, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, 
+       kend=\EOF, kf1=\EOP, kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, 
+       kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, 
+       kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, 
+       kf23=\E[23;2~, kf24=\E[24;2~, kf3=\EOR, kf4=\EOS, 
        khome=\EOH, use=konsole-vt100, 
 # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but
 # it is still useful for deriving the other entries.
@@ -3111,7 +3408,47 @@ 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-linux, 
+       use=konsole-xf4x, 
+
+# Based on mlterm 2.8.0's mlterm.ti, with corrections/additions from reading
+# the source code and running tack -TD
+#
+# This is nominally a vt102 emulator, with features borrowed from rxvt and
+# xterm.
+#
+# There are some problems with vttest:
+#      save/restore cursor doesn't restore character
+#      test of character sets leaves it in line-drawing mode.
+mlterm|multi lingual terminal emulator, 
+       am, eslok, km, mc5i, mir, msgr, npc, xenl, 
+       colors#8, cols#80, it#8, lines#24, pairs#64, 
+       acsc=00``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
+       bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, cr=^M, 
+       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
+       cud=\E[%p1%dB, cud1=^J, 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, 
+       ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=, 
+       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=^J, indn=\E[%p1%dS, 
+       is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, 
+       kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       kdch1=\E[3~, kend=\EOF, kent=\EOM, 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~, kfnd=\E[1~, khome=\EOH, kich1=\E[2~, 
+       kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, mc0=\E[i, 
+       nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, 
+       rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, 
+       rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>, 
+       rmso=\E[m, rmul=\E[m, 
+       rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l, 
+       sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, 
+       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E7\E[?47h, 
+       smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, 
+       tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 
+       vpa=\E[%i%p1%dd, 
 
 # From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
 # Updated: Oezguer Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
@@ -3131,6 +3468,8 @@ konsole|KDE console window,
 # rxvt is normally configured to look for "xterm" or "xterm-color" as $TERM.
 # Since rxvt is not really compatible with xterm, it should be configured as
 # "rxvt" (monochrome) and "rxvt-color". 
+#
+# removed dch/dch1 because they are inconsistent with bce/ech -TD
 rxvt-basic|rxvt terminal base (X Window System), 
        OTbs, am, bce, eo, km, mir, msgr, xenl, xon, 
        cols#80, it#8, lines#24, 
@@ -3140,32 +3479,121 @@ rxvt-basic|rxvt terminal base (X Window System),
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
        cud=\E[%p1%dB, cud1=^J, 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, ed=\E[J, 
-       el=\E[K, el1=\E[1K, enacs=\E(B\E)0, flash=\E[?5h\E[?5l, 
-       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, 
-       il=\E[%p1%dL, il1=\E[L, ind=^J, is1=\E[?47l\E=\E[?1l, 
-       is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, 
-       kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kLFT=\E[d, kNXT=\E[6$, 
-       kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=^H, 
-       kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, 
-       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kel=\E[8\^, 
-       kend=\E[8~, kent=\EOM, 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=\E[7~, kich1=\E[2~, 
-       kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, rc=\E8, 
-       rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8, 
-       rmir=\E[4l, rmkx=\E>, rmso=\E[27m, rmul=\E[24m, 
+       dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, 
+       enacs=\E(B\E)0, flash=\E[?5h\E[?5l, home=\E[H, ht=^I, 
+       hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, 
+       ind=^J, is1=\E[?47l\E=\E[?1l, 
+       is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H, 
+       kcbt=\E[Z, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, 
+       rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m, 
+       rmul=\E[24m, 
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, 
-       rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>, 
-       s0ds=\E(B, s1ds=\E(0, sc=\E7, sgr0=\E[0m\017, smacs=^N, 
-       smcup=\E7\E[?47h, smir=\E[4h, smkx=\E=, smso=\E[7m, 
-       smul=\E[4m, tbc=\E[3g, 
+       rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h, 
+       s0ds=\E(B, s1ds=\E(0, sc=\E7, 
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
+       sgr0=\E[0m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, 
+       smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
+       use=vt220+keypad, use=rxvt+pcfkeys, 
+# Key Codes from rxvt reference:
+# 
+# Note: Shift + F1-F10 generates F11-F20
+# 
+# For the keypad, use Shift to temporarily override Application-Keypad
+# setting use Num_Lock to toggle Application-Keypad setting if Num_Lock
+# is off, escape sequences toggle Application-Keypad setting.
+# Also note that values of Home, End, Delete may have been compiled
+# differently on your system.
+# 
+#                   Normal       Shift        Control      Ctrl+Shift
+#  Tab              ^I           ESC [ Z      ^I           ESC [ Z
+#  BackSpace        ^H           ^?           ^?           ^?
+#  Find             ESC [ 1 ~    ESC [ 1 $    ESC [ 1 ^    ESC [ 1 @
+#  Insert           ESC [ 2 ~    paste        ESC [ 2 ^    ESC [ 2 @
+#  Execute          ESC [ 3 ~    ESC [ 3 $    ESC [ 3 ^    ESC [ 3 @
+#  Select           ESC [ 4 ~    ESC [ 4 $    ESC [ 4 ^    ESC [ 4 @
+#  Prior            ESC [ 5 ~    scroll-up    ESC [ 5 ^    ESC [ 5 @
+#  Next             ESC [ 6 ~    scroll-down  ESC [ 6 ^    ESC [ 6 @
+#  Home             ESC [ 7 ~    ESC [ 7 $    ESC [ 7 ^    ESC [ 7 @
+#  End              ESC [ 8 ~    ESC [ 8 $    ESC [ 8 ^    ESC [ 8 @
+#  Delete           ESC [ 3 ~    ESC [ 3 $    ESC [ 3 ^    ESC [ 3 @
+#  F1               ESC [ 11 ~   ESC [ 23 ~   ESC [ 11 ^   ESC [ 23 ^
+#  F2               ESC [ 12 ~   ESC [ 24 ~   ESC [ 12 ^   ESC [ 24 ^
+#  F3               ESC [ 13 ~   ESC [ 25 ~   ESC [ 13 ^   ESC [ 25 ^
+#  F4               ESC [ 14 ~   ESC [ 26 ~   ESC [ 14 ^   ESC [ 26 ^
+#  F5               ESC [ 15 ~   ESC [ 28 ~   ESC [ 15 ^   ESC [ 28 ^
+#  F6               ESC [ 17 ~   ESC [ 29 ~   ESC [ 17 ^   ESC [ 29 ^
+#  F7               ESC [ 18 ~   ESC [ 31 ~   ESC [ 18 ^   ESC [ 31 ^
+#  F8               ESC [ 19 ~   ESC [ 32 ~   ESC [ 19 ^   ESC [ 32 ^
+#  F9               ESC [ 20 ~   ESC [ 33 ~   ESC [ 20 ^   ESC [ 33 ^
+#  F10              ESC [ 21 ~   ESC [ 34 ~   ESC [ 21 ^   ESC [ 34 ^
+#  F11              ESC [ 23 ~   ESC [ 23 $   ESC [ 23 ^   ESC [ 23 @
+#  F12              ESC [ 24 ~   ESC [ 24 $   ESC [ 24 ^   ESC [ 24 @
+#  F13              ESC [ 25 ~   ESC [ 25 $   ESC [ 25 ^   ESC [ 25 @
+#  F14              ESC [ 26 ~   ESC [ 26 $   ESC [ 26 ^   ESC [ 26 @
+#  F15 (Help)       ESC [ 28 ~   ESC [ 28 $   ESC [ 28 ^   ESC [ 28 @
+#  F16 (Menu)       ESC [ 29 ~   ESC [ 29 $   ESC [ 29 ^   ESC [ 29 @
+#  F17              ESC [ 31 ~   ESC [ 31 $   ESC [ 31 ^   ESC [ 31 @
+#  F18              ESC [ 32 ~   ESC [ 32 $   ESC [ 32 ^   ESC [ 32 @
+#  F19              ESC [ 33 ~   ESC [ 33 $   ESC [ 33 ^   ESC [ 33 @
+#  F20              ESC [ 34 ~   ESC [ 34 $   ESC [ 34 ^   ESC [ 34 @
+#                                                          Application
+#  Up               ESC [ A      ESC [ a      ESC O a      ESC O A
+#  Down             ESC [ B      ESC [ b      ESC O b      ESC O B
+#  Right            ESC [ C      ESC [ c      ESC O c      ESC O C
+#  Left             ESC [ D      ESC [ d      ESC O d      ESC O D
+#  KP_Enter         ^M                                     ESC O M
+#  KP_F1            ESC O P                                ESC O P
+#  KP_F2            ESC O Q                                ESC O Q
+#  KP_F3            ESC O R                                ESC O R
+#  KP_F4            ESC O S                                ESC O S
+#  XK_KP_Multiply   *                                      ESC O j
+#  XK_KP_Add        +                                      ESC O k
+#  XK_KP_Separator  ,                                      ESC O l
+#  XK_KP_Subtract   -                                      ESC O m
+#  XK_KP_Decimal    .                                      ESC O n
+#  XK_KP_Divide     /                                      ESC O o
+#  XK_KP_0          0                                      ESC O p
+#  XK_KP_1          1                                      ESC O q
+#  XK_KP_2          2                                      ESC O r
+#  XK_KP_3          3                                      ESC O s
+#  XK_KP_4          4                                      ESC O t
+#  XK_KP_5          5                                      ESC O u
+#  XK_KP_6          6                                      ESC O v
+#  XK_KP_7          7                                      ESC O w
+#  XK_KP_8          8                                      ESC O x
+#  XK_KP_9          9                                      ESC O y
+rxvt+pcfkeys|fragment for PC-style fkeys, 
+       kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kLFT=\E[d, kNXT=\E[6$, 
+       kPRV=\E[5$, kRIT=\E[c, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, 
+       kcuu1=\E[A, kdch1=\E[3~, kel=\E[8\^, kend=\E[8~, 
+       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~, kf21=\E[23$, kf22=\E[24$, kf23=\E[11\^, 
+       kf24=\E[12\^, kf25=\E[13\^, kf26=\E[14\^, kf27=\E[15\^, 
+       kf28=\E[17\^, kf29=\E[18\^, kf3=\E[13~, kf30=\E[19\^, 
+       kf31=\E[20\^, kf32=\E[21\^, kf33=\E[23\^, kf34=\E[24\^, 
+       kf35=\E[25\^, kf36=\E[26\^, kf37=\E[28\^, kf38=\E[29\^, 
+       kf39=\E[31\^, kf4=\E[14~, kf40=\E[32\^, kf41=\E[33\^, 
+       kf42=\E[34\^, kf43=\E[23@, kf44=\E[24@, kf5=\E[15~, 
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, 
+       khome=\E[7~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, 
+       kDN=\E[b, kDN5=\EOb, kDN6=\EOB, kLFT5=\EOd, kLFT6=\EOD, 
+       kRIT5=\EOc, kRIT6=\EOC, kUP=\E[a, kUP5=\EOa, kUP6=\EOA, 
 rxvt|rxvt terminal emulator (X Window System), 
        ncv@, 
-       sgr0=\E[m\017, use=rxvt-basic, use=ecma+color, 
+       hpa=\E[%i%p1%dG, kf0=\E[21~, sgr0=\E[m\017, 
+       vpa=\E[%i%p1%dd, use=rxvt-basic, use=ecma+color, 
+rxvt-color|rxvt terminal emulator (X Window System), 
+       use=rxvt, 
+rxvt-xpm|rxvt terminal emulator (X Window System), 
+       use=rxvt, 
+rxvt-cygwin|rxvt terminal emulator (X Window System) on cygwin, 
+       acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, 
+       use=rxvt, 
+rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygwin, 
+       acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376, 
+       use=rxvt-cygwin, 
 
 # This variant is supposed to work with rxvt 2.7.7 when compiled with
 # NO_BRIGHTCOLOR defined.  rxvt needs more work...
@@ -3205,7 +3633,7 @@ Eterm|Eterm-color|Eterm with xterm-style color support (X Window System),
        rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, 
        rmkx=, rmso=\E[27m, rmul=\E[24m, 
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, 
-       rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>, 
+       rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h
        sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h, 
@@ -3227,19 +3655,17 @@ xtermm|xterm terminal emulator (monocrome),
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, 
        el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, getm=\E[%p1%dY, 
        home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, 
-       il=\E[%p1%dL, il1=\E[L, ind=^J, ka1=\EOq, ka3=\EOs, kb2=\EOr, 
-       kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB, 
-       kcuf1=\EOC, kcuu1=\EOA, kend=\E[Y, kent=\EOM, kf0=\EOy, 
-       kf1=\EOP, kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf2=\EOQ, 
-       kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, 
-       kf9=\EOX, khome=\E[H, kmous=\E[^_, knp=\E[U, kpp=\E[V, 
-       rc=\E8, reqmp=\E[492Z, rev=\E[7m, ri=\EM, rmacs=^O, 
-       rmcup=\E@0\E[?4r, rmso=\E[m, 
+       il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, kcub1=\EOD, 
+       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[Y, kf0=\EOy, 
+       kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf5=\EOT, kf6=\EOU, 
+       kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, kmous=\E[^_, 
+       knp=\E[U, kpp=\E[V, rc=\E8, reqmp=\E[492Z, rev=\E[7m, ri=\EM, 
+       rmacs=^O, rmcup=\E@0\E[?4r, rmso=\E[m, 
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, 
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
        sgr0=\E[m\017, smacs=^N, smcup=\E@0\E[?4s\E[?4h\E@1, 
-       smso=\E[7m, tbc=\E[3g, 
+       smso=\E[7m, tbc=\E[3g, use=vt100+fnkeys, 
 
 xtermc|xterm terminal emulator (color), 
        colors#8, ncv#7, pairs#64, 
@@ -3304,35 +3730,71 @@ xterms-sun|small (80x24) xterm with sunFunctionKeys true,
        cols#80, lines#24, use=xterm-sun, 
 
 # This is for the extensible terminal emulator on the X11R6 contrib tape.
+# It corresponds to emu's internal emulation:
+#      emu -term emu
+# emu's default sets TERM to "xterm", but that doesn't work well -TD
+# fixes: remove bogus rmacs/smacs, change oc to op, add bce, am -TD
+# fixes: add civis, cnorm, sgr -TD
 emu|emu native mode, 
-       mir, msgr, xon, 
+       am, bce, mir, msgr, xon, 
        colors#15, cols#80, it#8, lines#24, pairs#64, vt#200, 
        acsc=61a\202f\260g2j\213k\214l\215m\216n\217o\220q\222s\224t\225u\226v\227w\230x\231~\244, 
-       bel=^G, blink=\ES\EW, bold=\ES\EU, civis=\EZ, 
-       clear=\EP\EE0;0;, cnorm=\Ea, cr=^M, csr=\Ek%p1%d;%p2%d;, 
-       cub=\Eq-%p1%d;, cub1=^H, cud=\Ep%p1%d;, cud1=\EB, 
-       cuf=\Eq%p1%d;, cuf1=\ED, cup=\EE%p1%d;%p2%d;, 
-       cuu=\Ep-%p1%d;, cuu1=\EA, dch=\EI%p1%d;, dch1=\EI1;, 
-       dl=\ER%p1%d;, dl1=\ER1;, ech=\Ej%p1%d;, ed=\EN, el=\EK, 
-       el1=\EL, enacs=\0, home=\EE0;0;, ht=^I, hts=\Eh, 
-       il=\EQ%p1%d;, il1=\EQ1;, ind=\EG, is2=\ES\Er0;\Es0;, 
-       kbs=^H, kcub1=\EC, kcud1=\EB, kcuf1=\ED, kcuu1=\EA, 
-       kdch1=\177, kent=^M, kf0=\EF00, kf1=\EF01, kf10=\EF10, 
-       kf11=\EF11, kf12=\EF12, kf13=\EF13, kf14=\EF14, kf15=\EF15, 
-       kf16=\EF16, kf17=\EF17, kf18=\EF18, kf19=\EF19, kf2=\EF02, 
-       kf20=\EF20, kf3=\EF03, kf4=\EF04, kf5=\EF05, kf6=\EF06, 
-       kf7=\EF07, kf8=\EF08, kf9=\EF09, kfnd=\Efind, kich1=\Eins, 
-       knp=\Enext, kpp=\Eprior, kslt=\Esel, oc=\Es0;\Er0;, 
-       rev=\ES\ET, ri=\EF, rmacs=\0, rmir=\EX, rmso=\ES, rmul=\ES, 
+       bel=^G, blink=\EW, bold=\EU, civis=\EZ, clear=\EP\EE0;0;, 
+       cnorm=\Ea, cr=^M, csr=\Ek%p1%d;%p2%d;, cub=\Eq-%p1%d;, 
+       cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\ED, 
+       cup=\EE%p1%d;%p2%d;, cuu=\Ep-%p1%d;, cuu1=\EA, 
+       dch=\EI%p1%d;, dch1=\EI1;, dl=\ER%p1%d;, dl1=\ER1;, 
+       ech=\Ej%p1%d;, ed=\EN, el=\EK, el1=\EL, home=\EE0;0;, ht=^I, 
+       hts=\Eh, il=\EQ%p1%d;, il1=\EQ1;, ind=\EG, 
+       is2=\ES\Er0;\Es0;, kbs=^H, kcub1=\EC, kcud1=\EB, kcuf1=\ED, 
+       kcuu1=\EA, kdch1=\177, kent=^M, kf0=\EF00, kf1=\EF01, 
+       kf10=\EF10, kf11=\EF11, kf12=\EF12, kf13=\EF13, kf14=\EF14, 
+       kf15=\EF15, kf16=\EF16, kf17=\EF17, kf18=\EF18, kf19=\EF19, 
+       kf2=\EF02, kf20=\EF20, kf3=\EF03, kf4=\EF04, kf5=\EF05, 
+       kf6=\EF06, kf7=\EF07, kf8=\EF08, kf9=\EF09, kfnd=\Efind, 
+       kich1=\Eins, knp=\Enext, kpp=\Eprior, kslt=\Esel, 
+       op=\Es0;\Er0;, rev=\ET, ri=\EF, rmir=\EX, rmso=\ES, rmul=\ES, 
        rs2=\ES\Es0;\Er0;, setab=\Es%i%p1%d;, 
-       setaf=\Er%i%p1%d;, sgr0=\ES, smacs=\0, smir=\EY, 
-       smso=\ES\ET, smul=\ES\EV, tbc=\Ej, 
-
+       setaf=\Er%i%p1%d;, 
+       sgr=\ES%?%p1%t\ET%;%?%p2%t\EV%;%?%p3%t\ET%;%?%p4%t\EW%;%?%p6%t\EU%;, 
+       sgr0=\ES, smir=\EY, smso=\ET, smul=\EV, tbc=\Ej, 
+
+# vt220 Terminfo entry for the Emu emulation, corresponds to
+#      emu -term vt220
+# with NumLock set (to make the keypad transmit kf0-kf9).
+# fixes: add am, xenl, corrected sgr0 -TD
+emu-220|Emu-220 (vt200-7bit mode), 
+       am, xenl, xon, 
+       cols#80, it#8, lines#24, vt#200, 
+       acsc=aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G, 
+       blink=\E[0;5m, bold=\E[0;1m, civis=\E[?25l, 
+       clear=\E[2J\E[H, cnorm=\E[?25h, cr=^M, 
+       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[1D, 
+       cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C, 
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A, 
+       dch=\E[%p1%dP, dch1=\E[1P, dl=\E[%p1%dM, dl1=\E[1M, 
+       ed=\E[0J, el=\E[0K, el1=\E[1K, enacs=\E)0, home=\E[H, ht=^I, 
+       hts=\EH, if=/usr/share/tabset/vt300, il=\E[%p1%dL, 
+       il1=\E[1L, ind=\ED, is2=\E>\E[?1l\E[?3l\E[4l\E[?7h, 
+       kbs=^H, kcmd=\E[29~, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, 
+       kcuu1=\E[A, kdch1=\E[3~, kent=\EOM, kf0=\EOp, kf1=\EOq, 
+       kf10=\EOl, kf11=\EOm, kf12=\EOn, kf13=\EOP, kf14=\EOQ, 
+       kf15=\EOR, kf16=\EOS, kf2=\EOr, kf26=\E[17~, kf27=\E[18~, 
+       kf28=\E[19~, kf29=\E[20~, kf3=\EOs, kf30=\E[21~, 
+       kf34=\E[26~, kf37=\E[31~, kf38=\E[32~, kf39=\E[33~, 
+       kf4=\EOt, kf40=\E[34~, kf5=\EOu, kf6=\EOv, kf7=\EOw, 
+       kf8=\EOx, kf9=\EOy, kfnd=\E[1~, khlp=\E[28~, kich1=\E[2~, 
+       knp=\E[6~, kpp=\E[5~, kslt=\E[4~, rc=\E8, rev=\E[0;7m, 
+       ri=\EM, rmacs=^O, rmcup=\E>, rmkx=\E>, rmso=\E[m, rmul=\E[m, 
+       rs2=\E[4l\E[34l\E[?1l\E[?3l\E[?5l\E[?7h, sc=\E7, 
+       sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, 
+       sgr0=\E[m, smacs=^N, smcup=\E[?1l\E=, smkx=\E=, 
+       smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g, 
 # A commercial product, Reportedly a version of Xterm with an OPEN LOOK UI,
 # print interface, ANSI X3.64 colour escape sequences, etc.  Newsgroup postings
 # indicate that it emulates more than one terminal, but incompletely.
 # 
-# This is dapted from a FreeBSD bug-report by Daniel Rudy <dcrudy@pacbell.net>
+# This is adapted from a FreeBSD bug-report by Daniel Rudy <dcrudy@pacbell.net>
 # It is based on vt102's entry, with some subtle differences, but also
 #      has status line
 #      supports ANSI colors (except for 'op' string)
@@ -3349,19 +3811,81 @@ mvterm|vv100|SwitchTerm aka mvTERM,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, 
        dsl=\E[?E, ed=\E[J, el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, 
        fsl=\E[?F, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, 
-       ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, ka1=\EOq, 
-       ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, 
-       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, 
-       kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, 
-       kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, op=\E[100m, rc=\E8, 
-       rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8, 
-       rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, 
+       ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, 
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOy, 
+       kf10=\EOx, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, 
+       op=\E[100m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, 
+       rmcup=\E[2J\E[?47l\E8, rmkx=\E[?1l\E>, rmso=\E[m, 
+       rmul=\E[m, 
        rs2=\E>\E[1;3;4;5;6l\E[?7h\E[100m\E[m\E[r\E[2J\E[H, 
        sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
        sgr0=\E[m\017, smacs=^N, smcup=\E7\E[?47h, 
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
-       tsl=\E[?E\E[?%i%p1%dT, 
+       tsl=\E[?E\E[?%i%p1%dT, use=vt100+fnkeys, 
+
+### MTERM
+#
+# This application is available by email from <mouse@Rodents.Montreal.QC.CA>.
+#
+# "mterm -type ansi" sets $TERM to "ansi"
+mterm-ansi|ANSI emulation, 
+       am, bw, mir, msgr, 
+       it#8, 
+       acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
+       bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M, 
+       cub=\E[%p1%dD, cub1=\E[D, 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, dch=\E[%p1%dP, dch1=\E[P, 
+       dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, 
+       el=\E[K, home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich1=, 
+       il=\E[%p1%dL, il1=\E[L, ind=\E[S, indn=\E[%p1%dS, 
+       invis=\E[8m, is2=\E)0\017, kbs=^H, nel=\EE, rev=\E[7m, 
+       ri=\E[T, rin=\E[%p1%dT, rmacs=^O, rmir=\E[4l, rmso=\E[27m, 
+       rmul=\E[24m, 
+       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[m, smacs=^N, smir=\E[4h, smso=\E[7m, smul=\E[4m, 
+       vpa=\E[%i%p1%dd, 
+# mterm normally sets $TERM to "mterm"
+mterm|mouse-sun|Der Mouse term, 
+       am, bw, mir, 
+       it#8, 
+       bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^N, cuf1=^S, 
+       cup=\006%p1%d.%p2%d., cuu1=^X, dch1=^Y, dl1=^K, ed=^B, el=^C, 
+       home=^P, ht=^I, il1=^A, ind=^U, kbs=^H, ll=^R, nel=^M^U, ri=^W, 
+       rmir=^O, rmso=^T, smir=^Q, smso=^V, 
+# "mterm -type decansi" sets $TERM to "decansi"
+#
+# note: kdch1, kfnd, kslt are in the source code, but do not work -TD
+decansi|ANSI emulation with DEC compatibility hacks, 
+       am, mir, msgr, xenl, 
+       colors#8, it#8, pairs#64, 
+       acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
+       bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
+       clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, 
+       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, 
+       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, 
+       dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, 
+       dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, enacs=\E(B\E)0, 
+       home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich1=, il=\E[%p1%dL, 
+       il1=\E[L, ind=\E[S, indn=\E[%p1%dS, invis=\E[8m, 
+       is2=\E)0\E[r\017, kbs=^H, 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~, 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~, kich1=\E[2~, knp=\E[6~, 
+       kpp=\E[5~, kslt=\E[4~, nel=\EE, op=\E[0m, rc=\E8, rev=\E[7m, 
+       ri=\E[T, rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, 
+       rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, sc=\E7, 
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       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[m, smacs=^N, smam=\E[?7h, smir=\E[4h, 
+       smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR, 
+       u7=\E[6n, vpa=\E[%i%p1%dd, 
+
 #### MGR
 #
 # MGR is a Bell Labs window system lighter-weight than X.
@@ -3467,11 +3991,19 @@ screen|VT 100/ANSI X3.64 virtual terminal,
        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~, 
-       nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmir=\E[4l, 
-       rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, 
-       sgr0=\E[m, smacs=^N, 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, 
+       nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, 
+       rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[23m, 
+       rmul=\E[24m, rs2=\Ec\E[?1000l\E[?25h, sc=\E7, 
+       sgr=\E[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, 
+       sgr0=\E[m, 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, 
+# 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, 
+       bce, use=screen, 
+screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line, 
+       dsl=\E_\E\\, fsl=\E\\, tsl=\E_, use=screen, 
 
 # Read the fine manpage:
 #       When  screen  tries  to  figure  out  a  terminal name for
@@ -3497,20 +4029,26 @@ screen|VT 100/ANSI X3.64 virtual terminal,
 #      xterm (-xfree86 or -r6) does not normally support kIC, kNXT and kPRV
 #      since the default translations override the built-in keycode
 #      translation.  They are suppressed here to show what is tested by tack.
-screen.xterm-xfree86|screen customized for XFree86 xterm, 
+screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm, 
        bce@, bw, 
        invis@, kIC@, kNXT@, kPRV@, kend=\E[4~, khome=\E[1~, meml@, 
        memu@, 
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;
-       use=xterm-xfree86
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m
+       use=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=xterm-r6, 
 # Color applications running in screen and TeraTerm do not play well together
-# on Solaris.
+# on Solaris because Sun's curses implementation gets confused.
 screen.teraterm|disable ncv in teraterm, 
-       ncv#127, use=screen, 
+       ncv#127, 
+       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, 
+# fix the backspace key
+screen.linux|screen in linux console, 
+       bw, 
+       kbs=\177, kcbt@, use=screen, 
 
 screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols, 
        cols#132, use=screen, 
@@ -3600,11 +4138,11 @@ ncsa-m|ncsa-vt220-8|NCSA Telnet 2.6 for Macintosh in vt220-8 mode,
        kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khlp=\E[1~, 
        khome=\E[2~, knp=\E[6~, kpp=\E[3~, mc4=\E[4i, mc5=\E[5i, 
        rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, 
-       rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E8, rmir=\E[4l, 
+       rmacs=\E(B, rmam=\E[?7l, rmcup=\E[2J\E8, rmir=\E[4l, 
        rmso=\E[27m, rmul=\E[24m, 
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;4;6l\E[4l\E>, sc=\E7, 
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, 
-       sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7, 
+       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E7, 
        smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E]0;, 
        u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?62;1;6c, u9=\E[c, 
 ncsa|NCSA Telnet 2.7 for Macintosh in vt220-8 mode, 
@@ -3631,7 +4169,7 @@ ncsa-vt220|NCSA Telnet using vt220-compatible function keys,
 #### Pilot Pro Palm-Top
 #
 # Termcap for Top Gun Telnet and SSH on the Palm Pilot.
-# http://www.isaac.cs.berkeley.edu/pilot/tgtelnet.html
+# http://www.ai/~iang/TGssh/
 pilot|tgtelnet|Top Gun Telnet on the Palm Pilot Professional, 
        OTbs, am, xenl, 
        cols#39, lines#16, 
@@ -3715,7 +4253,7 @@ oldsun|Sun Microsystems Workstation console,
 sun-il|Sun Microsystems console with working insert-line, 
        am, km, msgr, 
        cols#80, lines#34, 
-       bel=^G, bold@, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C, 
+       bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C, 
        cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, 
        dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, ht=^I, 
        ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, 
@@ -3726,8 +4264,8 @@ sun-il|Sun Microsystems console with working insert-line,
        kf7=\E[230z, kf8=\E[231z, kf9=\E[232z, khome=\E[214z, 
        knp=\E[222z, kopt=\E[194z, kpp=\E[216z, kres=\E[193z, 
        kund=\E[195z, rev=\E[7m, rmso=\E[m, rmul@, rs2=\E[s, 
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, 
-       sgr0=\E[m, smso=\E[7m, smul@, u8=\E[1t, u9=\E[11t, 
+       sgr=\E[0%?%p1%p3%|%t;7%;m, sgr0=\E[m, smso=\E[7m, 
+       u8=\E[1t, u9=\E[11t, 
 # On some versions of CGSIX framebuffer firmware (SparcStation 5), <il1>/<il>
 # flake out on the last line.  Unfortunately, without them the terminal has no
 # way to scroll.
@@ -3763,6 +4301,22 @@ sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character,
 sun-c|sun-cmd|Sun Microsystems Workstation console with scrollable history, 
        lines#35, 
        rmcup=\E[>4h, smcup=\E[>4l, use=sun, 
+sun-type4|Sun Workstation console with type 4 keyboard, 
+       kcub1=\E[217z, kcud1=\E[221z, kcuf1=\E[219z, 
+       kcuu1=\E[215z, use=sun-il, 
+
+# Most of the current references to sun-color are from users wondering why this
+# is the default on install.  Details from reading the wscons manpage, adding
+# cub, etc., here (rather than in the base sun-il entry) since it is not clear
+# when those were added -TD
+sun-color|Sun Microsystems Workstation console with color support (IA systems), 
+       colors#8, pairs#64, 
+       cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, 
+       cuu=\E[%p1%dA, home=\E[H, op=\E[m\E[p, 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, 
+       use=sun, 
 
 #### Iris consoles
 #
@@ -4032,62 +4586,79 @@ dtterm|CDE desktop terminal,
 #### Non-Unix Consoles
 #
 
+### EMX termcap.dat compatibility modes
+#
+# Keypad:      Home=\0G        Up=\0H  PrPag=\0I
+#              ka1,kh          kcuu1           kpp,ka3
+#
+#              Left=\0K        5=\0L           Right=\0M
+#              kcub1           kb2             kcuf1
+#
+#              End=\0O         Down=\0P        NxPag=\0Q
+#              kc1,kend        kcud1           kc3,knp
+#
+#              Ins=\0R         Del=\0S
+#              kich1           kdch1
+#
+# On keyboard with 12 function keys,
+#      shifted f-keys: F13-F24
+#      control f-keys: F25-F36
+#      alt f-keys:     F37-F48
+# The shift/control/alt keys do not modify each other, but alt overrides both,
+# and control overrides shift.
+#
+# Also (possibly only EMX, so we don't put it in ansi.sys, etc): set the
+# no_color_video to inform the application that standout(1), underline(2)
+# reverse(4) and invisible(64) don't work with color.
+emx-base|DOS special keys, 
+       bce, bw, 
+       it#8, ncv#71, 
+       bel=^G, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q, 
+       kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, 
+       kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205, 
+       kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W, 
+       kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\, 
+       kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_, 
+       kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d, 
+       kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212, 
+       kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l, 
+       kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q, 
+       kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B, 
+       kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I, 
+       use=ansi.sys, 
+
 # Except for the "-emx" suffixes, these are as distributed with EMX 0.9b,
 # a Unix-style environment used on OS/2.  (Note that the suffix makes some
 # names longer than 14 characters, the nominal maximum).
 #
 # Removed: rmacs=\E[10m, smacs=\E[11m, because OS/2 does not implement acs.
 ansi-emx|ANSI.SYS color, 
-       am, bce, eo, mir, msgr, xenl, xon, 
+       am, bce, eo, mir, msgr, xon, 
        colors#8, cols#80, it#8, lines#25, pairs#64, 
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
        clear=\E[1;33;44m\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, 
        cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, 
        dch=\E[%p1%dp, ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l, 
        home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, ind=^J, 
-       kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, 
-       kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, kf4=\0>, kf5=\0?, kf6=\0@, 
-       kf7=\0A, kf8=\0B, kf9=\0C, khome=\0G, kich1=\0R, kll=\0O, 
-       knp=\0Q, kpp=\0I, kspd=^Z, nel=^M^J, rev=\E[5;37;41m, 
-       rmir=\E[4l, rmpch=\E[10m, rmso=\E[0;44m\E[1;33m, 
-       rmul=\E[0;44m\E[1;33m, rs1=\Ec, setab=\E[4%p1%dm, 
-       setaf=\E[3%p1%dm, sgr0=\E[0m\E[1;33;44m, smir=\E[4h, 
-       smpch=\E[11m, smso=\E[0;31;47m, smul=\E[1;31;44m, 
-       tbc=\E[3g, u8=\E[?6c, u9=\E[c, 
+       kb2=\E[G, kbs=^H, kf0=\0D, kll=\0O, kspd=^Z, nel=^M^J, 
+       rev=\E[5;37;41m, rmir=\E[4l, rmpch=\E[10m, 
+       rmso=\E[0;44m\E[1;33m, rmul=\E[0;44m\E[1;33m, rs1=\Ec, 
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       sgr0=\E[0m\E[1;33;44m, smir=\E[4h, smpch=\E[11m, 
+       smso=\E[0;31;47m, smul=\E[1;31;44m, tbc=\E[3g, u8=\E[?6c, 
+       u9=\E[c, use=emx-base, 
+# nice colors for Emacs (white on blue, mode line white on cyan)
 ansi-color-2-emx|ANSI.SYS color 2, 
-       am, bce, eo, mir, msgr, xenl, xon, 
-       colors#8, cols#80, it#8, lines#25, pairs#64, 
-       bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
-       clear=\E[0;37;44m\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, 
-       cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, 
-       dch=\E[%p1%dp, ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l, 
-       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, ind=^J, 
-       kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, 
-       kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, kf4=\0>, kf5=\0?, kf6=\0@, 
-       kf7=\0A, kf8=\0B, kf9=\0C, khome=\0G, kich1=\0R, kll=\0O, 
-       knp=\0Q, kpp=\0I, kspd=^Z, nel=^M^J, rev=\E[1;37;46m, 
-       rmir=\E[4l, rmpch=\E[10m, rmso=\E[0;37;44m, 
-       rmul=\E[0;37;44m, rs1=\Ec, setab=\E[4%p1%dm, 
-       setaf=\E[3%p1%dm, sgr0=\E[0;37;44m, smir=\E[4h, 
-       smpch=\E[11m, smso=\E[1;37;46m, smul=\E[1;36;44m, 
-       tbc=\E[3g, u8=\E[?6c, u9=\E[c, 
+       clear=\E[0;37;44m\E[H\E[J, rev=\E[1;37;46m, 
+       rmso=\E[0;37;44m, rmul=\E[0;37;44m, rs1=\Ec, 
+       setaf=\E[3%p1%dm, sgr0=\E[0;37;44m, smso=\E[1;37;46m, 
+       smul=\E[1;36;44m, use=ansi-emx, 
+# nice colors for Emacs (white on black, mode line black on cyan)
 ansi-color-3-emx|ANSI.SYS color 3, 
-       am, bce, eo, mir, msgr, xenl, xon, 
-       colors#8, cols#80, it#8, lines#25, pairs#64, 
-       bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
-       clear=\E[0;37;40m\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, 
-       cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, 
-       dch=\E[%p1%dp, ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l, 
-       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, ind=^J, 
-       kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, 
-       kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, kf4=\0>, kf5=\0?, kf6=\0@, 
-       kf7=\0A, kf8=\0B, kf9=\0C, khome=\0G, kich1=\0R, kll=\0O, 
-       knp=\0Q, kpp=\0I, kspd=^Z, nel=^M^J, rev=\E[1;37;46m, 
-       rmir=\E[4l, rmpch=\E[10m, rmso=\E[0;37;40m, 
-       rmul=\E[0;37;40m, rs1=\Ec, setab=\E[4%p1%dm, 
-       setaf=\E[3%p1%dm, sgr0=\E[0;10m, smir=\E[4h, 
-       smpch=\E[11m, smso=\E[1;37;46m, smul=\E[0;36;40m, 
-       tbc=\E[3g, u8=\E[?6c, u9=\E[c, 
+       clear=\E[0;37;40m\E[H\E[J, rev=\E[1;37;46m, 
+       rmso=\E[0;37;40m, rmul=\E[0;37;40m, rs1=\Ec, 
+       setaf=\E[3%p1%dm, sgr0=\E[0;10m, smso=\E[1;37;46m, 
+       smul=\E[0;36;40m, use=ansi-emx, 
 mono-emx|stupid monochrome ansi terminal with only one kind of emphasis, 
        am, 
        cols#80, it#8, lines#24, 
@@ -4117,31 +4688,301 @@ cygwinB19|ansi emulation for cygwin32,
 # I've indicated which of these were and which I used.
 # Cheers, earnie_boyd@yahoo.com
 # several changes based on running with tack and comparing with older entry -TD
+# more changes from csw:
+#   add    cbt   [backtab]
+#   remove eo    [erase overstrike with blank]
+#   change clear was \E[H\E[J  now \E[2J  (faster?)
+#   remove cols
+#   remove lines
+#   remove ncv#3 [colors collide with highlights, bitmask] not applicable
+#                to MSDOS box?
+#   add    cub   [cursor back param] 
+#   add    cuf   [cursor forward param]
+#   add    cuu   [cursor up param]
+#   add    cud   [cursor down param]
+#   add    hs    [has status line]
+#   add    fsl   [return from status line]
+#   add    tsl   [go to status line]
+#   add    smacs [Start alt charset] (not sure if this works)
+#   add    rmacs [End alt charset]   (ditto)
+#   add    smcup [enter_ca_mode] (save console; thanks Corinna)
+#   add    rmcup [exit_ca_mode]  (restore console; thanks Corinna)
+#   add    kb2   [center of keypad]
+#   add    u8    [user string 8] \E[?6c
+#   add    el    [clear to end of line] \E[K
+# Notes:
+#   cnorm [make cursor normal] not implemented
+#   flash [flash] not implemented
+#   blink [blink] not implemented very usefully in cygwin? \E[5m
+#   dim   [dim] not implemented very usefully in cygwin? \E[2m
+#   cub1  [cursor back 1] typically \E[D, but ^H is faster?
+#   kNXT  [shifted next key] not implemented
+#   kPRV  [shifted prev key] not implemented
+#   khome [home key] really is \E[1~ NOT \E[H
+#   tbc   [clear tab stops] not implemented
+#   xenl  [newline ignnored after 80 cols] messes up last line? Ehud Karni
+#   smpch [Start PC charset] is \E[11m, same as smacs
+#   rmpch [End PC charset] is \E[10m, same as rmacs
+#   mir   [move in insert mode] fails in tack?
+#   bce   [back color erase] causes problems with change background color?
+#   cvvis [make cursor very visible] causes a stackdump when testing with
+#         testcurs using the output option? \E[?25h\E[?8c
+#   civis [make cursor invisible] causes everything to stackdump? \E[?25l\E[?1c
+#   ech   [erase characters param] broken \E[%p1%dX
+#   kcbt  [back-tab key] not implemented in cygwin?  \E[Z
 cygwin|ansi emulation for Cygwin, 
-       am, eo, in, msgr, xon, 
-       colors#8, cols#80, it#8, lines#25, ncv#3, pairs#64, 
+       am, hs, in, msgr, xon, 
+       colors#8, it#8, pairs#64, 
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, 
-       bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub1=^H, 
-       cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, 
-       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, 
-       el=\E[K, el1=\E[1K, 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=^J, invis=\E[8m, kbs=^H, kcub1=\E[D, kcud1=\E[B, 
-       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, 
+       bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=^M, 
+       cub=\E[%p1%dD, cub1=^H, 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, dch=\E[%p1%dP, dch1=\E[P, 
+       dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, 
+       home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, 
+       ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, 
+       kb2=\E[G, kbs=^H, 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~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, 
        kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, 
        kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, 
        kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, 
        knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m, 
-       rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, rmpch=\E[10m, 
+       rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, 
+       rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmpch=\E[10m, 
        rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, 
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
        sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, 
-       sgr0=\E[0;10m, smir=\E[4h, smpch=\E[11m, smso=\E[7m, 
-       smul=\E[4m, u6=\E[%i%d;%dR, u7=\E[6n, u9=\E[c, 
+       sgr0=\E[0;10m, smacs=\E11m, smcup=\E7\E[?47h, smir=\E[4h, 
+       smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];, 
+       u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c, 
        vpa=\E[%i%p1%dd, 
 
+# I've supplied this so that you can help test new values and add other
+# features.  Cheers, earnie_boyd@yahoo.com.
+#
+# Some features are from pcansi.  The op value is from linux.  Function-keys
+# are from linux.  These have been tested not to cause problems.  xenl was in
+# this list, but DOES cause problems so it has been removed
+cygwinDBG|Debug Version for Cygwin, 
+       am, eo, mir, msgr, xon, 
+       colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64, 
+       acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, 
+       bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, 
+       cnorm=\E[?25h, cr=^M, cub=\E[%p1%dD, cub1=\E[D, 
+       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, 
+       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, 
+       ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, 
+       il1=\E[L, ind=^J, invis=\E[8m, kNXT=\E[6$, kPRV=\E[5$, 
+       kb2=\E[G, kbs=^H, kcbt=\E[Z, 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~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, 
+       kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, 
+       kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, 
+       kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, 
+       knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m, 
+       rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, rmir=\E[4l, 
+       rmso=\E[m, rmul=\E[m, rs1=\Ec\E]R, sc=\E7, 
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m, 
+       sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smso=\E[7m, 
+       smul=\E[4m, tbc=\E[2g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, 
+       u9=\E[c, vpa=\E[%i%p1%dd, 
+
+# Key definitions:
+# The encodings for unshifted arrow keys, F1-F12, Home, Insert, etc.  match the
+# encodings used by other x86 environments.  All others are invented for DJGPP.
+# Oddly enough, while several combinations of modifiers are tabulated, there is
+# none for shifted cursor keys.
+#
+#      F1                      \E[[A
+#      F2                      \E[[B
+#      F3                      \E[[C
+#      F4                      \E[[D
+#      F5                      \E[[E
+#      F6                      \E[17~
+#      F7                      \E[18~
+#      F8                      \E[19~
+#      F9                      \E[20~
+#      F10                     \E[21~
+#      F11                     \E[23~
+#      F12                     \E[24~
+#
+#      Delete                  \E[3~
+#      Down Arrow              \E[B
+#      End                     \E[4~
+#      Home                    \E[1~
+#      Insert                  \E[2~
+#      Left Arrow              \E[D
+#      Page Down               \E[6~
+#      Page Up                 \E[5~
+#      Right Arrow             \E[C
+#      Up Arrow                \E[A
+#
+#      Shift-F1                \E[25~
+#      Shift-F2                \E[26~
+#      Shift-F3                \E[27~
+#      Shift-F4                \E[28~
+#      Shift-F5                \E[29~
+#      Shift-F6                \E[30~
+#      Shift-F7                \E[31~
+#      Shift-F8                \E[32~
+#      Shift-F9                \E[33~
+#      Shift-F10               \E[34~
+#      Shift-F11               \E[35~
+#      Shift-F12               \E[36~
+#
+#      Ctrl-F1                 \E[47~
+#      Ctrl-F2                 \E[48~
+#      Ctrl-F3                 \E[49~
+#      Ctrl-F4                 \E[50~
+#      Ctrl-F5                 \E[51~
+#      Ctrl-F6                 \E[52~
+#      Ctrl-F7                 \E[53~
+#      Ctrl-F8                 \E[54~
+#      Ctrl-F9                 \E[55~
+#      Ctrl-F10                \E[56~
+#      Ctrl-F11                \E[57~
+#      Ctrl-F12                \E[58~
+#
+#      Ctrl-Delete             \E[43~
+#      Ctrl-Down Arrow         \E[38~
+#      Ctrl-End                \E[44~
+#      Ctrl-Home               \E[41~
+#      Ctrl-Insert             \E[42~
+#      Ctrl-Left Arrow         \E[39~
+#      Ctrl-Page Down          \E[46~
+#      Ctrl-Page Up            \E[45~
+#      Ctrl-Right Arrow        \E[40~
+#      Ctrl-Up Arrow           \E[37~
+#
+#      Alt-F1                  \E[59~
+#      Alt-F2                  \E[60~
+#      Alt-F3                  \E[61~
+#      Alt-F4                  \E[62~
+#      Alt-F5                  \E[63~
+#      Alt-F6                  \E[64~
+#      Alt-F7                  \E[65~
+#      Alt-F8                  \E[66~
+#      Alt-F9                  \E[67~
+#      Alt-F10                 \E[68~
+#      Alt-F11                 \E[79~
+#      Alt-F12                 \E[80~
+#
+#      Alt-Delete              \E[65~
+#      Alt-Down Arrow          \E[60~
+#      Alt-End                 \E[66~
+#      Alt-Home                \E[41~
+#      Alt-Insert              \E[64~
+#      Alt-Left Arrow          \E[61~
+#      Alt-Page Down           \E[68~
+#      Alt-Page Up             \E[67~
+#      Alt-Right Arrow         \E[62~
+#      Alt-Up Arrow            \E[59~
+#
+# Also:
+#      Alt-A                   \E[82~
+#      Alt-B                   \E[82~
+#      Alt-C                   \E[83~
+#      Alt-D                   \E[84~
+#      Alt-E                   \E[85~
+#      Alt-F                   \E[86~
+#      Alt-G                   \E[87~
+#      Alt-H                   \E[88~
+#      Alt-I                   \E[89~
+#      Alt-J                   \E[90~
+#      Alt-K                   \E[91~
+#      Alt-L                   \E[92~
+#      Alt-M                   \E[93~
+#      Alt-N                   \E[94~
+#      Alt-O                   \E[95~
+#      Alt-P                   \E[96~
+#      Alt-Q                   \E[97~
+#      Alt-R                   \E[98~
+#      Alt-S                   \E[99~
+#      Alt-T                   \E[100~
+#      Alt-U                   \E[101~
+#      Alt-V                   \E[102~
+#      Alt-W                   \E[103~
+#      Alt-X                   \E[104~
+#      Alt-Y                   \E[105~
+#      Alt-Z                   \E[106~
+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\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, 
+       bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[1v, 
+       clear=\E[H\E[J, cnorm=\E[v, cr=^M, cub=\E[%p1%dD, cub1=^H, 
+       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[2v, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, 
+       dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, 
+       home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, 
+       ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, 
+       indn=\E[%p1%dS, invis=\E[8m, kbs=^H, 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~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, 
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, 
+       khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=^M^J, 
+       op=\E[37;40m, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, 
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%e;25%;%?%p6%t;1%;%?%p7%t;8%;m, 
+       sgr0=\E[m, smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, 
+
+djgpp203|Entry for DJGPP 2.03, 
+       OTbs, am, 
+       cols#80, it#8, lines#25, 
+       bel=^G, cr=^M, cub1=^H, cud1=^J, ht=^I, ind=^J, kbs=^H, kcub1=^H, 
+       kcud1=^J, nel=^M^J, 
+
+djgpp204|Entry for DJGPP 2.04, 
+       OTbs, am, AX, 
+       colors#8, cols#80, it#8, lines#25, ncv#3, pairs#64, 
+       bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[1v, 
+       clear=\E[H\E[2J, cnorm=\E[v, cr=^M, cub=\E[%p1%dD, 
+       cub1=\E[D, 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[2v, dch=\E[%p1%dP, dch1=\E[P, 
+       dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, 
+       home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, 
+       il1=\E[L, ind=\E[S, indn=\E[%p1%dS, invis=\E[8m, kbs=^H, 
+       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, 
+       kdch1=\E[3~, kf0=\E[21~, kf1=\E[[A, kf10=\E[21~, kf2=\E[[B, 
+       kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, 
+       kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, 
+       kll=\E[4~, knp=\E[6~, kpp=\E[5~, nel=^M^J, rev=\E[7m, 
+       ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, setab=\E[4%p1%dm, 
+       setaf=\E[3%p1%dm, sgr0=\E[m, smso=\E[7m, smul=\E[4m, 
+
+# This is tested using U/Win's telnet.  Scrolling is omitted because it is
+# buggy.  Another odd bug appears when displaying "~" in alternate character
+# set (the emulator spits out error messages).  Compare with att6386 -TD
+uwin|U/Win 3.2 console, 
+       am, eo, in, msgr, xenl, xon, 
+       colors#8, it#8, ncv#58, pairs#64, 
+       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, 
+       bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, 
+       clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, cud1=^J, 
+       cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, 
+       dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, ech=\E[%p1%dX, 
+       ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, 
+       ich=\E[%p1%d@, ich1=\E[@, kbs=^H, kcub1=\E[D, kcud1=\E[B, 
+       kcuf1=\E[C, kcuu1=\E[A, kdch1=\177, kend=\E[Y, kf1=\EOP, 
+       kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf2=\EOQ, kf3=\EOR, 
+       kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, 
+       khome=\E[H, kich1=\E[@, nel=^M^J, op=\E[39;49m, rc=\E8, 
+       rev=\E[7m, rmacs=\E[10m, rmir=\E[4l, rmpch=\E[10m, 
+       rmso=\E[27m, rmul=\E[m, rs1=\Ec\E]R, sc=\E7, 
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[0;10m, 
+       smacs=\E[11m, smir=\E[4h, smpch=\E[11m, smso=\E[7m, 
+       smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, 
+
 # This entry fits the Windows NT console when the _POSIX_TERM environment
 # variable is set to 'on'.  While the Windows NT POSIX console is seldom used,
 # the Telnet client supplied with both the Windows for WorkGroup 3.11 TCP/IP
@@ -4201,6 +5042,91 @@ pcmw|PC running Microsoft Works,
        sgr0=\E[m$<2/>, smso=\E[7m$<2/>, smul=\E[4m$<2/>, 
        tbc=\E[3g$<2/>, 
 
+# From: Federico Bianchi
+# This is the entry for the OpenNT terminal.
+# The ntconsole name is for backward compatability.
+# This is for OpenNT 2.0 and later.
+# Later OpenNT was renamed to Interix.
+#
+# Presently it is distributed by Microsoft as Services For Unix (SFU).
+# The 3.5 beta contains ncurses 4.2 (that is header files and executables,
+# the documentation dates from 1.9.9e) -TD
+
+interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with color, 
+       am, bw, msgr, 
+       colors#8, cols#80, lines#25, ncv#3, pairs#64, 
+       acsc=`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~q\304r\362s_t\303u\264v\301w\302x\263y\371z\372{\373|\374}\375~\376.\031-\030\,\021+^P0\333p\304r\304y\363z\362{\343|\330}\234, 
+       bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[2J, cub=\E[%p1%dD, 
+       cub1=\E[D, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, 
+       cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, 
+       cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, 
+       home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=\E[S, 
+       indn=\E[%p1%dS, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, 
+       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[M, kend=\E[U, kf0=\EFA, 
+       kf1=\EF1, kf10=\EFA, kf11=\EFB, kf12=\EFC, kf13=\EFD, 
+       kf14=\EFE, kf15=\EFF, kf16=\EFG, kf17=\EFH, kf18=\EFI, 
+       kf19=\EFJ, kf2=\EF2, kf20=\EFK, kf21=\EFL, kf22=\EFM, 
+       kf23=\EFN, kf24=\EFO, kf25=\EFP, kf26=\EFQ, kf27=\EFR, 
+       kf28=\EFS, kf29=\EFT, kf3=\EF3, kf30=\EFU, kf31=\EFV, 
+       kf32=\EFW, kf33=\EFX, kf34=\EFY, kf35=\EFZ, kf36=\EFa, 
+       kf37=\EFb, kf38=\EFc, kf39=\EFd, kf4=\EF4, kf40=\EFe, 
+       kf41=\EFf, kf42=\EFg, kf43=\EFh, kf44=\EFi, kf45=\EFj, 
+       kf46=\EFk, kf47=\EFm, kf48=\EFn, kf49=\EFo, kf5=\EF5, 
+       kf50=\EFp, kf51=\EFq, kf52=\EFr, kf53=\EFs, kf54=\EFt, 
+       kf55=\EFu, kf56=\EFv, kf57=\EFw, kf58=\EFx, kf59=\EFy, 
+       kf6=\EF6, kf60=\EFz, kf61=\EF+, kf62=\EF-, 
+       kf63=\EF\014 kf64=\EF$, kf7=\EF7, kf8=\EF8, kf9=\EF9, 
+       kich1=\E[L, kll=\E[U, knp=\E[T, kpp=\E[S, ll=\E[U, nel=^M^J, 
+       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, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
+       setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm, 
+       sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[1m, smul=\E[4m, 
+
+opennt-35|ntconsole-35|OpenNT-term35 compatible with color, 
+       lines#35, use=opennt, 
+
+opennt-50|ntconsole-50|OpenNT-term50 compatible with color, 
+       lines#50, use=opennt, 
+
+opennt-60|ntconsole-60|OpenNT-term60 compatible with color, 
+       lines#60, use=opennt, 
+
+opennt-100|ntconsole-100|OpenNT-term100 compatible with color, 
+       lines#100, use=opennt, 
+
+# OpenNT wide terminals
+opennt-w|opennt-25-w|ntconsole-w|ntconsole-25-w|OpenNT-term-w compat with color, 
+       cols#125, use=opennt, 
+
+opennt-35-w|ntconsole-35-w|OpenNT-term35-w compatible with color, 
+       lines#35, use=opennt-w, 
+
+opennt-50-w|ntconsole-50-w|OpenNT-term50-w compatible with color, 
+       lines#50, use=opennt-w, 
+
+opennt-60-w|ntconsole-60-w|OpenNT-term60-w compatible with color, 
+       lines#60, use=opennt-w, 
+
+opennt-w-vt|opennt-25-w-vt|ntconsole-w-vt|ntconsole-25-w-vt|OpenNT-term-w-vt compat with color, 
+       cols#132, use=opennt, 
+
+# OpenNT terminals with no smcup/rmcup (names match termcap entries)
+interix-nti|opennt-nti|opennt-25-nti|ntconsole-25-nti|OpenNT-nti compatible with color, 
+       rmcup@, smcup@, use=opennt, 
+
+opennt-35-nti|ntconsole-35-nti|OpenNT-term35-nti compatible with color, 
+       lines#35, use=opennt-nti, 
+
+opennt-50-nti|ntconsole-50-nti|OpenNT-term50-nti compatible with color, 
+       lines#50, use=opennt-nti, 
+
+opennt-60-nti|ntconsole-60-nti|OpenNT-term60-nti compatible with color, 
+       lines#60, use=opennt-nti, 
+
+opennt-100-nti|ntconsole-100-nti|OpenNT-term100-nti compatible with color, 
+       lines#100, use=opennt-nti, 
+
 ######## COMMON TERMINAL TYPES
 #
 # This section describes terminal classes and maker brands that are still
@@ -5460,9 +6386,7 @@ qvt203-25-w|QVT 203 PLUS with 25 by 132 columns,
 #      Fax: (408)-954-0623
 #
 #
-# There are some tvi terminals that require incredible amounts of padding and
-# some that don't.  I'm assuming tvi912 and tvi920 are the old slow ones, and
-# tvi912b, tvi912c, tvi920b, tvi920c are the new ones that don't need padding.
+# These require incredible amounts of padding.
 #
 # All of these terminals (912 to 970 and the tvipt) are discontinued.  Newer
 # Televideo terminals are ANSI and PC-ANSI compatible.
@@ -5613,22 +6537,132 @@ tvi912|tvi914|tvi920|old televideo 912/914/920,
        kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, 
        kf9=^AH\r, khome=^^, rmso=\Ek, rmul=\Em, smso=\Ej, smul=\El, 
        tbc=\E3, 
-# the 912 has a <funct> key that's like shift: <funct>8 xmits "^A8\r".
-# The 920 has this plus real function keys that xmit different things.
-# Terminfo makes you use the funct key on the 912 but the real keys on the 920.
-tvi912c|tvi912b|new televideo 912, 
-       dl1=\ER$<5*>, il1=\EE$<5*>, use=tvi912, 
-# set to page 1 when entering curses application (\E-17 )
-# reset to page 0 when exiting curses application (\E-07 )
-tvi912-2p|tvi920-2p|tvi-2p|televideo w/2 pages, 
-       rmcup=\E-07\s, smcup=\E-17\s, use=tvi912, 
 # We got some new tvi912c terminals that act really weird on the regular 
 # termcap, so one of our gurus worked this up. Seems that cursor 
 # addressing is broken.
 tvi912cc|tvi912 at cowell college, 
        cup@, use=tvi912c, 
 
-# Here are the switch settings for the tvi920c:
+# tvi{912,920}[bc] - TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C
+# From: Benjamin C. W. Sittler
+#
+# Someone has put a scanned copy of the manual online at:
+#     http://vt100.net/televideo/912b-om/
+#
+# These terminals were produced ca. 1979, and had a 12" monochrome
+# screen, supported 75-9600 baud (no handshaking), monochrome, 7-bit
+# ASCII, and were generally similar to adm3a but with attributes
+# (including some with magic cookies), fancy half-duplex mode, and
+# different bugs.
+#
+# Some operations reqire truly incredible amounts of padding. The
+# insert_line (<il1>) and delete_line (<dl1>) operations in particular
+# are so slow as to be nearly unusable.
+#
+# There may or may not have been a separate, earlier series of 912/920
+# terminals (without the "B" and "C" suffix); I have never seen one,
+# and the manual only describes the "B" and "C" series. The 912 and 920
+# are quite distinct from the 914 and 924, which were much nicer non-
+# magic-cookie terminals similar to the 950.
+#
+# This is a new description for the following TeleVideo terminals,
+# distinguished chiefly by their keyboards:
+#
+#   TVI-912B - very odd layout, no function keys (84 keys)
+#   TVI-920B - typewriter layout, no function keys (103 keys)
+#   TVI-912C - very odd layout, function keys F1-F11 (82 keys)
+#   TVI-920C - typewriter layout, function keys F1-F11 (101 keys)
+#
+# To choose a setting for the TERM variable, start with the model:
+#
+#    Model  || base name
+# ----------||-----------
+#  TVI-912B || tvi912b
+#  TVI-912C || tvi912c
+#  TVI-920B || tvi920b
+#  TVI-920C || tvi920c
+#
+# Then add a suffix from the following table describing installed options
+# and how you'd like to use the terminal:
+#
+#   Use Video | Second | Visual |  Magic  |  Page || feature
+#  Attributes |  Page  |  Bell  | Cookies | Print || suffix
+# ------------|--------|--------|---------|-------||---------
+#      No     |   No   |  N/A   |   N/A   |   No  || -unk
+#      No     |   No   |  N/A   |   N/A   |  Yes  || -p
+#      No     |  Yes   |   No   |   N/A   |   No  || -2p-unk
+#      No     |  Yes   |   No   |   N/A   |  Yes  || -2p-p
+#      No     |  Yes   |  Yes   |   N/A   |   No  || -vb-unk
+#      No     |  Yes   |  Yes   |   N/A   |  Yes  || -vb-p
+#     Yes     |   No   |  N/A   |    No   |  N/A  ||
+#     Yes     |   No   |  N/A   |   Yes   |  N/A  || -mc
+#     Yes     |  Yes   |   No   |    No   |  N/A  || -2p
+#     Yes     |  Yes   |   No   |   Yes   |  N/A  || -2p-mc
+#     Yes     |  Yes   |  Yes   |    No   |  N/A  || -vb
+#     Yes     |  Yes   |  Yes   |   Yes   |  N/A  || -vb-mc
+#
+# So e.g. a model 920 C with second page memory option, visual bell
+# and no magic cookies would be tvi920c-vb; a model 912 B without the
+# second page memory option and using magic cookies would be
+# tvi912b-mc
+#
+# PADDING
+#
+# At 9600 baud, the terminal is prone to overflow its input buffer
+# during complex operations (insert/delete
+# character/line/screen/page), and it does not signal this over the
+# RS232 cable. The typical symptom of an overrun is that the terminal
+# starts beeping, and output becomes garbled.
+#
+# The padding delays in this terminfo were derived using tack(1)
+# running on a Linux box connected to a TVI-920C with a later-model
+# (A49C1-style) ROM running at 9600 baud, so your mileage may
+# vary. The numbers below seem to give the terminal enough time so
+# that it doesn't overflow its input buffer and start losing
+# characters.
+#
+# KEYS
+#
+# If you want to use the FUNCT key on a tvi912[bc], use the
+# corresponding tvi920[bc] terminfo with FUNCT + ... equivalents from
+# the following table (these also work on the 920 series):
+#
+# Unshifted Function Keys:
+#
+#  Key | capname|| Equivalent
+# -----|--------||------------
+#   F1 |  <kf1> || FUNCT + @
+#   F2 |  <kf2> || FUNCT + A
+#   F3 |  <kf3> || FUNCT + B
+#   F4 |  <kf4> || FUNCT + C
+#   F5 |  <kf5> || FUNCT + D
+#   F6 |  <kf6> || FUNCT + E
+#   F7 |  <kf7> || FUNCT + F
+#   F8 |  <kf8> || FUNCT + G
+#   F9 |  <kf9> || FUNCT + H
+#  F10 | <kf10> || FUNCT + I
+#  F11 | <kf11> || FUNCT + J
+#
+# Shifted Function Keys:
+#
+#  SHIFT + Key | capname|| Equivalent
+# -------------|--------||------------
+#   SHIFT + F1 | <kf12> || FUNCT + `
+#   SHIFT + F2 | <kf13> || FUNCT + a
+#   SHIFT + F3 | <kf14> || FUNCT + b
+#   SHIFT + F4 | <kf15> || FUNCT + c
+#   SHIFT + F5 | <kf16> || FUNCT + d
+#   SHIFT + F6 | <kf17> || FUNCT + e
+#   SHIFT + F7 | <kf18> || FUNCT + f
+#   SHIFT + F8 | <kf19> || FUNCT + g
+#   SHIFT + F9 | <kf20> || FUNCT + h
+#  SHIFT + F10 | <kf21> || FUNCT + i
+#  SHIFT + F11 | <kf22> || FUNCT + j
+#
+# PORTS AND SWITCH SETTINGS
+#
+# Here are the switch settings for the TVI-912B/TVI-920B and
+# TVI-912C/TVI-920C:
 #
 # S1 (Line), and S3 (Printer) baud rates -- put one, and only one, switch down:
 # 2: 9600      3: 4800         4: 2400         5: 1200
@@ -5680,10 +6714,223 @@ tvi912cc|tvi912 at cowell college,
 # S4/W34:      Selects Page Print Mode as initial condition.  If not 
 #              installed, Extension Mode is selected.
 #
-tvi920b|tvi920c|new televideo 920, 
-       dl1=\ER$<5*>, il1=\EE$<5*>, kf0=^AI\r, kf1=^A@\r, 
-       kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, 
-       kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, use=tvi912, 
+# NON-STANDARD CAPABILITIES
+#
+# Sending <u9> or <u7> returns a cursor position report in the format
+# YX\r, where Y and X are as in <cup>. This format is described in
+# <u8> and <u6>, but it's not clear how one should write an
+# appropriate scanf string, since we need to subtract %' ' from the
+# character after reading it. The <u9> capability is used by tack(1)
+# to synchronize during padding tests, and seems to work for that
+# purpose.
+#
+# This description also includes the obsolete termcap capabilities
+# has_hardware_tabs (<OTpt>) and backspaces_with_bs (<OTbs>).
+#
+# FEATURES NOT YET DESCRIBED IN THIS TERMINFO
+#
+# The FUNCT modifier actually works with every normal key by sending
+# ^AX\r, where X is the sequence normally sent by that key. This is a
+# sort of meta key not currently describable in terminfo.
+#
+# There are quite a few other keys (especially on the 920 models,) but
+# they are for the most part only useful in block mode.
+#
+# These terminals have lots of forms manipulation features, mainly
+# useful in block mode, including "clear X to nulls" (vs. "clear X to
+# spaces"; nulls are sentinels for "send X" operations); "send X"
+# operations for uploading all or part of the screen; and block-mode
+# editing keys (they don't send escape sequences, but manipulate video
+# memory directly). Block mode is used for local editing, and protect
+# mode (in conjunction with the "write protect" attribute,
+# a.k.a. half-intensity outside of protect mode) is used to control
+# which parts of the screen are edited/sent/printed (by <mc0>).
+#
+# There are at least two major families of ROM, "early" and
+# A49B1/A49C1; the major difference seems to be that the latter ROMs
+# support a few extra escape sequences for manipulating the off-screen
+# memory page, and for sending whole pages back to the host (mainly
+# useful in block mode.) The descriptions in this file don't use any
+# of those sequences: set cursor position including page (\E-PYX,
+# where P is \s for page 0 and ! for page 1 [actually only the LSB of
+# P is taken into account, so e.g. 0 and 1 work too,] and Y and X are
+# as in <cup>); read cursor position (\E/), which is analogous to <u9>
+# and returns PYX\r, where P is \s for page 0 or ! for page 1, and YX
+# are as in <cup>, and some "send page" features mainly useful for
+# forms manipulation.
+#
+# The keyboard enable (\E") and disable (\E#) sequences are unused,
+# except that a terminal reset (<is2>) enables the keyboard.
+#
+# Auto-flip mode (\Ev) is likely faster than the scrolling mode (\Ew)
+# enabled in <is2>, but auto-flip is very jarring so we don't use it.
+#
+# BUGS
+#
+# At least up to the A49B1 and A49C1 ROMs, there are no \Eb and \Ed
+# sequences (I infer that in some TeleVideo terminal they may invert
+# and uninvert the display) so the <flash> sequence given here is a
+# cheesy page-flip instead.
+#
+# The back_tab (<cbt>) sequence (\EI) doesn't work according to
+# tack(1), so it is not included in the descriptions below.
+#
+# It's not clear whether auto_left_margin (<bw>) flag should be set
+# for these terminals; tack says yes, so it is set here, but this
+# differs from other descriptions I've seen.
+#
+# Extension print mode (<mc5>) echoes all characters to the printer
+# port [in addition to displaying them] except for the page print mode
+# sequence (<mc4>); this is a slight violation of the terminfo
+# definition for <mc5> but I don't expect it to cause problems.  We
+# reset to page print mode in <rs1> since it may have been enabled
+# accidentally.
+#
+# The descriptions with plus signs (+) are building blocks.
+
+tvi912b-unk|tvi912c-unk|TeleVideo TVI-912B or TVI-912C (no attributes), 
+       OTbs, OTpt, am, bw, 
+       cols#80, it#8, lines#24, 
+       bel=^G, clear=\032$<50>, cr=^M, cub1=^H, cud1=^J, cuf1=^L, 
+       cup=\E=%p1%' '%+%c%p2%' '%+%c, cuu1=^K, dch1=\EW$<30>, 
+       dl1=\ER$<1*>$<100>, ed=\Ey$<2*>$<10>, el=\ET$<15>, 
+       home=^^, ht=^I, hts=\E1, ich1=\EQ$<30>, 
+       if=/usr/share/tabset/stdcrt, il1=\EE$<1*>$<100>, 
+       ind=\n$<10>, is2=\Ew\EA\E'\E"\E(, kcub1=^H, kcud1=^J, 
+       kcuf1=^L, kcuu1=^K, kdch1=\177, kent=^M, khome=^^, mc4=\EA, 
+       mc5=\E@, rs1=\Ek\010\Em\010\Eq\032, tbc=\E3, u6=%c%c\r, 
+       u7=\E?, u8=%c%c\r, u9=\E?, 
+
+# This isn't included in the basic capabilities because it is
+# typically unusable in combination with the full range of video
+# attributes, since the magic cookie attributes turn into ASCII
+# control characters, and the half-intensity ("protected") attribute
+# converts all affected characters to spaces.
+
+tvi912b+printer|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C page print support, 
+       mc0=\EP, 
+
+# This uses half-intensity mode (<dim>) for standout (<smso>), and
+# exposes no other attributes (half-intensity is the only attribute
+# that does not generate a magic cookie.)
+
+tvi912b+dim|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C half-intensity attribute support, 
+       msgr, 
+       dim=\E), rmso=\E(, sgr=\E%?%p1%p5%|%t)%e(%;, sgr0=\E(, 
+       smso=\E), 
+
+# Full magic-cookie attribute support, with half-intensity reverse
+# video for standout. Note that we add a space in the <dim> sequence
+# to give a consistent magic-cookie count. Also note that <sgr> uses
+# backspacing (in the TVI-supported order) to apply all requested
+# attributes with only a single magic cookie.
+
+tvi912b+mc|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C full magic-cookie attribute support, 
+       xmc#1, 
+       blink=\E\^, dim=\E)\s, invis=\E_, rev=\Ej, rmso=\E(\Ek, 
+       rmul=\Em, 
+       sgr=\E%?%p1%p5%|%t)%e(%; \010\E%?%p1%p3%|%tj%ek%;\010\E%?%p2%tl%em%;\010\E%?%p7%t_%e%?%p4%t\^%eq%;%;, 
+       sgr0=\E(\Ek\010\Em\010\Eq, smso=\E)\Ej, smul=\El, 
+
+# This uses the second page memory option to save & restore screen
+# contents. If your terminal is missing the option, this description
+# should still work, but that has not been tested.
+
+tvi912b+2p|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C second page memory option support, 
+       flash=\EK$<100>\EK, rmcup=\032$<50>\EK\E=7\s, 
+       smcup=\EK\032$<50>\E(\Ek\010\Em\010\Eq\032$<50>, 
+
+# This simulates flashing by briefly toggling to the other page
+# (kludge!)
+
+tvi912b+vb|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C second page memory option "visible bell" support, 
+       bel=\EK$<100>\EK, use=tvi912b+2p, 
+
+# Function keys (<kf12> .. <kf22> are shifted <kf1> .. <kf11>)
+
+tvi920b+fn|TeleVideo TVI-920B and TVI-920C function key support, 
+       kf1=^A@\r, kf10=^AI\r, kf11=^AJ\r, kf12=^A`\r, kf13=^Aa\r, 
+       kf14=^Ab\r, kf15=^Ac\r, kf16=^Ad\r, kf17=^Ae\r, kf18=^Af\r, 
+       kf19=^Ag\r, kf2=^AA\r, kf20=^Ah\r, kf21=^Ai\r, kf22=^Aj\r, 
+       kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, 
+       kf8=^AG\r, kf9=^AH\r, 
+
+# Combinations of the basic building blocks
+
+tvi912b-2p-unk|tvi912c-2p-unk|tvi912b-unk-2p|tvi912c-unk-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; no attributes), 
+       use=tvi912b+2p, use=tvi912b-unk, 
+
+tvi912b-vb-unk|tvi912c-vb-unk|tvi912b-unk-vb|tvi912c-unk-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; no attributes), 
+       use=tvi912b+vb, use=tvi912b-unk, 
+
+tvi912b-p|tvi912c-p|TeleVideo TVI-912B or TVI-912C (no attributes; page print), 
+       use=tvi912b+printer, use=tvi912b-unk, 
+
+tvi912b-2p-p|tvi912c-2p-p|tvi912b-p-2p|tvi912c-p-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; no attributes; page print), 
+       use=tvi912b+2p, use=tvi912b+printer, use=tvi912b-unk, 
+
+tvi912b-vb-p|tvi912c-vb-p|tvi912b-p-vb|tvi912c-p-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; no attributes; page print), 
+       use=tvi912b+vb, use=tvi912b+printer, use=tvi912b-unk, 
+
+tvi912b-2p|tvi912c-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; half-intensity attribute), 
+       use=tvi912b+2p, use=tvi912b+dim, use=tvi912b-unk, 
+
+tvi912b-2p-mc|tvi912c-2p-mc|tvi912b-mc-2p|tvi912c-mc-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; magic cookies), 
+       use=tvi912b+2p, use=tvi912b+mc, use=tvi912b-unk, 
+
+tvi912b-vb|tvi912c-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; half-intensity attribute), 
+       use=tvi912b+vb, use=tvi912b+dim, use=tvi912b-unk, 
+
+tvi912b-vb-mc|tvi912c-vb-mc|tvi912b-mc-vb|tvi912c-mc-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; magic cookies), 
+       use=tvi912b+vb, use=tvi912b+mc, use=tvi912b-unk, 
+
+tvi912b|tvi912c|TeleVideo TVI-912B or TVI-912C (half-intensity attribute), 
+       use=tvi912b+dim, use=tvi912b-unk, 
+
+tvi912b-mc|tvi912c-mc|TeleVideo TVI-912B or TVI-912C (magic cookies), 
+       use=tvi912b+mc, use=tvi912b-unk, 
+
+tvi920b-unk|tvi920c-unk|TeleVideo TVI-920B or TVI-920C (no attributes), 
+       use=tvi920b+fn, use=tvi912b-unk, 
+
+tvi920b-2p-unk|tvi920c-2p-unk|tvi920b-unk-2p|tvi920c-unk-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; no attributes), 
+       use=tvi920b+fn, use=tvi912b+2p, use=tvi912b-unk, 
+
+tvi920b-vb-unk|tvi920c-vb-unk|tvi920b-unk-vb|tvi920c-unk-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; no attributes), 
+       use=tvi920b+fn, use=tvi912b+vb, use=tvi912b-unk, 
+
+tvi920b-p|tvi920c-p|TeleVideo TVI-920B or TVI-920C (no attributes; page print), 
+       use=tvi920b+fn, use=tvi912b+printer, use=tvi912b-unk, 
+
+tvi920b-2p-p|tvi920c-2p-p|tvi920b-p-2p|tvi920c-p-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; no attributes; page print), 
+       use=tvi920b+fn, use=tvi912b+2p, use=tvi912b+printer, 
+       use=tvi912b-unk, 
+
+tvi920b-vb-p|tvi920c-vb-p|tvi920b-p-vb|tvi920c-p-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; no attributes; page print), 
+       use=tvi920b+fn, use=tvi912b+vb, use=tvi912b+printer, 
+       use=tvi912b-unk, 
+
+tvi920b-2p|tvi920c-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; half-intensity attribute), 
+       use=tvi920b+fn, use=tvi912b+2p, use=tvi912b+dim, 
+       use=tvi912b-unk, 
+
+tvi920b-2p-mc|tvi920c-2p-mc|tvi920b-mc-2p|tvi920c-mc-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; magic cookies), 
+       use=tvi920b+fn, use=tvi912b+2p, use=tvi912b+mc, 
+       use=tvi912b-unk, 
+
+tvi920b-vb|tvi920c-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; half-intensity attribute), 
+       use=tvi920b+fn, use=tvi912b+vb, use=tvi912b+dim, 
+       use=tvi912b-unk, 
+
+tvi920b-vb-mc|tvi920c-vb-mc|tvi920b-mc-vb|tvi920c-mc-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; magic cookies), 
+       use=tvi920b+fn, use=tvi912b+vb, use=tvi912b+mc, 
+       use=tvi912b-unk, 
+
+tvi920b|tvi920c|TeleVideo TVI-920B or TVI-920C (half-intensity attribute), 
+       use=tvi920b+fn, use=tvi912b+dim, use=tvi912b-unk, 
+
+tvi920b-mc|tvi920c-mc|TeleVideo TVI-920B or TVI-920C (magic cookies), 
+       use=tvi920b+fn, use=tvi912b+mc, use=tvi912b-unk, 
 
 # Televideo 921 and variants
 # From: Tim Theisen <tim@cs.wisc.edu> 22 Sept 1995
@@ -6550,7 +7797,7 @@ wy100|wyse 100,
 wy120|wyse120|wy150|wyse150|Wyse 120/150, 
        am, bw, hs, km, mc5i, mir, msgr, xon, 
        cols#80, it#8, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45, 
-       acsc=+/\,.0[Iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
+       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>, 
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, 
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>, 
@@ -6629,7 +7876,7 @@ wy120-w-vb|wy120-wvb|wyse120-wvb|wy150-w-vb|wyse150-w-vb|Wyse 120/150 132-column
 wy60|wyse60|Wyse 60, 
        am, bw, hs, km, mc5i, mir, msgr, 
        cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#45, 
-       acsc=+/\,.0[Iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
+       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<100>, 
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, 
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, 
@@ -6798,7 +8045,7 @@ wy99a-ansi|Wyse WY-99GT in ansi mode (US PC keyboard),
 wy99f|wy99fgt|wy-99fgt|Wyse WY-99GT (int'l PC keyboard), 
        am, bw, hs, km, mc5i, mir, msgr, xon, 
        cols#80, it#8, lines#25, wsl#46, 
-       acsc='x+y.wI~_vj(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G, 
+       acsc='x+y.wi~_vj(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G, 
        blink=\EG2, cbt=\EI, civis=\E`0, clear=\E'\E(\032, 
        cnorm=\E`4\E`1, cr=^M, cub1=^H, cud1=\Ej, cuf1=^L, 
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, 
@@ -6850,7 +8097,7 @@ wy99fa|wy99fgta|wy-99fgta|Wyse WY-99GT (US PC keyboard),
 wy160|wyse160|Wyse 160, 
        am, bw, hs, km, mc5i, mir, msgr, 
        cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#38, 
-       acsc=+/\,.0[Iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
+       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<30>, 
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, 
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<5>, 
@@ -6939,9 +8186,8 @@ wy75|wyse75|wyse 75,
        ich=\E[%p1%d@$<1*>, il=\E[%p1%dL$<2*>, il1=\E[L$<2>, 
        ind=\n$<2>, ip=$<1>, 
        is1=\E[2;4;20;30l\E[?1;10l\E[12h\E[?7;8;25h, 
-       is2=\E>\E(B\E)0\017, is3=\E[m, ka1=\EOw, ka3=\EOy, 
-       kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\E[D, kcud1=\E[B, 
-       kcuf1=\E[C, kcuu1=\E[A, kdl1=\E[M, kel=\E[K, kent=\EOM, 
+       is2=\E>\E(B\E)0\017, is3=\E[m, kbs=^H, kcub1=\E[D, 
+       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdl1=\E[M, kel=\E[K, 
        kf1=\E[?5i, 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[?3i, 
@@ -6956,7 +8202,7 @@ wy75|wyse75|wyse 75,
        sgr=%?%p5%t\E[0t%;%?%p3%p1%|%t\E[1t%;%?%p2%t\E[2t%;%?%p4%t\E[3t%;%?%p1%p2%p3%p4%p5%|%|%|%|%t\E[7m%e\E[m%;%?%p9%t\016%e\017%;, 
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, 
        smkx=\E[?1l\E[?7h\E=, smso=\E[1t\E[7m, smul=\E[2t\E[4m, 
-       tbc=\E[3g, tsl=\E[>\,\001, 
+       tbc=\E[3g, tsl=\E[>\,\001, use=vt220+keypad, 
 #
 #      This terminal description uses the non-hidden attribute mode
 #      (with magic cookie).
@@ -7008,23 +8254,22 @@ wy85|wyse85|wyse 85,
        ich=\E[%p1%d@$<4*>, il=\E[%p1%dL$<5*>, il1=\E[L$<5>, 
        ind=\n$<3>, invis=\E[8m, ip=$<3>, is1=\E[62;1"p\E[?5W, 
        is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h$<16>, 
-       is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOy, kb2=\EOu, 
-       kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\E[D, kcud1=\E[B, 
-       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kent=\EOM, kf1=\EOP, 
-       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=\EOQ, kf20=\E[34~, kf3=\EOR, 
-       kf4=\EOS, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, 
-       kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, kich1=\E[2~, 
-       knp=\E[6~, kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, 
-       lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, 
-       ri=\EM$<3>, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, 
-       rmso=\E[m, rmul=\E[m, rs1=\E[13l\E[3l\E!p, 
-       rs2=\E[35h\E[?3l$<70>, rs3=\E[?5l, sc=\E7, 
+       is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcub1=\E[D, kcud1=\E[B, 
+       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, 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~, kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, 
+       kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, 
+       khome=\E[26~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, 
+       kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, 
+       mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM$<3>, 
+       rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rmso=\E[m, 
+       rmul=\E[m, rs1=\E[13l\E[3l\E!p, rs2=\E[35h\E[?3l$<70>, 
+       rs3=\E[?5l, sc=\E7, 
        sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, 
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, 
        smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 
-       tsl=\E[40h\E7\E[25;%i%p1%dH, 
+       tsl=\E[40h\E7\E[25;%i%p1%dH, use=vt220+keypad, 
 #
 #      Wyse 85 with visual bell.
 wy85-vb|wyse85-vb|wyse 85 with visible bell, 
@@ -7113,25 +8358,24 @@ wy185|wyse185|wyse 185,
        ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, il1=\E[L$<3>, 
        ind=\n$<2>, invis=\E[8m, ip=$<4>, is1=\E[?5W, 
        is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h, 
-       is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOy, kb2=\EOu, 
-       kbs=^H, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, 
-       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kent=\EOM, 
-       kf1=\EOP, 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=\EOQ, 
-       kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~, 
-       kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, 
-       khome=\E[26~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, 
-       kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, 
-       mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM$<2>, 
-       rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, rmkx=\E>, 
-       rmso=\E[27m, rmul=\E[24m, 
+       is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcbt=\E[Z, kcub1=\E[D, 
+       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kf1=\EOP, 
+       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=\EOQ, kf20=\E[34~, kf3=\EOR, 
+       kf4=\EOS, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, 
+       kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, kich1=\E[2~, 
+       knp=\E[6~, kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, 
+       lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, 
+       ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, 
+       rmkx=\E>, rmso=\E[27m, rmul=\E[24m, 
        rs1=\E[13l\E[3l\E\\\E[63;1"p\E[!p, rs2=\E[35h\E[?3l, 
        rs3=\E[?5l\E[47h\E[40l\E[r, sc=\E7, 
        sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, 
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[ Q, 
        smir=\E[4h, smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, 
        tbc=\E[3g, tsl=\E7\E[99;%i%p1%dH, vpa=\E[%i%p1%dd, 
+       use=vt220+keypad, 
 #
 #      Wyse 185 with 24 data lines and top status (terminal status)
 wy185-24|wyse185-24|wyse 185 with 24 data lines, 
@@ -7161,7 +8405,7 @@ wy185-wvb|wyse185-wvb|wyse 185+flash+132 cols,
 wy325|wyse325|Wyse epc, 
        am, bw, hs, mc5i, mir, 
        cols#80, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45, 
-       acsc=+/\,.0[Iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
+       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, 
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>, 
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, 
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>, 
@@ -7322,16 +8566,14 @@ wy370|wyse370|wy370-101k|Wyse 370 with 101 key keyboard,
 #      Function key set for the VT-320 (and wy85) compatible keyboard
 #
 wy370-105k|Wyse 370 with 105 key keyboard, 
-       ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, 
-       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, 
-       kdch1=\E[3~, kent=\EOM, kf1=\EOP, 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=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, 
-       kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, 
+       kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, 
+       kdch1=\E[3~, 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~, kf20=\E[34~, 
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, 
        khlp=\E[28~, khome=\E[26~, kich1=\E[2~, knp=\E[6~, 
        kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, 
-       use=wy370-nk, 
+       use=wy370-nk, use=vt220+keypad, 
 #
 #      Function key set for the PC compatible keyboard
 #
@@ -7435,26 +8677,24 @@ wy520|wyse520|wyse 520,
        hts=\EH, ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, 
        il1=\E[L$<3>, ind=\n$<2>, invis=\E[8m, ip=$<4>, is1=\E[?5W, 
        is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25;67h, 
-       is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOu, kb2=\EOy, 
-       kbs=^H, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, 
+       is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcbt=\E[Z, kcub1=\E[D, 
        kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, ked=\E[1~, 
-       kel=\E[4~, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, 
+       kel=\E[4~, kent=\EOM, 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=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, 
-       kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, 
-       khlp=\E[28~, khome=\E[26~, kich1=\E[2~, knp=\E[6~, 
-       kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, 
-       mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, 
-       ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, 
-       rmso=\E[m, rmul=\E[24m, 
+       kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, 
+       kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, 
+       kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, lf1=PF1, 
+       lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, 
+       rc=\E8, rev=\E[7m, ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, 
+       rmcup=\E[ R, rmir=\E[4l, rmso=\E[m, rmul=\E[24m, 
        rs1=\E[13l\E[3l\E\\\E[63;1"p\E[!p, rs2=\E[35h\E[?3l, 
        rs3=\E[?5l\E[47h\E[40l\E[r, sc=\E7, 
        sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, 
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, 
        smcup=\E[ Q\E[?67;8h, smir=\E[4h, smso=\E[7m, smul=\E[4m, 
        tbc=\E[3g, tsl=\E[2$~\E[1$}\E[%i%p1%d`, 
-       vpa=\E[%i%p1%dd, 
+       vpa=\E[%i%p1%dd, use=vt220+keypad, 
 #
 #       Wyse 520 with 24 data lines and status (terminal status)
 wy520-24|wyse520-24|wyse 520 with 24 data lines, 
@@ -7720,8 +8960,8 @@ vt320-k311|dec vt320 series as defined by kermit 3.11,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 
-       cvvis=\E[?25h, 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, 
+       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, fsl=\E[$}, home=\E[H, ht=^I, hts=\EH, 
        ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L$<3/>, ind=\ED, 
        is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H, 
@@ -7794,15 +9034,20 @@ vt320-k311|dec vt320 series as defined by kermit 3.11,
 # (The <blink>/<bold>/<rev>/<smacs>/<smul>/<smso> capabilities exist only to
 # tell ncurses that the corresponding highlights exist; it should use <sgr>,
 # which is the only method that will actually work for multiple highlights.)
+#
+# Update by TD - 2004: half of this was inconsistent.  Found documentation
+# and repaired most of the damage.  sgr0 is probably incorrect, but the
+# available documentation gives no clues for a workable string.
 avatar0|avatar terminal emulator level 0, 
        am, bce, msgr, 
        cols#80, it#8, lines#25, 
-       blink=^A^V\177, bold=^V^A^P, cr=^M, cub1=^V^E, cud1=^V^D, 
+       blink=^V^B, bold=^V^A^P, cr=^M, cub1=^V^E, cud1=^V^D, 
        cuf1=^V^F, cup=\026\010%p1%c%p2%c, cuu1=^V^C, el=^V^G, 
-       ind=^J, invis=^V^A\0, rep=\031%p1%c%p2%d, rev=^A^Vp, 
-       rs2=^L, 
-       sgr=\026\001%{0}%?%p1%t%{112}%|%;%?%p2%t%{1}%|%;%?%p3%t%{112}%|%;%?%p4%t{128}%|%;%?%p6%t%{16}%|%;, 
-       sgr0=^V^A^G, smacs=, smso=^A^Vp, smul=^V^A, use=klone+acs, 
+       ind=^J, invis=^V^A\0, rep=\031%p1%c%p2%c, rev=^V^Ap, 
+       rmacs@, rs2=^L, 
+       sgr=%?%p1%p2%|%p3%|%p6%|%p7%|%t\026\001%?%p7%t%{128}%e%{0}%?%p1%t%{112}%|%;%?%p2%t%{1}%|%;%?%p3%t%{112}%|%;%?%p6%t%{16}%|%;%;%c%;%?%p4%t\026\002%;, 
+       sgr0=^V^A^G, smacs@, smso=^V^Ap, smul=^V^A^A, 
+       use=klone+acs, 
 # From: Eric S. Raymond <esr@snark.thyrsus.com> 1 Nov 1995
 avatar0+|avatar terminal emulator level 0+, 
        dch1=^V^N, rmir=\026\n\0\0\0\0, smir=^V^I, use=avatar0, 
@@ -7823,10 +9068,9 @@ rbcomm|IBM PC with RBcomm and EMACS keybindings,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, 
        clear=^L, cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr, 
        cub1=^H, cud1=^C, cuf1=^B, 
-       cup=\037%p2%{32}%+%c%p1%{32}%+%c, cuu1=^^, 
-       cvvis=\E[?25h, dch1=^W, dl=\E[%p1%dM, dl1=^Z, 
-       ech=\E[%p1%dX, ed=^F5, el=^P^P, ht=^I, il=\E[%p1%dL, il1=^K, 
-       ind=\ED, invis=\E[8m, 
+       cup=\037%p2%{32}%+%c%p1%{32}%+%c, cuu1=^^, dch1=^W, 
+       dl=\E[%p1%dM, dl1=^Z, ech=\E[%p1%dX, ed=^F5, el=^P^P, ht=^I, 
+       il=\E[%p1%dL, il1=^K, ind=\ED, invis=\E[8m, 
        is2=\017\035\E(B\E)0\E[?7h\E[?3l\E[>8g, kbs=^H, 
        kcub1=^B, kcud1=^N, kcuf1=^F, kcuu1=^P, khome=^A, nel=^M\ED, 
        rc=\E8, rep=\030%p1%c%p2%c, rev=^R, ri=\EM, rmcup=, rmdc=, 
@@ -7976,17 +9220,15 @@ v5410|att5410 in terms of a vt100,
        cup=\E[%i%p1%d;%p2%dH$<5>, cuu1=\E[A$<2>, dch1=\E[P, 
        dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, 
        enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ich1=\E[@, 
-       il1=\E[L, ind=^J, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=^H, 
-       kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, 
-       kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\EOx, 
-       kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, 
-       kf8=\EOl, kf9=\EOw, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, 
-       rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, 
+       il1=\E[L, ind=^J, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, 
+       kcuu1=\EOA, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, 
+       rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, 
        rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, 
        sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, 
        sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, 
        smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, 
+       use=vt100+fnkeys, 
 
 # 
 # Teletype Model 5420 -- A souped up 5410, with multiple windows,
@@ -9623,15 +10865,66 @@ screwpoint|adds viewpoint with ^O bug,
 # underline=01100000, rev=01010000, blink=01000010,dim=01000001,
 # invis=01000100 and %c is the logical or of desired attributes.
 # There is also a `tag bit' enabling attributes, set by \E) and unset by \E(.
+#
+# Update by TD - 2004:
+# Adapted from 
+#      http://www.cs.utk.edu/~shuford/terminal/adds_viewpoint_news.txt
+#
+# COMMANDS                        ASCII CODE
+# 
+# Address, Absolute               ESC,=,row,column
+# Beep                            BEL
+# Aux Port Enable                 ESC,@
+# Aux Port Disable                ESC,A
+# Backspace                       BS
+# Cursor back                     BS
+# Cursor down                     LF
+# Cursor forward                  FF
+# Cursor home                     RS
+# Cursor up                       VT
+# Cursor supress                  ETB
+# Cursor enable                   CAN
+# Erase to end of line            ESC,T
+# Erase to end of page            ESC,Y
+# Erase screen                    SUB
+# Keyboard lock                   SI
+# Keyboard unlock                 SO
+# Read current cursor position    ESC,?
+# Set Attribute                   ESC,0,x  (see below for values of x)
+# Tag bit reset                   ESC,(
+# Tag bit set                     ESC,)
+# Transparent Print on            ESC,3
+# Transparent Print off           ESC,4
+# 
+# 
+# ATTRIBUTES
+# 
+# Normal                          @    0100
+# Half Intensity                  A    0101
+# Blinking                        B    0102
+# Half Intensity Blinking         C    0103
+# Reverse Video                   P    0120
+# Reverse Video Half Intensity    Q    0121
+# Reverse Video Blinking          R    0122
+# Reverse Video Half Intensity
+#    Blinking                     S    0123
+# Underlined                      `    0140
+# Underlined Half Intensity       a    0141
+# Underlined Blinking             b    0142
+# Underlined Half Intensity
+#    Blinking                     c    0143
+# Video suppress                  D    0104
 vp3a+|viewpoint3a+|adds viewpoint 3a+, 
        am, bw, 
        cols#80, it#8, lines#24, 
-       civis=^W, clear=\E*$<80>, cnorm=^X, cr=^M, cub1=^H, cud1=^J, 
-       cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, 
-       ed=\EY$<80>, el=\ET, home=^^, ht=^I, ind=^J, kbs=^H, kcub1=^H, 
-       kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, nel=^M^J, rmso=\E(, 
-       sgr=\E0%{64}%?%p1%tQ%|%;%?%p2%t%{96}%|%;%?%p3%tP%|%;%?%p4%t%{2}%|%;%?%p5%t%{1}%|%;%?%p7%tD%|%;%c\E), 
-       sgr0=\E(, smso=\E0Q\E), 
+       blink=\E0B\E), civis=^W, clear=\E*$<80>, cnorm=^X, cr=^M, 
+       cub1=^H, cud1=^J, cuf1=^L, 
+       cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dim=\E0A\E), 
+       ed=\EY$<80>, el=\ET, home=^^, ht=^I, ind=^J, invis=\E0D\E), 
+       kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, 
+       nel=^M^J, rev=\E0P\E), rmso=\E(, 
+       sgr=%?%p1%p2%|%p3%|%p4%|%p5%|%p7%|%t\E0%{64}%?%p1%t%{17}%|%;%?%p2%t%{32}%|%;%?%p3%t%{16}%|%;%?%p4%t%{2}%|%;%?%p5%t%{1}%|%;%c%?%p7%tD%;\E)%e\E(%;, 
+       sgr0=\E(, smso=\E0Q\E), smul=\E0`\E), 
 vp60|viewpoint60|addsvp60|adds viewpoint60, 
        use=regent40, 
 #
@@ -11380,16 +12673,14 @@ ts100|ts100-sp|falco ts100-sp,
        cuu1=\E[A$<2>, dch1=\E~W, dl1=\E~R, ed=\E[J$<50>, 
        el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, 
        ht=^I, hts=\EH, ich1=\E~Q, il1=\E~E, ind=^J, is1=\E~)\E~ea, 
-       ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, 
-       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, 
-       kf0=\EOy, kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, 
-       kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, 
-       rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, 
+       kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, 
        rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, 
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, 
        sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, 
        smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, 
+       use=vt100+fnkeys, 
 ts100-ctxt|falco ts-100 saving context, 
        rmcup=\E~_b, smcup=\E~_d\E[2J, use=ts100, 
 
@@ -11475,11 +12766,11 @@ f110|freedom110|Liberty Freedom 110,
        bw@, eslok, 
        it#8, wsl#80, 
        blink=\EG2, bold=\EG0, civis=\E.1, cnorm=\E.2, cud1=^V, 
-       cvvis=\E.2, dim=\EG@, dl1=\ER, dsl=\Ef\r
-       flash=\Eb$<200/>\Ed, il1=\EE, ip@, is2@, kclr=^^, kdch1=\EW
-       kdl1=\ER, ked=\EY, kel=\ET, kf0=^AI\r, kf10@, kich1=\EQ
-       kil1=\EE, mc4=\Ea, mc5=\E`, ri=\EJ, rmacs=\E%%, rmir=\Er\EO
-       smacs=\E$, smir=\EO\Eq, smso=\EG<, tsl=\Ef, use=f100, 
+       dim=\EG@, dl1=\ER, dsl=\Ef\r, flash=\Eb$<200/>\Ed, il1=\EE
+       ip@, is2@, kclr=^^, kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET
+       kf0=^AI\r, kf10@, kich1=\EQ, kil1=\EE, mc4=\Ea, mc5=\E`
+       ri=\EJ, rmacs=\E%%, rmir=\Er\EO, smacs=\E$, smir=\EO\Eq
+       smso=\EG<, tsl=\Ef, use=f100, 
 f110-14|Liberty Freedom 110 14inch, 
        dch1@, use=f110, 
 f110-w|Liberty Freedom 110 - 132 cols, 
@@ -11495,8 +12786,8 @@ f200|freedom200|Liberty Freedom 200,
        clear=^Z, cnorm=\E.1, cr=^M, 
        csr=\Em0%p1%{32}%+%c%p2%{32}%+%c, cub1=^H, cud1=^V, 
        cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, 
-       cvvis=\E.1, dch1=\EW, dim=\EG@, dl1=\ER, dsl=\Ef\r, ed=\EY
-       el=\ET, flash=\Eo$<200/>\En, fsl=^M, home=^^, 
+       dch1=\EW, dim=\EG@, dl1=\ER, dsl=\Ef\r, ed=\EY, el=\ET
+       flash=\Eo$<200/>\En, fsl=^M, home=^^, 
        hpa=\E]%p1%{32}%+%c, hts=\E1, il1=\EE, ind=^J, kbs=^H, 
        kclr=^^, kcub1=^H, kcud1=^V, kcuf1=^L, kcuu1=^K, kdch1=\EW, 
        kdl1=\ER, ked=\EY, kel=\ET, kf0=^AI\r, kf1=^A@\r, kf2=^AA\r, 
@@ -12190,6 +13481,10 @@ jaixterm|IBM Kanji Aixterm Terminal Eemulator,
 jaixterm-m|IBM Kanji AIXterm Monochrome Terminal Emulator, 
        acsc@, use=aixterm-m, 
 
+# This flavor is adapted from xterm, in turn from aixterm documentation -TD
+aixterm-16color|IBM Aixterm Terminal Emulator with 16 colors, 
+       use=ibm+16color, use=aixterm, 
+
 #### Infoton/General Terminal Corp.
 #
 
@@ -12205,7 +13500,7 @@ i400|infoton 400,
        OTbs, am, 
        cols#80, lines#25, 
        bel=^G, clear=\E[2J, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C, 
-       cup=%i\E[%p1%3d;%p2%3dH, cuu1=\E[A, 
+       cup=\E[%i%p1%3d;%p2%3dH, cuu1=\E[A, 
        dch1=\E[4h\E[2Q\E[P\E[4l\E[0Q, dl1=\E[M, el=\E[N, 
        il1=\E[L, ind=^J, rmir=\E[4l\E[0Q, smir=\E[4h\E[2Q, 
 # (addrinfo: removed obsolete ":bc=^Z:" -- esr)
@@ -12213,8 +13508,7 @@ addrinfo,
        am, 
        cols#80, lines#24, 
        bel=^G, clear=^L, cr=^M, cub1=^Z, cud1=^J, cuf1=^Y, 
-       cup=\037%p1%{1}%-%c%p2%{1}%-%c, cuu1=^\, ed=^K, home=^H, 
-       ind=^J, ll=^H^\, 
+       cup=\037%p1%c%p2%c, cuu1=^\, ed=^K, home=^H, ind=^J, ll=^H^\, 
 # (infoton: used to have the no-ops <lh#0>, <lw#0>, <nlab#0> -- esr)
 infoton, 
        am, 
@@ -12833,9 +14127,9 @@ prism9|p9|P9|MDC Prism-9 in ANSII mode,
        ri=\E[L, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, 
        rs2=\E[&p\E[<12l\E F\E[3g\E[9;17;25;33;41;49;57;65;73 N, 
        sc=\E[%y, 
-       sgr=\E[%{0}%?%p1%p3%|%t%{4}%+%;%?%p2%t%{2}%+%;%?%p4%t%{1}%+%;%?%p6%t%{8}%+%;%?%p8%t%{32}%+%;%d%%{%?%p9%t\016%e\017%;, 
-       sgr0=\E[0m, smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[2g
-       tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd, 
+       sgr=\E[%{0}%?%p1%p3%|%t%{7}%+%;%?%p2%t%{2}%+%;%?%p4%t%{5}%+%;%?%p6%t%{1}%+%;m%?%p8%t\E[%{32}%+%d%%{%;%?%p9%t\016%e\017%;, 
+       sgr0=\E[0m\017, smir=\E[4h, smso=\E[7m, smul=\E[4m
+       tbc=\E[2g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd, 
 
 # p9-w: Prism-9 in 132 column mode
 # --------------------------------
@@ -13147,9 +14441,9 @@ ncr260vppp|NCR 2900_260 viewpoint,
        cbt=\EI, civis=\E`0, clear=\014$<40>, cnorm=\E`5, 
        cr=\r$<2>, cub1=\010$<2>, cud1=\n$<2>, cuf1=\006$<2>, 
        cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<5>, cuu1=\032$<2>, 
-       cvvis=\E`5, dch1=\EW$<2>, dim=\EGp, dl1=\El$<2>, dsl=\E`c
-       ed=\Ek$<2>, el=\EK$<2>, fsl=^M, home=\036$<2>, ht=^I
-       hts=\E1, il1=\EM$<2>, ind=\n$<2>, invis=\EG1, 
+       dch1=\EW$<2>, dim=\EGp, dl1=\El$<2>, dsl=\E`c, ed=\Ek$<2>
+       el=\EK$<2>, fsl=^M, home=\036$<2>, ht=^I, hts=\E1
+       il1=\EM$<2>, ind=\n$<2>, invis=\EG1, 
        is2=\Ee6\E~%$<100>\E+\E`\:\Ed/\E`1\EO\Ee4\Ec@0@\Ec@1A\EcB0\EcC1\Ee7$<100>, 
        kDC=\El, kEND=\Ek, kHOM=^A, kPRT=\E7, kRIT=^F, ka1=^A, ka3=\EJ, 
        kbs=^H, kc1=\ET, kc3=\EJ, kcub1=^U, kcud1=^J, kcuf1=^F, 
@@ -13192,19 +14486,17 @@ ncr260vt100an|NCR 2900_260 vt100 with ansi kybd,
        il1=\E[L$<5>, ind=\ED$<5>, indn=\E[%p1%dE$<5>, 
        invis=\E[8m, 
        is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, 
-       ka1=\EOw, ka3=\EOu, kb2=\EOy, kbs=^H, kc1=\EOq, kc3=\EOs, 
-       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
-       kdch1=\E[3~, kent=\EOM, kf1=\EOP, kf2=\EOQ, kf3=\EOR, 
-       kf4=\EOS, kfnd=\E[1~, khlp=\E[28~, kich1=\E[2~, knp=\E[6~, 
-       kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, nel=\EE$<5>, rc=\E8, 
-       rev=\E[7m, ri=\EM$<5>, rmacs=^O, rmir=\E[4l, 
+       kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       kdch1=\E[3~, kfnd=\E[1~, khlp=\E[28~, kich1=\E[2~, 
+       knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, nel=\EE$<5>, 
+       rc=\E8, rev=\E[7m, ri=\EM$<5>, rmacs=^O, rmir=\E[4l, 
        rmkx=\E[?1l\E>, rmso=\E[0m, rmul=\E[0m, 
        rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, 
        sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<20>, 
        sgr0=\E[0m\017$<20>, smacs=^N, smir=\E[4h, 
        smkx=\E[?1h\E=, smso=\E[1;7m, smul=\E[4m, tbc=\E[3g, 
-       tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, 
+       tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, use=vt220+keypad, 
 ncr260vt100wan|NCR 2900_260 vt100 wide mode ansi kybd, 
        cols#132, 
        cup=\E[%i%p1%d;%p2%dH$<30>, 
@@ -13242,15 +14534,14 @@ ncr260vt200an|NCR 2900_260 vt200 with ansi kybd,
        ich=\E[%p1%d@$<5>, il=\E[%p1%dL$<5>, il1=\E[L$<5>, 
        ind=\ED$<5>, indn=\E[%p1%dE$<5>, invis=\E[8m, 
        is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, 
-       ka1=\EOw, ka3=\EOu, kb2=\EOy, kbs=^H, kc1=\EOq, kc3=\EOs, 
-       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
-       kdch1=\E[3~, kent=\EOM, kf0=\EOy, kf1=\EOP, 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=\EOQ, kf20=\E[34~, kf21=\E[31~, 
-       kf22=\E[32~, kf23=\E[33~, kf24=\E[34~, kf25=\E[35~, 
-       kf26=\E[1~, kf27=\E[2~, kf28=\E[3~, kf29=\E[4~, kf3=\EOR, 
-       kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, 
+       kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       kdch1=\E[3~, kf0=\EOy, 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=\EOQ, kf20=\E[34~, kf21=\E[31~, kf22=\E[32~, 
+       kf23=\E[33~, kf24=\E[34~, kf25=\E[35~, kf26=\E[1~, 
+       kf27=\E[2~, kf28=\E[3~, kf29=\E[4~, kf3=\EOR, kf30=\E[5~, 
+       kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, 
        kf35=\E[10~, kf4=\EOS, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, 
        kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, 
        kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, 
@@ -13263,6 +14554,7 @@ ncr260vt200an|NCR 2900_260 vt200 with ansi kybd,
        sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h, 
        smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, 
        tbc=\E[3g, tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, 
+       use=vt220+keypad, 
 ncr260vt200wan|NCR 2900_260 vt200 wide mode ansi kybd, 
        cols#132, 
        cup=\E[%i%p1%d;%p2%dH$<30>, 
@@ -13298,27 +14590,27 @@ ncr260vt300an|NCR 2900_260 vt300 with ansi kybd,
        ich=\E[%p1%d@$<5>, il=\E[%p1%dL$<5>, il1=\E[L$<5>, 
        ind=\ED$<5>, indn=\E[%p1%dE$<5>, invis=\E[8m, 
        is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E[1;0%w\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, 
-       ka1=\EOw, ka3=\EOu, kb2=\EOy, kbs=^H, kc1=\EOq, kc3=\EOs, 
-       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
-       kdch1=\E[3~, kent=\EOM, kf0=\EOy, kf1=\EOP, 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=\EOQ, kf20=\E[34~, kf21=\E[31~, 
-       kf22=\E[32~, kf23=\E[33~, kf24=\E[34~, kf25=\E[35~, 
-       kf26=\E[1~, kf27=\E[2~, kf28=\E[3~, kf29=\E[4~, kf3=\EOR, 
-       kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, 
-       kf35=\E[10~, kf4=\EOS, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, 
-       kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, 
-       kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, 
-       mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, 
-       ri=\EM$<5>, rmacs=\017$<20>, rmam=\E[?7l, rmir=\E[4l, 
-       rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, 
+       kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       kdch1=\E[3~, kf0=\EOy, 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~, 
+       kf20=\E[34~, kf21=\E[31~, kf22=\E[32~, kf23=\E[33~, 
+       kf24=\E[34~, kf25=\E[35~, kf26=\E[1~, kf27=\E[2~, 
+       kf28=\E[3~, kf29=\E[4~, kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, 
+       kf33=\E[8~, kf34=\E[9~, kf35=\E[10~, kf5=\E[M, kf6=\E[17~, 
+       kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, 
+       khlp=\E[28~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, 
+       krdo=\E[29~, kslt=\E[4~, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, 
+       nel=\EE, rc=\E8, rev=\E[7m, ri=\EM$<5>, rmacs=\017$<20>, 
+       rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, 
+       rmul=\E[24m, 
        rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E[1;0%w\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, 
        sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<20>, 
        sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h, 
        smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, 
        tbc=\E[3g, tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, 
+       use=vt220+keypad, 
 ncr260vt300wan|NCR 2900_260 vt300 wide mode ansi kybd, 
        cols#132, 
        cup=\E[%i%p1%d;%p2%dH$<30>, 
@@ -13406,7 +14698,7 @@ ncr260wy325wpp|NCR 2900_260 wyse 325 wide mode,
 #
 ncr260wy350pp|NCR 2900_260 wyse 350, 
        am, bw, hs, km, mc5i, mir, msgr, xon, 
-       colors#16, cols#80, lines#24, ncv#33, nlab#32, xmc#1, 
+       colors#16, cols#80, lines#24, ncv#33, nlab#32, pairs#16, xmc#1, 
        acsc=07a?h;j5k3l2m1n8q\:t4u9v=w0x6, bel=^G, blink=\EG2, 
        cbt=\EI, civis=\E`0, clear=\E+$<20>, cnorm=\E`1, cr=^M, 
        cub1=\010$<5>, cud1=\n$<5>, cuf1=\014$<5>, 
@@ -14005,17 +15297,15 @@ tek4105-30|4015 emulating 30 line vt100,
        cuf=\E[%p1%dC, cuf1=\E[C$<2>, 
        cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, 
        cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, 
-       enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, ka1=\EOq, 
-       ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, 
-       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, 
-       kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, 
-       kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, 
+       enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, kbs=^H, 
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, 
        rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, 
        rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, 
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, 
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, 
        sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, 
        smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, 
+       use=vt100+fnkeys, 
 
 # Tektronix 4105 from BRL
 # The following setup modes are assumed for normal operation:
@@ -14831,15 +16121,14 @@ nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 
        dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, 
        home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J, 
-       ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=\177, kc1=\EOp, kc3=\EOn, 
-       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, 
-       kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, rev=\E[7m, 
-       ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, 
+       kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 
+       kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l, 
+       rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, 
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, 
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m, 
        sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, 
        smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, 
-       u8=\E[?1;2c, u9=\E[c, 
+       u8=\E[?1;2c, u9=\E[c, use=vt100+pfkeys, 
 
 nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset, 
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
@@ -15026,14 +16315,14 @@ xnuppc+basic|Darwin PowerPC Console basic capabilities,
        cub=\E[%p1%dD, cub1=\E[D, 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, dsl=\E]2;\007, ed=\E[J, el=\E[K, 
-       el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ind=^J, ka1=\EOq
-       ka3=\EOs, kb2=\EOr, kbs=\177, kc1=\EOp, kc3=\EOn, kcub1=\EOD
-       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, rev=\E[7m, 
-       ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m
-       rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, 
+       el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ind=^J, kbs=\177
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8
+       rev=\E[7m, ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, 
+       rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h
+       sc=\E7, 
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, 
        sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, 
-       smul=\E[4m, tbc=\E[3g, 
+       smul=\E[4m, tbc=\E[3g, use=vt100+keypad, 
 
 xnuppc+c|Darwin PowerPC Console ANSI color support, 
        colors#8, ncv#32, pairs#64, 
@@ -15337,9 +16626,16 @@ amiga-h|Hans Verkuil's Amiga ANSI,
        smso=\2337m, smul=\2334m, 
 
 # From: Henning 'Faroul' Peters <Faroul@beyond.kn-bremen.de>, 25 Sep 1999
+#
+# Pavel Fedin added
+#      Home    Shift+Left
+#      End     Shift+Right
+#      PgUp    Shift+Up
+#      PgDn    Shift+Down
 amiga-8bit|Amiga ANSI using 8-bit controls, 
        acsc=, dl=\233%p1%dM, dl1=\233M, il=\233%p1%dL, il1=\233L, 
-       ind=\204, indn@, ri=\215, rin@, use=amiga-h, 
+       ind=\204, indn@, kend=\233 @, khome=\233 A, knp=\233S, 
+       kpp=\233T, ri=\215, rin@, use=amiga-h, 
 
 # From: Ruediger Kuhlmann <terminfo@ruediger-kuhlmann.de>, 18 Jul 2000
 # requires use of appropriate preferences settings.
@@ -15369,6 +16665,14 @@ amiga-vnc|Amiga using VNC console (black on light gray),
        sgr0=\E[0m\017\E[30;85;>15m, smcup=\E[?7h, smkx=\E[?1h, 
        smso=\E[1m, smul=\E[4m, 
 
+# MorphOS on Genesi Pegasos
+# By Pavel Fedin <sonic_amiga@rambler.ru>
+morphos, 
+       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~, 
+       ri=\215, rin@, use=amiga-h, 
+
 # Commodore B-128 microcomputer from Doug Tyrol <det@HEL-ACE.ARPA>
 #      I'm trying to write a termcap for a commodore b-128, and I'm
 # having a little trouble. I've had to map most of my control characters
@@ -15986,9 +17290,9 @@ bq300|Bull vt320 ISO Latin 1 80 columns terminal,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, 
        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[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, 
-       dl1=\E[M, dsl=\E[1$}\E[2$~\n\E[0$}, ech=\E[%p1%dX
-       ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, 
+       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, 
+       dsl=\E[1$}\E[2$~\n\E[0$}, ech=\E[%p1%dX, ed=\E[J
+       el=\E[K, el1=\E[1K, enacs=\E(B\E)0, 
        flash=\E[?5h$<50>\E[?5l, fsl=\E[0$}, home=\E[H, ht=^I, 
        hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, 
        is1=\E[63;1"p\E[2h, 
@@ -16003,11 +17307,11 @@ bq300|Bull vt320 ISO Latin 1 80 columns terminal,
        khlp=\E[28~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, 
        krdo=\E[29~, kslt=\E[4~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, 
        mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, 
-       ri=\EM, rmacs=^O, rmam=\E[?7l, rmcup=\E[?7h, rmir=\E[4l, 
+       ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?7h, rmir=\E[4l, 
        rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E[!p, 
        rs2=\E[?3l, s0ds=\E(B, s1ds=\E(0, sc=\E7, 
        sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;, 
-       sgr0=\E[0m\E(B, smacs=^N, smam=\E[?7h, 
+       sgr0=\E[0m\E(B, smacs=\E(0, smam=\E[?7h, 
        smcup=\E[?7l\E[?1l\E(B, smir=\E[4h, smso=\E[7m, 
        smul=\E[4m, tbc=\E[3g, tsl=\E[1$}\E[2$~, 
 bq300-rv|Bull vt320 reverse 80 columns, 
@@ -16086,12 +17390,12 @@ bq300-8|Bull vt320 full 8 bits 80 columns,
        clear=\233H\233J, cnorm=\233?25h, cr=^M, 
        csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cud=\233%p1%dB, 
        cuf=\233%p1%dC, cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, 
-       cvvis=\233?25h, dch=\233%p1%dP, dch1=\233P
-       dl=\233%p1%dM, dsl=\2331$}\2332$~\n\2330$}
-       ech=\233%p1%dX, ed=\233J, el=\233K, el1=\2331K
-       enacs=\E(B\E)0, flash=\233?5h$<50>\233?5l, fsl=\2330$}
-       home=\233H, ht=^I, hts=\EH, ich=\233%p1%d@, il=\233%p1%dL
-       ind=\ED, is1=\E[63;2"p\E[2h, 
+       dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM
+       dsl=\2331$}\2332$~\n\2330$}, ech=\233%p1%dX, ed=\233J
+       el=\233K, el1=\2331K, enacs=\E(B\E)0
+       flash=\233?5h$<50>\233?5l, fsl=\2330$}, home=\233H
+       ht=^I, hts=\EH, ich=\233%p1%d@, il=\233%p1%dL, ind=\ED
+       is1=\E[63;2"p\E[2h, 
        is2=\E[?2h\E[?3l\E[?5l\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, 
        is3=\2330$}\233?25h\2332l\233H\233J, ka1=\217w, 
        ka3=\217y, kb2=\217u, kbs=^H, kc1=\217q, kc3=\217s, 
@@ -17334,16 +18638,16 @@ ti916|ti916-220-7|Texas Instruments 916 VDT 8859/1 vt220 mode 7 bit CTRL,
        cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[2J$<6>, 
        cnorm=\E[?25h, cub=\E[%p1%dD, cud=\E[%p1%dB, 
        cuf=\E[%p1%dC, cup=\E[%p1%i%p1%d;%p2%dH, cuu=\E[%p1%dA, 
-       cvvis=\E[?25h, dch=\E[%p1%dP$<250>, dch1=\E[P
-       dl=\E[%p1%dM, ech=\E[%p1%dX$<20>, ed=\E[J$<6>, el=\E[0K, 
-       el1=\E[1K, enacs=\E(B\E)0, ff=^L, flash=\E[?5h\E[?5l$<6>, 
+       dch=\E[%p1%dP$<250>, dch1=\E[P, dl=\E[%p1%dM
+       ech=\E[%p1%dX$<20>, ed=\E[J$<6>, el=\E[0K, el1=\E[1K, 
+       enacs=\E(B\E)0, ff=^L, flash=\E[?5h\E[?5l$<6>, 
        hpa=\E[%p1%{1}%+%dG, hts=\E[0W, ich=\E[%p1%d@$<250>, 
        il=\E[%p1%dL$<36>, ip=$<10>, is2=\E[1;24r\E[24;1H, 
        kcmd=\E[29~, kdch1=\E[P, kent=^J, kf1=\E[17~, kf10=\E[28~, 
        kf11=\E[29~, kf12=\E[31~, kf2=\E[18~, kf3=\E[19~, 
        kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, 
        kf9=\E[26~, khome=\E[H, kich1=\E[@, knp=\E[S, kpp=\E[T, 
-       kprt=^X, prot=\E&, rmacs=\017$<2>, rs2=\E[!p, 
+       kprt=^X, prot=\E&, rmacs=\017$<2>, rs2=\E[!p, sgr@, 
        smacs=\016$<2>, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, 
        use=vt220, 
 #
@@ -17642,7 +18946,7 @@ masscomp2|masscomp large screen version 2,
 # respectively, to be able to restore them when color changes
 # (because any color change turns off ALL attributes)
 # 3. <bold> and <rev> sequences alternate modes,
-# rather then simply  entering them.  Thus we have to check the
+# rather than simply  entering them.  Thus we have to check the
 # static register B and H to determine the status, before sending the 
 # escape sequence.
 # 4. <sgr0> now must set the status of all 3 register (A,B,H) to zero
@@ -17744,15 +19048,12 @@ xtalk|IBM PC with xtalk communication program (versions up to 3.4),
        cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, 
        cuu1=\E[A$<2>, dl1=\E[M$<99>, ed=\E[J$<50>, el=\E[K$<3>, 
        el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, 
-       il1=\E[L$<99>, ind=^J, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=^H, 
-       kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, 
-       kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\EOx, 
-       kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, 
-       kf8=\EOl, kf9=\EOw, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, 
+       il1=\E[L$<99>, ind=^J, kbs=^H, kcub1=\EOD, kcud1=\EOB, 
+       kcuf1=\EOC, kcuu1=\EOA, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, 
        rmkx=\E[?1l\E>, rmso=\E[m\s, 
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m, 
        smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m\s, 
-       tbc=\E[3g, 
+       tbc=\E[3g, use=vt100+fnkeys, 
 
 # The official PC terminal emulator program of the AT&T Product Centers.
 # Note - insert mode commented out - doesn't seem to work on AT&T PC.
@@ -18325,12 +19626,12 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # (T) ECMA-48 calls this "Partial Line Forward" but retains the PLD
 # abbreviation.
 #
-# (U) ECMA-48 calls this "Partial Line Backward" but retains the PLD
+# (U) ECMA-48 calls this "Partial Line Backward" but retains the PLU
 # abbreviation.
 #
 # (V) ECMA-48 calls this "Reverse Line Feed" but retains the RI abbreviation.
 #
-# (W) RM/SM modes are as follows: 1 = Guarder Area Transfer Mode (GATM), 
+# (W) RM/SM modes are as follows: 1 = Guarded Area Transfer Mode (GATM), 
 # 2 = Keyboard Action Mode (KAM), 3 = Control Representation Mode (CRM), 
 # 4 = Insertion Replacement Mode, 5 = Status Report Transfer Mode (SRTM),
 # 6 = Erasure Mode (ERM), 7 = Line Editing Mode (LEM), 8 = Bi-Directional
@@ -19536,9 +20837,178 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      * scaled the linux-c terminfo entry to match linux-c-nc, i.e., the
 #        r/g/b parameters of initc are in the range 0 to 1000 -TD
 #
-# 2002-1005
+# 2002-10-05
 #      * minor fix for scale-factor of linux-c and linux-c-nc -TD
 #
+# 2002-11-09
+#      * split-out vt100+keypad and vt220+keypad, fix interchanged ka3/kb2
+#        in the latter -TD
+#
+# 2002-11-16
+#      * add entries for mterm (mterm, mterm-ansi, decansi) -TD
+#      * ncr260wy350pp has only 16 color pairs -TD
+#      * add sun-type4 from NetBSD -TD
+#      * update xterm-xfree86 to current (patch 170) -TD
+#      * add screen-bce, screen-s entries -TD
+#      * add xterm-1002, xterm-1003 entries -TD
+#
+# 2003-01-11
+#      * update homepage for Top Gun Telnet/SSH
+#
+# 2003-01-25
+#      * reduce duplication in emx entries, added emx-base -TD
+#
+# 2003-05-24
+#      * corrected acs for screen.teraterm -TD
+#      * add tkterm entry -TD
+#
+# 2003-07-15
+#      * cygwin changes from Charles Wilson:
+#        misc/terminfo.src (nxterm|xterm-color): make xterm-color
+#        primary instead of nxterm, to match XFree86's xterm.terminfo
+#        usage and to prevent circular links.
+#        (rxvt): add additional codes from rxvt.org.
+#        (rxvt-color): new alias
+#        (rxvt-xpm): new alias
+#        (rxvt-cygwin): like rxvt, but with special acsc codes.
+#        (rxvt-cygwin-native): ditto.  rxvt may be run under XWindows, or
+#        with a "native" MSWin GUI.  Each takes different acsc codes,
+#        which are both different from the "normal" rxvt's acsc.
+#        (cygwin): cygwin-in-cmd.exe window.  Lots of fixes.
+#        (cygwinDBG): ditto.
+#
+# 2003-09-27
+#      * update gnome terminal entries -TD
+#
+# 2003-10-04
+#      * add entries for djgpp 2.03 and 2.04 -TD
+#
+# 2003-10-25
+#      * add alias for vtnt -TD
+#      * update xterm-xfree86 for XFree86 4.4 -TD
+#
+# 2003-11-22
+#      * add linux-vt (Andrey V Lukyanov)
+#
+# 2003-12-20
+#      * add screen.linux -TD
+#
+# 2004-01-10
+#      * revised/improved entries for tvi912b, tvi920b (Benjamin Sittler)
+#
+# 2004-01-17
+#      * add OpenNT/Interix/SFU entries (Federico Bianchi)
+#      * add vt100+ and vt-utf8 entries -TD
+#      * add uwin entry -TD
+#
+# 2004-03-27
+#      * add sgr strings to several common entries lacking them, e.g.,
+#        screen, to make the entries more portable -TD
+#      * remove cvvis from rxvt entry, since it is the same as cnorm -TD
+#      * similar fixups for cvvis/cnorm various entries -TD
+#
+# 2004-05-22
+#      * remove 'ncv' from xterm-256color (patch 188) -TD
+#
+# 2004-06-26
+#      * add mlterm -TD
+#      * add xterm-xf86-v44 -TD 
+#      * modify xterm-new aka xterm-xfree86 to accommodate luit, which relies
+#        on G1 being used via an ISO-2022 escape sequence (report by
+#        Juliusz Chroboczek) -TD
+#      * add 'hurd' entry -TD
+#
+# 2004-07-03
+#      * make xterm-xf86-v43 derived from xterm-xf86-v40 rather than
+#        xterm-basic -TD
+#      * align with xterm #192's use of xterm-new -TD
+#      * update xterm-new and xterm-8bit for cvvis/cnorm strings -TD
+#      * make xterm-new the default "xterm" -TD
+#
+# 2004-07-10
+#      * minor fixes for emu -TD
+#      * add emu-220
+#      * add rmam/smam to linux (Trevor Van Bremen)
+#      * change wyse acsc strings to use 'i' map rather than 'I' -TD
+#      * fixes for avatar0 -TD
+#      * fixes for vp3a+ -TD
+#
+# 2004-07-17
+#      * add xterm-pc-fkeys -TD
+#      * review/update gnome and gnome-rh90 entries (prompted by
+#        Redhat Bugzilla #122815) -TD
+#      * review/update konsole entries -TD
+#      * add sgr, correct sgr0 for kterm and mlterm -TD
+#      * correct tsl string in kterm -TD
+#
+# 2004-07-24
+#      * make ncsa-m rmacs/smacs consistent with sgr -TD
+#      * add sgr, rc/sc and ech to syscons entries -TD
+#      * add function-keys to decansi -TD
+#      * add sgr to mterm-ansi -TD
+#      * add sgr, civis, cnorm to emu -TD
+#      * correct/simplify cup in addrinfo -TD 
+#      * corrections for gnome and konsole entries
+#        (Redhat Bugzilla #122815) -Hans de Goede
+#      * modify DEC entries (vt220, etc), to add sgr string, and to use
+#        ISO-2022 strings for rmacs/smacs -TD
+#
+# 2004-07-31
+#      * rename xterm-pc-fkeys to xterm+pcfkeys -TD
+#
+# 2004-08-07
+#      * improved putty entry -Robert de Bath
+#
+# 2004-08-14
+#      * remove dch/dch1 from rxvt because they are implemented inconsistently
+#        with the common usage of bce/ech -TD
+#      * remove khome from vt220 (vt220's have no home key) -TD
+#      * add rxvt+pcfkeys -TD
+#
+# 2004-08-21
+#      * modify several entries to ensure xterm mouse and cursor visibility
+#        are reset in rs2 string:  hurd, putty, gnome, konsole-base, mlterm,
+#        Eterm, screen.  (The xterm entries are left alone - old ones for
+#        compatibility, and the new ones do not require this change) -TD
+#
+# 2004-08-28
+#      * add morphos entry -Pavel Fedin
+#      * modify amiga-8bit to add khome/kend/knp/kpp -Pavel Fedin
+#      * corrected \E[5?l to \E[?5l in vt320 entries -TD
+#
+# 2004-11-20
+#      * update wsvt25 entry -TD
+#
+# 2005-01-29
+#      * update pairs for xterm-88color and xterm-256color to reflect the
+#        ncurses extended-color support -TD
+#
+# 2005-02-26
+#      * modify sgr/sgr0 in xterm-new to improve tgetent's derived "me" -TD
+#      * add aixterm-16color to demonstrate 16-color capability -TD
+#
+# 2005-04-23
+#      * add media-copy to vt100 -TD
+#      * corrected acsc string for vt52 -TD
+#
+# 2005-04-30
+#      * add kUP, kDN (user-defined shifted up/down arrow) definitions for
+#        xterm-new -TD
+#      * add kUP5, kUP6, etc., for xterm-new and rxvt -TD
+#
+# 2005-05-07
+#      * re-corrected acsc string for vt52 -TD
+#
+# 2005-05-28
+#      * corrected sun-il sgr string which referred to bold and underline -TD
+#      * add sun-color entry -TD
+#
+# 2005-07-23
+#      * modify sgr0 in several entries to reset alternate-charset as in the
+#        sgr string -TD
+#      * modify sgr string of prism9 to better match the individual
+#        attributes -TD
+#
 # The following sets edit modes for GNU EMACS.
 # Local Variables:
 # fill-prefix:"\t"