# This entry is good for the 1.1.47 version of the Linux console driver.
#
# Note: there are numerous broken linux entries out there, which didn't screw
# up BSD termcap but hose ncurses's smarter cursor-movement optimization.
# One common pathology is an incorrect tab length of 4.
#
# ***************************************************************************
# *                                                                         *
# *                           WARNING:                                      *
# * Some Linuxes come with a default keyboard mapping that makes kbs=^? and *
# * all have kcbt=^I.  Apply `loadkeys -d' to change this if necessary, and *
# * bug your Linux distributor to get it right in the next release.  Here   *
# * are the keymap replacement lines that will fix the problem:             *
# *                                                                         *
#	keycode  14 = BackSpace       BackSpace
#		alt     keycode  14 = Meta_BackSpace
#	keycode  15 = Tab             Tab
#		alt     keycode  15 = Meta_Tab
#		shift	keycode  15 = F26
#	string F26 ="\033[Z"
# *                                                                         *
# * This has to use F26 which is unfortunate.  The change ought to be built *
# * into the kernel tables.                                                 *
# *                                                                         *
# ***************************************************************************
#
# From: Eric S. Raymond <esr@snark.thyrsus.com> 9 Nov 1995
#
# added linux-lat as an alias -- theline drawing characters aren't right, but
# I think everything which uses line-drawing chars uses terminfo anyway -- ewt
linux|linux-lat|linux console:\
	:am:eo:mi:ms:ut:xn:xo:\
	:co#80:it#8:li#25:\
	:&7=^Z:@7=\E[4~:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\
	:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\
	:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
	:IC=\E[%d@:K2=\E[G:al=\E[L:bl=^G:cd=\E[J:ce=\E[K:\
	:ch=\E[%i%dG:cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=^M:\
	:cs=\E[%i%d;%dr:ct=\E[3g:cv=\E[%i%dd:dc=\E[P:dl=\E[M:\
	:do=^J:ei=\E[4l:ho=\E[H:ic=\E[@:im=\E[4h:k1=\E[[A:\
	:k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[17~:\
	:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kB=\E[Z:\
	:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\E[B:\
	:kh=\E[1~:kl=\E[D:kr=\E[C:ku=\E[A:le=^H:mr=\E[7m:\
	:nd=\E[C:nw=^M^J:r1=\Ec:rc=\E8:sc=\E7:sf=^J:sr=\EM:\
	:st=\EH:ta=^I:u6=\E[%i%d;%dR:u7=\E[6n:u8=\E[?6c:\
	:u9=\E[c:up=\E[A:vb=200\E[?5h\E[?5l:ve=\E[?25h:\
	:vi=\E[?25l:tc=klone+sgr:tc=klone+color:tc=klone+acs:

# Highlight controls corresponding to the ANSI.SYS standard.  Most 
# console drivers for Intel boxes obey these.  Makes the same assumption
# about \E[11m as klone+acs.  True ANSI would have rmso=\E[27m, rmul=\E[24m,
# but this isn't a documented feature of ANSI.SYS.
klone+sgr|attribute control for ansi.sys displays:\
	:S2=\E[11m:S3=\E[10m:ae=\E[11m:as=\E11m:mb=\E[5m:\
	:md=\E[1m:me=\E[0;10m:mk=\E[8m:mr=\E[7m:\
	:..sa=\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:\
	:se=\E[m:so=\E[7m:ue=\E[m:us=\E[4m:

# ANSI.SYS color control.  The setb/setf caps depend on the coincidence
# between SVr4/XPG4's color numbers and ANSI.SYS attributes.  Here are longer
# but equivalent strings that don't rely on that coincidence:
# 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,
# The DOS 5 manual asserts that these sequences meet the ISO 6429 standard.
klone+color|color control for ansi.sys and ISO6429-compatible displays:\
	:Co#8:NC#3:pa#64:\
	:AB=\E[4%p1%dm:AF=\E[3%p1%dm:Sb=\E[%+(m:Sf=\E[%+^^m:\
	:op=\E[37;40m:

# The IBM PC alternate character set.  Plug this into any Intel console entry.
# We use \E[11m for rmacs rather than \E[12m so the <acsc> string can use the
# ROM graphics for control characters such as the diamond, up- and down-arrow.
# This works with the System V, Linux, and BSDI consoles.  It's a safe bet this
# will work with any Intel console, they all seem to have inherited \E[11m
# from the ANSI.SYS de-facto standard.
klone+acs|alternate character set for ansi.sys displays:\
	:ac=`\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\054\021+^P0\333p\304r\304y\363z\362{\343|\330}\234:\
	:ae=\E[10m:as=\E[11m:

