Following tables show all capabilities of the terminal type "xterm" defined in /usr/share/lib/terminfo/x/xterm resp. /etc/termcap.
Terminal capabilities of type str (control character sequences)
Remarks:
- In the termcap file,
\Erepresents the ESC character (different from other notations such as^[or\e). - In the meaning column,
#1resp. #2 represent the 1st resp. 2nd numeric argument represented by%dparameters in the control character sequence. - The
%iprefix before the%dparameter in the control character sequence means that the given numeric argument will be incremented by 1 before output. - The
%pnprefix (n=1...9) means that then-th parameter is pushed to the stack.
| terminfo name | termcap name | control character sequence | meaning |
|---|---|---|---|
bel | bl | \a | ring the terminal bell |
cr | cr | \r | carriage return |
csr | cs | \E[%i%p1%d;%p2%dr | change scrolling region to rows #1 to #2 |
tbc | ct | \E[3g | clear all tab stops |
clear | cl | \E[H\E[2J | clear screen, cursor to upper left |
el | ce | \E[K | clear to end of line |
ed | cd | \E[J | clear display after cursor |
cup | cm | \E[%i%p1%d;%p2%dH | move cursor to row #1 and column #2 |
cud1 | do | \v | move cursor down 1 rom |
home | ho | \E[H | move cursor home (upper left corner) |
cub1 | le | \b | move cursor left (back) 1 column |
cuf1 | nd | \E[C | move cursor right (forward) 1 column |
cuu1 | up | \E[A | move cursor up 1 row |
dch1 | dc | \E[P | delete 1 character at cursor |
dl1 | dl | \E[M | delete 1 line at cursor |
smacs | as | \E(0 | start using alternate character set |
rev | mr | \E[7m | turn on reverse attribute |
smso | so | \E[7m | standout mode start |
smul | us | \E[4m | underline mode start |
rmacs | ae | \E(B | end using alternate character set |
sgr0 | me | \E[m | turn off all attributes |
rmso | se | \E[m | standout mode end |
rmul | ue | \E[m | underline mode end |
fsl | fs | \E8 | return from status line |
ich1 | ic | \E[@ | insert (space for) one character |
il1 | al | \E[L | insert 1 line below cursor |
nel | nw | \EE | newline (CR followed by LF) |
dch | DC | \E[%p1%dP | delete #1 characters at cursor |
dl | DL | \E[%p1%dM | delete #1 lines at cursor |
cud | DO | \E[%p1%dB | move cursor down #1 rows |
ich | IC | \E[%p1%d@ | insert space for #1 characters at cursor |
il | AL | \E[%p1%dL | add #1 lines above cursor |
cub | LE | \E[%p1%dD | move cursor left #1 columns |
cuf | RI | \E[%p1%dC | move cursor right #1 columns |
cuu | UP | \E[%p1%dA | move cursor up #1 rows |
rs1 | r1 | \E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H | reset terminal string 1 |
rc | rc | \E8 | restore cursor position (saved by sc) |
sc | sc | \E7 | save cursor position |
ind | sf | \n | scroll forward 1 line |
ri | sr | \EM | scroll backwards one line |
hts | st | \EH | set a tab in every row, current columns |
ht | ta | \t | hardware tab stop |
tsl | ts | \E7\E[27;000H | move to status line |
acsc | ac | ``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~ | graphics charset pairs (based on vt100) |
kbs | kb | \b | string sent by backspace key |
kclr | kc | \E[40~ | string sent by clear-screen key |
kdch1 | kD | \E[P | string sent by delete-character key |
kdl1 | kL | \E[M | string sent by delete-line key |
kcud1 | kd | \E[B | string sent by down-arrow key |
kel | kE | \E[24~\E[11~ | string sent by clear-to-end-of-line key |
ked | kS | \E[39~ | string sent by clear-to-end-of-screen key |
khome | kh | \E[h | string sent by home key |
kich1 | kI | \E[2}} | string sent by insert-character key |
kil1 | kA | \E[24~\E[2~ | string sent by insert-line key |
kcub1 | kl | \E[D | string sent by left arrow key |
kll | kH | \E[24~\E[3~ | string sent by lower-left key |
knp | kN | \E[6~ | string sent by next-page key |
kpp | kP | \E[5~ | string sent by previous-page key |
kcuf1 | kr | \E[C | string sent by right arrow key |
kcuu1 | ku | \E[A | string sent by up arrow key |
kcbt | kB | \EOj | string sent by back-tab key |
kcan | @2 | \E[24~\E[4~ | string sent by cancel key |
kcmd | @4 | \E[37~ | string sent by command key |
kcpy | @5 | \E[24~\E[21~ | string sent by copy key |
kend | @7 | \E[4~ | string sent by end key |
khlp | %1 | \E[28~ | string sent by help key |
kmrk | %2 | \E[24~\E[12~ | string sent by mark key |
kmov | %4 | \E[24~\E[23~ | string sent by move key |
knxt | %5 | \E[42~ | string sent by next key |
kprt | %9 | \E[24~\E[15~ | string sent by print key |
krfr | &2 | \E[24~\E[13~ | string sent by refresh key |
krst | &4 | \E[28~ | string sent by restart key |
ksav | &6 | \E[24~\E[17~ | string sent by save key |
kund | &8 | \E[38~ | string sent by undo key |
kf1 | k1 | \E[11~ | string sent by function key F1 |
kf2 | k2 | \E[12~ | string sent by function key F2 |
kf3 | k3 | \E[13~ | string sent by function key F3 |
kf4 | k4 | \E[14~ | string sent by function key F4 |
kf5 | k5 | \E[15~ | string sent by function key F5 |
kf6 | k6 | \E[17~ | string sent by function key F6 |
kf7 | k7 | \E[18~ | string sent by function key F7 |
kf8 | k8 | \E[19~ | string sent by function key F8 |
kf9 | k9 | \E[20~ | string sent by function key F9 |
kf10 | k; | \E[21~ | string sent by function key F10 |
kf11 | F1 | \E[23~ | string sent by function key F11 |
kf12 | F2 | \E[24~ | string sent by function key F12 |
kf13 | F3 | \E[25~ | string sent by function key F13 |
kf14 | F4 | \E[26~ | string sent by function key F14 |
kf15 | F5 | \E[28~ | string sent by function key F15 |
kf16 | F6 | kmenu | string sent by function key F16 |
kf17 | F7 | \E[31~ | string sent by function key F17 |
kf18 | F8 | \E[32~ | string sent by function key F18 |
kf19 | F9 | \E[33~ | string sent by function key F19 |
kf20 | FA | \E[34~ | string sent by function key F20 |
kf21 | FB | \E[69~ | string sent by function key F21 |
kf22 | FC | \E[70~ | string sent by function key F22 |
kf23 | FD | \E[71~ | string sent by function key F23 |
kf24 | FE | \E[72~ | string sent by function key F24 |
Following terminal capabilities (terminfo names) of type str have the value NULL (unsupported):
cbt, hpa, cmdch, civis, mrcup, cnorm, ll, cvvis, dsl, hd, blink, bold, smcup, smdc, dim, smir, invis, prot, ech, rmcup, rmdc, rmir, flash, ff, is1, is2, is3, if, ip, ktbc, kctab, krmir, kf0, kind, kri, khts, rmkx, smkx, lf0, lf1, lf10, lf2, lf3, lf4, lf5, lf6, lf7, lf8, lf9, rmm, smm, pad, indn, rin, pfkey, pfloc, pfx, mc0, mc4, mc5, rep, rs2, rs3, rf, vpa, sgr, wind, uc, hu, iprog, ka1, ka3, kb2, kc1, kc3, mc5p, rmp, pln, smxon, rmxon, smam, rmam, xonc, xoffc, enacs, smln, rmln, kbeg, kclo, kcrt, kent, kext, kfnd, kmsg, kopn, kopt, kprv, krdo, kref, krpl, kres, kspd, kBEG, kCAN, kCMD, kCPY, kCRT, kDC, kDL, kslt, kEND, kEOL, kEXT, kFND, kHLP, kHOM, kIC, kLFT, kMSG, kMOV, kNXT, kOPT, kPRV, kPRT, kRDO, kRPL, kRIT, kRES, kSAV, kSPD, kUND, rfi, kf25, kf26, kf27, kf28, kf29, kf30, kf31, kf32, kf33, kf34, kf35, kf36, kf37, kf38, kf39, kf40, kf41, kf42, kf43, kf44, kf45, kf46, kf47, kf48, kf49, kf50, kf51, kf52, kf53, kf54, kf55, kf56, kf57, kf58, kf59, kf60, kf61, kf62, kf63, el1, mgc, smgl, smgr, fln, sclk, dclk, rmclk, cwin, wingo, hup, dial, qdial, tone, pulse, hook, pause, wait, u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, op, oc, initc, initp, scp, setf, setb, cpi, lpi, chr, cvr, defc, swidm, sdrfq, sitm, slm, smicm, snlq, snrmq, sshm, ssubm, ssupm, sum, rwidm, ritm, rlm, rmicm, rshm, rsubm, rsupm, rum, mhpa, mcud1, mcub1, mcuf1, mvpa, mcuu1, porder, mcud, mcub, mcuf, mcuu, scs, smgb, smgbp, smglp, smgrp, smgt, smgtp, sbim, scsd, rbim, rcsd, subcs, supcs, docr, zerom, csnm, kmous, minfo, reqmp, getm, setaf, setab, pfxl, devt, csin, s0ds, s1ds, s2ds, s3ds, smglr, smgtb, birep, binel, bicr, colornm, defbi, endbi, setcolor, slines, dispc, smpch, rmpch, smsc, rmsc, pctrm, scesc, scesa, sht, sbt, kmenu, kmode, kdw, kiw
Terminal capabilities of type bool
| terminfo name | termcap name | meaning | value |
|---|---|---|---|
am | am | terminal does automargin (wraparound) | 1 |
xenl | xn | terminal ignores newline at automargin (wraparound) | 1 |
km | km | terminal has "meta key" | 1 |
Following terminal capabilities (terminfo names) of type bool have the value 0 (false):
bw, xsb, xhp, eo, gn, hc, hs, in, da, db, mir, msgr, os, eslok, xt, hz, ul, xon, nxon, mc5i, chts, nrrmc, npc, ndscr, ccc, bce, hls, xhpa, crxm, daisy, xvpa, sam, cpix, lpix
Terminal capabilities of type num
| terminfo name | termcap name | meaning | value |
|---|---|---|---|
cols | co | number of columns | 80 (for example) |
it | it | initial value of tab stop width | 8 |
lines | li | number of lines | 28 (for example) |
Following terminal capabilities (terminfo names) of type num have the value -1 (unsupported):
lm, xmc, pb, vt, wsl, nlab, lh, lw, ma, wnum, colors, pairs, ncv, bufsz, spinv, spinh, maddr, mjump, mcs, mls, npins, orc, orl, orhi, orvi, cps, widcs, btns, bitwin, bitype
Trick to change the xterm window title
For terminals of the xterm type (and also for several other terminal types), in addition to the above-mentioned terminal properties, the following control character sequence is available to change the title line of the terminal window, for example, to "TITLE TEXT":
\E]0;TITLE TEXT^G |
The special characters and their meaning are:
| character | meaning | ASCII value | EBCDIC value | alternative representations |
|---|---|---|---|---|
\E | ESC character | \033 = 0x1b | \047 = 0x27 | ^[ or \e |
^G | CTRL-G character | \007 = 0x07 | \057 = 0x2f | BEL or \a |
However, this will not work if the terminal settings prohibit manipulation of the terminal window's title bar.