Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Terminal capabilities

&pagelevel(3)&pagelevel

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, \E represents the ESC character (different from other notations such as ^[ or \e).
  • In the meaning column, #1 resp. #2 represent the 1st resp. 2nd numeric argument represented by %d parameters in the control character sequence.
  • The %i prefix before the %d parameter in the control character sequence means that the given numeric argument will be incremented by 1 before output.
  • The %pn prefix (n=1...9) means that the n-th parameter is pushed to the stack.
terminfo
name
termcap
name
control character sequencemeaning
belbl\a

ring the terminal bell

crcr\rcarriage return
csrcs\E[%i%p1%d;%p2%drchange scrolling region to rows #1 to #2
tbcct\E[3gclear all tab stops
clearcl\E[H\E[2Jclear screen, cursor to upper left
elce\E[Kclear to end of line
edcd\E[Jclear display after cursor
cupcm\E[%i%p1%d;%p2%dHmove cursor to row #1 and column #2
cud1do\vmove cursor down 1 rom
homeho\E[Hmove cursor home (upper left corner)
cub1le\bmove cursor left (back) 1 column
cuf1nd\E[Cmove cursor right (forward) 1 column
cuu1up\E[Amove cursor up 1 row
dch1dc\E[P

delete 1 character at cursor

dl1dl\E[Mdelete 1 line at cursor
smacsas\E(0start using alternate character set
revmr\E[7mturn on reverse attribute
smsoso\E[7mstandout mode start
smulus\E[4munderline mode start
rmacsae\E(Bend using alternate character set
sgr0me\E[mturn off all attributes
rmsose\E[mstandout mode end
rmulue\E[munderline mode end
fslfs\E8return from status line
ich1ic\E[@insert (space for) one character
il1al\E[Linsert 1 line below cursor
nelnw\EEnewline (CR followed by LF)
dchDC\E[%p1%dPdelete #1 characters at cursor
dlDL\E[%p1%dMdelete #1 lines at cursor
cudDO\E[%p1%dBmove cursor down #1 rows
ichIC\E[%p1%d@insert space for #1 characters at cursor
ilAL\E[%p1%dLadd #1 lines above cursor
cubLE\E[%p1%dDmove cursor left #1 columns
cufRI\E[%p1%dCmove cursor right #1 columns
cuuUP\E[%p1%dAmove cursor up #1 rows
rs1r1\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[Hreset terminal string 1
rcrc\E8restore cursor position (saved by sc)
scsc\E7save cursor position
indsf\nscroll forward 1 line
risr\EM

scroll backwards one line

htsst\EHset a tab in every row, current columns
htta\thardware tab stop
tslts\E7\E[27;000Hmove to status line
acscac``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~graphics charset pairs (based on vt100)
kbskb\bstring sent by backspace key
kclrkc\E[40~string sent by clear-screen key
kdch1kD\E[Pstring sent by delete-character key
kdl1kL\E[Mstring sent by delete-line key
kcud1kd\E[Bstring sent by down-arrow key
kelkE\E[24~\E[11~string sent by clear-to-end-of-line key
kedkS\E[39~string sent by clear-to-end-of-screen key
khomekh\E[hstring sent by home key
kich1kI\E[2}}string sent by insert-character key
kil1kA\E[24~\E[2~string sent by insert-line key
kcub1kl\E[Dstring sent by left arrow key
kllkH\E[24~\E[3~string sent by lower-left key
knpkN\E[6~string sent by next-page key
kppkP\E[5~string sent by previous-page key
kcuf1kr\E[Cstring sent by right arrow key
kcuu1ku\E[Astring sent by up arrow key
kcbtkB\EOjstring 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
kf1k1\E[11~string sent by function key F1
kf2k2\E[12~string sent by function key F2
kf3k3\E[13~string sent by function key F3
kf4k4\E[14~string sent by function key F4
kf5k5\E[15~string sent by function key F5
kf6k6\E[17~string sent by function key F6
kf7k7\E[18~string sent by function key F7
kf8k8\E[19~string sent by function key F8
kf9k9\E[20~string sent by function key F9
kf10k;\E[21~string sent by function key F10
kf11F1\E[23~string sent by function key F11
kf12F2\E[24~string sent by function key F12
kf13F3\E[25~string sent by function key F13
kf14F4\E[26~string sent by function key F14
kf15F5\E[28~string sent by function key F15
kf16F6kmenustring sent by function key F16
kf17F7\E[31~string sent by function key F17
kf18F8\E[32~

string sent by function key F18

kf19F9\E[33~string sent by function key F19
kf20FA\E[34~string sent by function key F20
kf21FB\E[69~string sent by function key F21
kf22FC\E[70~string sent by function key F22
kf23FD\E[71~string sent by function key F23
kf24FE\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
meaningvalue
amamterminal does automargin (wraparound)1
xenlxnterminal ignores newline at automargin (wraparound)1
kmkmterminal 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
meaningvalue
colsconumber of columns80 (for example)
ititinitial value of tab stop width8
lineslinumber of lines28 (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:

charactermeaningASCII valueEBCDIC valuealternative
representations
\EESC character\033 = 0x1b\047 = 0x27^[ or \e
^GCTRL-G character\007 = 0x07\057 = 0x2fBEL or \a

However, this will not work if the terminal settings prohibit manipulation of the terminal window's title bar.