home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1998 March / VPR9803A.ISO / OLS / Windows / TTERMP22 / keycode.tx_ / keycode.tx
Text File  |  1997-06-30  |  7KB  |  226 lines

  1.     KEYCODE.EXE for Tera Term
  2.     T. Teranishi
  3.     
  4.     Copyright (C) 1994-1997 T. Teranishi
  5.     All Rights Reserved.
  6.  
  7. KEYCODE.EXE is a utility which displays key codes used in the
  8. Tera Term's keyboard setup file.
  9.  
  10. -------------------------------------------------------------------------------
  11. 1. INSTALLATION
  12.  
  13. If you are using Windows NT 3.X, install KEYCODE.EXE
  14. in Program Manager with its icon. If you are using Windows 95,
  15. create a shortcut for KEYCODE.EXE in a folder of your choice,
  16. or in the Start menu, or on the desktop.
  17.  
  18. -------------------------------------------------------------------------------
  19. 2. USAGE
  20.  
  21. When you run KEYCODE.EXE, the message "Push any key" will be displayed
  22. in the window.  When you press a key or a combination of keys (such as
  23. Ctrl+key), the message "Key code is XXXX." will be displayed. XXXX is a
  24. decimal number.
  25.  
  26. -------------------------------------------------------------------------------
  27. 3. ABOUT THE KEYBOARD SETUP FILE
  28.  
  29. The keyboard setup file assigns keys on PC keyboard for various functions
  30. such as VT terminal functions, sending user defined character strings,
  31. Tera Term commands and executing macro files.
  32.  
  33. The default keyboard setup stored in the file KEYBOARD.CNF is almost
  34. compatible with VT terminal keyboard. You can modify key assignments
  35. by editing the file.
  36.  
  37. The file name of keyboard setup file to be loaded by Tera Term can be
  38. specified as a command line parameter of Tera Term (see Tera Term help).
  39. If you omit the file name extension, the default extension ".CNF" is used.
  40. If you omit the file name, the default file KEYBOARD.CNF is loaded.
  41. ...............................................................................
  42. 3.1 FORMAT OF THE KEYBOARD SETUP FILE
  43.  
  44. Each key or key combination has a unique key code, which is called
  45. "PC key code". 
  46.  
  47. The keyboard setup file has six sections:  [VT editor keypad],
  48. [VT numeric keypad], [VT function keys], [X function keys], [Shortcut keys]
  49. and [User keys].
  50.  
  51. 1) [VT editor keypad] section
  52. In this section, VT editor keys are assigned to PC keys.
  53.  
  54.     Format:
  55.         <VT editor key name>=<PC key code>
  56.  
  57.     where:
  58.  
  59.     <VT editor key name>
  60.         Up, Down, Right, Left, Find, Insert, Remove, Select,
  61.         Prev, Next
  62.  
  63.       <PC key code>
  64.         PC key code (decimal number)
  65.  
  66.     Example:
  67.         Up=328
  68.  
  69. 2) [VT numeric keypad] section
  70. In this section, VT numeric keys are assigned to PC keys.
  71.  
  72.     Format:
  73.         <VT numeric key name>=<PC key code>
  74.  
  75.     where:
  76.  
  77.       <VT numeric key name>
  78.         Num0, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8,
  79.         Num9, NumMinus, NumComma, NumPeriod, NumEnter, PF1,
  80.         PF2, PF3, PF4
  81.  
  82.       <PC key code>
  83.         PC key code (decimal number)
  84.  
  85.     Example:
  86.         Num0=82
  87.  
  88. 3) [VT function keys] section
  89. In this section, VT function keys are assigned to PC keys.
  90.  
  91.     Format:
  92.         <VT function key name>=<PC key code>
  93.  
  94.     where:
  95.  
  96.       <VT function key name>
  97.         (Function keys of VT terminal)
  98.         Hold, Print, Break, F6, F7, F8, F9, F10, F11, F12,
  99.         F13, F14, Help, Do, F17, F18, F19, F20
  100.         ("User defined keys" of VT terminal)
  101.         UDK6, UDK7, UDK8, UDK9, UDK10, UDK11, UDK12, UDK13,
  102.         UDK14, UDK15, UDK16, UDK17, UDK18, UDK19, UDK20
  103.  
  104.       <PC key code>
  105.         PC key code (decimal number)
  106.  
  107.     Example:
  108.         F6=64
  109.  
  110. 4) [X function keys] section
  111. In this section, Xterm F1-F5 keys are assigned to PC keys.
  112.  
  113.     Format:
  114.         <Xterm function key name>=<PC key code>
  115.  
  116.     where:
  117.  
  118.       <Xterm function key name>
  119.         XF1, XF2, XF3, XF4, XF5
  120.  
  121.       <PC key code>
  122.         PC key code (decimal number)
  123.  
  124.     Example:
  125.         XF1=59
  126.  
  127. 5) [Shortcut keys] section
  128. In this section, Tera Term functions are assigned to PC keys.
  129.  
  130.     Format:
  131.         <Shortcut key name>=<PC key code>
  132.  
  133.     where:
  134.       <Shortcut key name>    Function
  135.       --------------------------------------------
  136.       EditCopy        [Edit] Copy command
  137.       EditPaste        [Edit] Paste comannd
  138.       EditPasteCR        [Edit] Paste<CR> command
  139.       LineUp        Scrolls up screen by 1 line
  140.       LineDown        Scrolls down by 1 line
  141.       PageUp        Scrolls up by 1 page
  142.       PageDown        Scrolls down by 1 page
  143.       BuffTop        Scrolls screen to buffer top
  144.       BuffBottom        Scrolls screen to buffer bottom
  145.       NextWin        Moves to the next Tera Term window
  146.       PrevWin        Moves to the previous Tera Term window
  147.       LocalEcho        Toggles the local echo status
  148.  
  149.       <PC key code>
  150.         PC key code (decimal number)
  151.  
  152.     Example:
  153.         LineUp=1352
  154.  
  155. 6) [User keys] section
  156. This section defines user keys and character strings to be sent
  157. or macro file names to be executed by pressing the user keys.
  158.  
  159.     Format:
  160.         <User key name>=<PC key code>,<Control flag>,
  161.                 <Character string>
  162.  
  163.     where:
  164.  
  165.       <User key name>
  166.         User1, User2, User3,...., User99
  167.         Maximum number of the user keys is 99. 
  168.         For example, if you want to define ten user keys,
  169.         you must use the first ten names, from "User1" to "User10".
  170.  
  171.       <PC key code>
  172.         PC key code (decimal number)
  173.  
  174.       <Control flag>
  175.         Control flag which specifies how <character string>
  176.         is treated when the PC key is pressed.
  177.             0    <character string> is sent as it is.
  178.             1    New-line codes in <character string>
  179.                 are converted by Tera Term and
  180.                 the converted string is sent.
  181.             2    A macro file which has the name of
  182.                 <character string> is executed.
  183.     
  184.       <Character string>
  185.         Character string to be sent or name of a macro file
  186.         to be executed by pressing the user key.
  187.         A non-printable character (control character) in
  188.         the string can be expressed as a "$" and ASCII code
  189.         in two-character hex number. For example, CR character
  190.         is expressed as "$0D". "$" itself is expressed as "$24".
  191.  
  192.     Example:
  193.         User1=1083,0,telnet myhost
  194.         User2=1084,0,$0D$0A
  195.         User3=1085,1,$0D
  196.         User4=1086,2,test.ttl
  197.  
  198. ...............................................................................
  199. 3.2 NOTE
  200.  
  201. You can use a PC key code only once in the setup file.
  202. If you use a PC key code for multiple key assignments,
  203. the warning message "Key code XXX is used more than once" is
  204. displayed when the file is loaded by Tera Term. In this case,
  205. one of the assignments becomes active and others are ignored.
  206.  
  207. If you don't want to assign a key item to any PC key,
  208. use the word "off" like the following:
  209.  
  210. EditCopy=off
  211.  
  212. ...............................................................................
  213. 3.3 KEY COMBINATIONS
  214.  
  215. The following key combinations are acceptable to Tera Term and KEYCODE.EXE:
  216.  
  217.     Shift+key
  218.     Ctrl+key
  219.     Shift+Ctrl+key
  220.     Shift+Alt+key
  221.     Ctrl+Alt+key
  222.     Shift+Ctrl+Alt+key
  223.  
  224. Since some combinations (such as Alt+key) are used as shortcut keys of
  225. Tera Term and Windows, they don't have PC key codes and can't be specified
  226. in the keyboard setup file.