README.KEYBRD 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. ECU 3.20 presents itself to the world by default as a much
  2. better clone of an SCO multi-screen terminal than ever before.
  3. This includes
  4. video display control and
  5. key codes emitted by pressed function keys
  6. In addition, many MS-DOS video control sequences are supported.
  7. These features are described in tedious detail in the manual. What is
  8. missing from the manual -- and what this README attempts to
  9. describe -- is how ECU keyboard management really looks from the
  10. macro perspective.
  11. Keyboard management is divided into two parts:
  12. * Function key recognition
  13. * Function key action
  14. Function key recognition means detecting function key presses
  15. in the ecu keyboard input stream. This is controlled by the
  16. ~/.ecu/funckeymap file.
  17. Function key action means what ecu does with a function key once
  18. it gets it. This is controlled by the ~/.ecu/keys file.
  19. Function Key Recognition
  20. ------------------------
  21. You have to use funckeymap entries to get ecu to recognize the
  22. function keys. Pre-3.20 users take note: funckeymaps serves the
  23. purpose previously handled by ~/.ecu/nonansikeys. This is a rare
  24. backward compatibility problem (the 2nd in ECU history).
  25. Starting with 3.20, SCO multiscreens require an entry, whereas
  26. earlier versions had multi-screen support built in. The TERM name
  27. for SCO multi-screens is "ansi", hence the name "nonansikeys". I
  28. think you'll agree the new name is more appropriate.
  29. If ~/.ecu/funckeymap does not exist, ECU searches for a file
  30. by the same name in the library directory, usually /usr/local/lib/ecu).
  31. At startup,
  32. ECU selects an entry in ~/.ecu/funckeymap whose label matches
  33. the terminal type of the executing screen (the TERM environment
  34. variable). If ecu is started
  35. non-conversationally (/dev/null for stdin), this is not done.
  36. The environment variable ECUFUNCKEY, if found, overrides the
  37. TERM variable for funckeymap keyboard management only. TERM is always
  38. used for identifying the display.
  39. See the manual sections titled "Supported Terminals" thru "Line Editing".
  40. There are some additional notes in the distribution file
  41. models/funckeymap. Please forgive any conflicts. I can only
  42. type so fast and the code gets priority.
  43. An example entry for an SCO multi-screen console:
  44. #+-------------------------------------------------------------------
  45. # SCO multi-screen ($TERM=ansi)
  46. #--------------------------------------------------------------------
  47. ansi
  48. ansi43
  49. sco
  50. F1:F1: esc [ M
  51. F2:F2: esc [ N
  52. F3:F3: esc [ O
  53. F4:F4: esc [ P
  54. F5:F5: esc [ Q
  55. F6:F6: esc [ R
  56. F7:F7: esc [ S
  57. F8:F8: esc [ T
  58. F9:F9: esc [ U
  59. F10:F10: esc [ V
  60. F11:F11: esc [ W
  61. F12:F12: esc [ X
  62. Home:Home: esc [ H
  63. End:End: esc [ F
  64. PgUp:PgUp: esc [ I
  65. PgDn:PgDn: esc [ G
  66. CUU:CUU: esc [ A
  67. CUL:CUL: esc [ D
  68. CU5:CU5: esc [ E
  69. CUR:CUR: esc [ C
  70. CUD:CUD: esc [ B
  71. Ins:Ins: esc [ L
  72. BkTab:BackTab: esc [ Z
  73. ECU tries to support any "reasonable" video terminal as an ECU
  74. console. Video differences are handled by curses and
  75. termcap/terminfo. The keyboard is normalized with funckeymap.
  76. Hopefully, someone has already constructed a funckeymap entry for
  77. your keyboard. If not, you must construct one.
  78. For this, make several experiments with kbdtest3.
  79. Start a terminal session in the ecu distribution directory
  80. and run kbdtest3 (assuming it has been made).
  81. Kbdtest3 will prompt you to press each function key in return.
  82. The program is generally self-explanatory, but some notes are
  83. worthy of note:
  84. * If it asks you for a key not on your keyboard, pick some
  85. reasonable alternate
  86. * If you simply cannot find an alternate, you will have to type
  87. a slash ('/') to signify no key choice exists.
  88. * If you are on an xterm, you may get spurious or no response
  89. for the "unusual" keys like Home and End. Just type a
  90. slash for the time being and go on. When you are finished,
  91. re-read the manual section titled "Function Key Mapping
  92. (Recognition)". There are also some notes in models/funckeymap.
  93. There are guidelines in there for using xmodmap to achieve
  94. reasonable X mapping for spurious or dead keys.
  95. A notorious example is the xterm shift-Tab that generates
  96. the single character sequence 0x09 just like the tab key does.
  97. XTerm*VT100*Translations: #override\
  98. Shift <Key>Tab: string(0x1b) string("[Z") \n \
  99. in ~/.Xdefaults takes care of this.
  100. Repeat the kbdtest3 and hackery exercises until you have an
  101. acceptable entry. Acceptable means a working key for each of
  102. ecu's 23 function keys where each key produces a
  103. unique key sequence.
  104. Kbdtest3 writes funckeymap entries to ./kbdtest3.out. When you
  105. edit the file, you will see the results of each kbdtest3
  106. run appended one after the other. Presumably you quit using kbdtest3
  107. when you were satisfied, so skip to the bottom of the file and examine the
  108. last entry. If it looks good, cut that section out and put
  109. it in ~/.ecu/funckeys. Also, -*PLEASE*- send it to wht@wht.net
  110. so I can archive it. Include the environment details
  111. such as "Wyse 232XKQ Rom revision 2.3" or "Pluton 9001 console
  112. under RiskOs 1.4".
  113. Now ecu can recognize your function keys and map them to internal
  114. values. Command screens needing up and down arrows, insert and
  115. so forth will work.
  116. Once you have installed a new funckeymap, the ECU interactive
  117. command "kbdtest" may assist in verifying it works.
  118. I would appreciate your mailing me the output file (kbdtest3.out)
  119. from each keyboard you try out. This will assist me in making
  120. funckeymap entries for futures releases. [[ HEH HEH, I wrote this
  121. three years ago -- I've received ONE entry -- wht 4/94]]
  122. [[ HEH HEH, HEH, HUM -- I've STILL received only ONE entry -- wht 7/96]]
  123. Function Key Actions
  124. --------------------
  125. Function key actions are determined by ecu program code when
  126. you are executing ecu interactive commands. When you are
  127. in the interactive mode, keyboard actions are governed by
  128. startup definitions or ~/.keys actions. These are described
  129. in the manual section titled "Function Key Actions", but a
  130. few quick notes here might serve well:
  131. * startup default actions
  132. All of the 23 function keys save 2 are preset to generate
  133. the same sequence they would on an SCO. See the manual
  134. subsection "Standard Function Keys" for a list
  135. The 'Home' and 'Cursor 5' keys have reserved meanings
  136. and may not be overridden.
  137. * ~/.keys and the interactive command fkey
  138. You can override the defaults by loading a custom keyset
  139. you have placed in ~/.fkeys. The interactive command
  140. fkey may be explicitly used to load a keyset.
  141. If you use a logical dialing directory name to connect
  142. to a remote and ~/.keys has an entry whose name (sometimes
  143. called the label) matches the directory entry name, ECU
  144. will load the ~/.keys entry automatically.
  145. See "Standard Function Keys" for details.