home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / apps / text_ed / elv16b2 / doc / termcap.ms < prev    next >
Text File  |  1992-08-18  |  4KB  |  140 lines

  1. .Go 10 "TERMCAP"
  2. .PP
  3. \*E uses fairly standard termcap fields for most things.
  4. I invented the cursor shape names
  5. but other than that there should be few surprises.
  6. .SH
  7. Required numeric fields
  8. .if n .ul 0
  9. .ID
  10. :co#:    number of columns on the screen (chars per line)
  11. :li#:    number of lines on the screen
  12. .DE
  13. .SH
  14. Required string fields
  15. .ID
  16. .if n .ul 0
  17. :ce=:    clear to end-of-line
  18. :cl=:    home the cursor & clear the screen
  19. :cm=:    move the cursor to a given row/column
  20. :up=:    move the cursor up one line
  21. .DE
  22. .SH
  23. Boolean fields
  24. .if n .ul 0
  25. .ID
  26. :am:    auto margins - wrap when char is written in last column?
  27. :xn:    brain-damaged auto margins - newline ignored after wrap
  28. :pt:    physical tabs?
  29. .DE
  30. .SH
  31. Optional string fields
  32. .if n .ul 0
  33. .ID
  34. :al=:    insert a blank row on the screen
  35. :dl=:    delete a row from the screen
  36. :cd=:    clear to end of display
  37. :ei=:    end insert mode
  38. :ic=:    insert a blank character
  39. :im=:    start insert mode
  40. :dc=:    delete a character
  41. :sr=:    scroll reverse (insert row at top of screen)
  42. :vb=:    visible bell
  43. :ti=:    terminal initialization string, to start full-screen mode
  44. :te=:    terminal termination, to end full-screen mode
  45. .DE
  46. .SH
  47. Optional strings received from the keyboard
  48. .if n .ul 0
  49. .ID
  50. :kd=:    sequence sent by the <down arrow> key
  51. :kl=:    sequence sent by the <left arrow> key
  52. :kr=:    sequence sent by the <right arrow> key
  53. :ku=:    sequence sent by the <up arrow> key
  54. :kP=:    sequence sent by the <PgUp> key
  55. :kN=:    sequence sent by the <PgDn> key
  56. :kh=:    sequence sent by the <Home> key
  57. :kH=:    sequence sent by the <End> key
  58. :kI=:    sequence sent by the <Insert> key
  59. .DE
  60. .PP
  61. Originally, termcap didn't have any names for the <PgUp>, <PgDn>, <Home>,
  62. and <End> keys.
  63. Although the capability names shown in the table above are the most common,
  64. they are \fInot\fR universal.
  65. SCO Xenix uses :PU=:PD=:HM=:EN=: for those keys.
  66. Also, if the four arrow keys happen to be part of a 3x3 keypad,
  67. then the five non-arrow keys may be named :K1=: through :K5=:,
  68. so an IBM PC keyboard may be described using those names instead.
  69. \*E can find any of these names.
  70. .SH
  71. Optional strings sent by function keys
  72. .if n .ul 0
  73. .ID
  74. :k1=:...:k9=:k0=:    codes sent by <F1> through <F10> keys
  75. :s1=:...:s9=:s0=:    codes sent by <Shift F1> ... <Shift F10>
  76. :c1=:...:c9=:c0=:    codes sent by <Ctrl F1> ... <Ctrl F10>
  77. :a1=:...:a9=:a0=:    codes sent by <Alt F1> ... <Alt F10>
  78. .DE
  79. .PP
  80. Note that :k0=: is used to describe the <F10> key.
  81. Some termcap documents recommend :ka=: or even :k;=: for describing
  82. the <F10> key, but \*E doesn't support that.
  83. .PP
  84. Also, the :s1=:..., :c1=:..., and :a1=:... codes are very non-standard.
  85. The terminfo library doesn't support them.
  86. .SH
  87. Optional fields that describe character attributes
  88. .if n .ul 0
  89. .ID
  90. :so=:se=:    start/end standout mode (We don't care about :sg#:)
  91. :us=:ue=:    start/end underlined mode
  92. :md=:me=:    start/end boldface mode
  93. :as=:ae=:    start/end alternate character set (italics)
  94. :ug#:        visible gap left by :us=:ue=:md=:me=:as=:ae=:
  95. .DE
  96. .SH
  97. Optional fields that affect the cursor's shape
  98. .PP
  99. The :cQ=: string is used by \*E immediately before exiting to undo
  100. the effects of the other cursor shape strings.
  101. If :cQ=: is not given, then all other cursor shape strings are ignored.
  102. .ID
  103. :cQ=:    normal cursor
  104. :cX=:    cursor used for reading EX command
  105. :cV=:    cursor used for reading VI commands
  106. :cI=:    cursor used during VI input mode
  107. :cR=:    cursor used during VI replace mode
  108. .DE
  109. .PP
  110. If the capabilities above aren't given, then \*E will try to use the
  111. following values instead.
  112. .ID
  113. :ve=:    normal cursor, used as :cQ=:cX=:cI=:cR=:
  114. :vs=:    gaudy cursor, used as :cV=:
  115. .DE
  116. .SH
  117. An example
  118. .PP
  119. Here's the termcap entry I use on my Minix-ST system.
  120. Some of the fields in it have nothing to do with \*E.
  121. Some can only work on my system;
  122. I have modified my kernel's screen driver.
  123. .sp
  124. .LD
  125. .ne 14
  126. mx|minix|minixst|ansi:\\
  127.     :is=\\E[0~:co#80:li#25:bs:pt:\\
  128.     :cm=\\E[%i%d;%dH:up=\\E[A:do=^J:nd=\\E[C:sr=\\EM:\\
  129.     :cd=\\E[J:ce=\\E[K:cl=\\E[H\\E[J:\\
  130.     :al=\\E[L:dl=\\E[M:ic=\\E[@:dc=\\E[P:im=:ei=:\\
  131.     :so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:\\
  132.     :md=\\E[1m:me=\\E[m:as=\\E[1;3m:ae=\\E[m:\\
  133.     :ku=\\E[A:kd=\\E[B:kr=\\E[C:kl=\\E[D:\\
  134.     :k1=\\E[1~:k2=\\E[2~:k3=\\E[3~:k4=\\E[4~:k5=\\E[5~:\\
  135.     :k6=\\E[6~:k7=\\E[17~:k8=\\E[18~:k9=\\E[19~:k0=\\E[20~:\\
  136.     :kU=\\E[36~:kQ=\\E[32~:kH=\\E[28~:\\
  137.     :GV=3:GH=D:G1=?:G2=Z:G3=@:G4=Y:GC=E:GL=4:GR=C:GU=A:GD=B:\\
  138.     :cQ=\\E[k:cX=\\E[2;0k:cV=\\E[16;0k:cI=\\E[k:cR=\\E[16;20k:
  139. .DE
  140.