home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / trn_197b.zip / .trnmac next >
Text File  |  1994-12-25  |  6KB  |  173 lines

  1. #
  2. # This file is part of TRN for OS/2.
  3. #
  4. # Written by Herbert Neugebauer, haen@veces.bb.bawue.de
  5. # First Version: 09/29/94
  6. # Last Edited:   09/29/94
  7. #
  8. # This is a possible keyboard macro file for trn. Normally trn
  9. # does not recognize many of the "special" keys like function keys
  10. # and others. This file demonstrates how to define TRN commands to
  11. # this keys.
  12. #
  13. # The following macros depend very much on the terminal you use.
  14. # The macros are only valid for an "ANSI terminal", the standard
  15. # interface of the OS/2 command line.
  16. #
  17. # The special keys deliver two separate characters, the first is
  18. # a NULL character which cannot be entered directly here. The
  19. # terminal handler of TRN will strip the highest bit very late in
  20. # the terminal handling, so that 0x80 (dec. 128) can be used
  21. # to define the NULL character.
  22. #
  23. #######################
  24. #
  25. # We do not define the following 4 commands here by default.
  26. # The reason is, that TRN already does this by default if your
  27. # termcap file contains valid entries for the cursor commands.
  28. # The first of the following lines contain the TRN default
  29. # macros for the UP, DOWN, LEFT, RIGHT keys.
  30. #
  31. # This is also used as a small example how macros work:
  32. #    The up key is defined to '(' at article or pager level,
  33. #    '[' in the thread selector, 'p' otherwise
  34. #
  35. # If you want to understand the macros, please look in the man page.
  36. #
  37. # If you want to active the four following macros, just delete the
  38. # "#" character at the beginning of each line.
  39. #\200H %(%m=[ap]?\\(:%(%m=t?[:p))
  40. #\200P %(%m=[ap]?\\\):%(%m=t?]:n))
  41. #\200K %(%m=[ap]?\\[:<)
  42. #\200M %(%m=n?^j:%(%m=[ap]?\\]:>))
  43. #
  44. ##############################
  45. #
  46. # The F1 key is often used as help command.
  47. \200\073 %(%m=[apt]?h:h)
  48. #
  49. # The F8 key is the exit command mostly.
  50. \200\102 %(%m=[apt]?q:q)
  51. #
  52. ##############################
  53. #
  54. # The end key goes to the end...
  55. \200\117 $
  56. #
  57. # The home key goes to the start...
  58. \200\107 ^
  59. #
  60. ##############################
  61. #
  62. # Scan codes for other function keys:
  63. # - each special key sends two characters, the (octal) \200 and ....
  64. # - The following list is from the emx-include file kbdscan.h
  65. #   all values are hexadecimal, you have to calculate the octal
  66. #   values on your own.
  67. # - This is not the complete list, kbdscan.h is more complete.
  68. #
  69. #         0x04   /* <Shift>+<Ins>  [OS2]*/
  70. #         0x05   /* <Shift>+<Del>  [OS2]*/
  71. #         0x3b   /* <F1> */
  72. #         0x3c   /* <F2> */
  73. #         0x3d   /* <F3> */
  74. #         0x3e   /* <F4> */
  75. #         0x3f   /* <F5> */
  76. #         0x40   /* <F6> */
  77. #         0x41   /* <F7> */
  78. #         0x42   /* <F8> */
  79. #         0x43   /* <F9> */
  80. #         0x44   /* <F10> */
  81. #         0x47   /* <Home> */
  82. #         0x48   /* <Up arrow> */
  83. #         0x49   /* <Page up> */
  84. #         0x4a   /* <Alt>+<-> (numeric keypad) */
  85. #         0x4b   /* <Left arrow> */
  86. #         0x4c   /* Center cursor */
  87. #         0x4d   /* <Right arrow> */
  88. #         0x4e   /* <Alt>+<+> (numeric keypad) */
  89. #         0x4f   /* <End> */
  90. #         0x50   /* <Down arrow> */
  91. #         0x51   /* <Page down> */
  92. #         0x52   /* <Ins> */
  93. #         0x53   /* <Del> */
  94. #         0x54   /* <Shift>+<F1> */
  95. #         0x55   /* <Shift>+<F2> */
  96. #         0x56   /* <Shift>+<F3> */
  97. #         0x57   /* <Shift>+<F4> */
  98. #         0x58   /* <Shift>+<F5> */
  99. #         0x59   /* <Shift>+<F6> */
  100. #         0x5a   /* <Shift>+<F7> */
  101. #         0x5b   /* <Shift>+<F8> */
  102. #         0x5c   /* <Shift>+<F9> */
  103. #         0x5d   /* <Shift>+<F10> */
  104. #         0x5e   /* <Ctrl>+<F1> */
  105. #         0x5f   /* <Ctrl>+<F2> */
  106. #         0x60   /* <Ctrl>+<F3> */
  107. #         0x61   /* <Ctrl>+<F4> */
  108. #         0x62   /* <Ctrl>+<F5> */
  109. #         0x63   /* <Ctrl>+<F6> */
  110. #         0x64   /* <Ctrl>+<F7> */
  111. #         0x65   /* <Ctrl>+<F8> */
  112. #         0x66   /* <Ctrl>+<F9> */
  113. #         0x67   /* <Ctrl>+<F10> */
  114. #         0x68   /* <Alt>+<F1> */
  115. #         0x69   /* <Alt>+<F2> */
  116. #         0x6a   /* <Alt>+<F3> */
  117. #         0x6b   /* <Alt>+<F4> */
  118. #         0x6c   /* <Alt>+<F5> */
  119. #         0x6d   /* <Alt>+<F6> */
  120. #         0x6e   /* <Alt>+<F7> */
  121. #         0x6f   /* <Alt>+<F8> */
  122. #         0x70   /* <Alt>+<F9> */
  123. #         0x71   /* <Alt>+<F10> */
  124. #         0x72   /* <Ctrl>+<PrtSc> */
  125. #         0x73   /* <Ctrl>+<Left arrow> */
  126. #         0x74   /* <Ctrl>+<Right arrow> */
  127. #         0x75   /* <Ctrl>+<End> */
  128. #         0x76   /* <Ctrl>+<Page down> */
  129. #         0x77   /* <Ctrl>+<Home> */
  130. #         0x84   /* <Ctrl>+<Page up> */
  131. #         0x85   /* <F11> */
  132. #         0x86   /* <F12> */
  133. #         0x87   /* <Shift>+<F11> */
  134. #         0x88   /* <Shift>+<F12> */
  135. #         0x89   /* <Ctrl>+<F11> */
  136. #         0x8a   /* <Ctrl>+<F12> */
  137. #         0x8b   /* <Alt>+<F11> */
  138. #         0x8c   /* <Alt>+<F12> */
  139. #         0x8d   /* <Ctrl>+<Up arrow> */
  140. #         0x8e   /* <Ctrl>+<-> (numeric keypad) */
  141. #         0x8f   /* <Ctrl>+<Center> */
  142. #         0x90   /* <Ctrl>+<+> (numeric keypad) */
  143. #         0x91   /* <Ctrl>+<Down arrow> */
  144. #         0x92   /* <Ctrl>+<Ins> */
  145. #         0x93   /* <Ctrl>+<Del> */
  146. #         0x94   /* <Ctrl>+<Tab> */
  147. #         0x95   /* <Ctrl>+</> (numeric keypad) */
  148. #         0x96   /* <Ctrl>+<*> (numeric keypad) */
  149. #         0x97   /* <Alt>+<Home> */
  150. #         0x98   /* <Alt>+<Up arrow> */
  151. #         0x99   /* <Alt>+<Page up> */
  152. #         0x9b   /* <Alt>+<Left arrow> */
  153. #         0x9d   /* <Alt>+<Right arrow> */
  154. #         0x9f   /* <Alt>+<End> */
  155. #         0xa0   /* <Alt>+<Down arrow> */
  156. #         0xa1   /* <Alt>+<Page down> */
  157. #         0xa2   /* <Alt>+<Ins> */
  158. #         0xa3   /* <Alt>+<Del> */
  159. #         0xa4   /* <Alt>+</> (numeric keypad) */
  160. #         0xa5   /* <Alt>+<Tab>  [DOS] */
  161. #         0xa6   /* <Alt>+<Enter> (numeric keypad) */
  162. #
  163. #
  164. #
  165. # *                    *
  166. # **                  **
  167. # ***                ***
  168. # ****  END OF FILE ****
  169. # ***                ***
  170. # **                  **
  171. # *                    *
  172.