home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / E2.ZIP / E2LIB.ZIP / EIBMPC2.M < prev    next >
Text File  |  1991-02-04  |  7KB  |  157 lines

  1. # Keyboard mapping file for ibmpc under OS/2 or DOS box
  2. # I guess a utility to build this file would be nice, but it tends to
  3. # be an "edit once, then use for ever" kind of process.
  4.  
  5. # Basically, if you hit a key whose ASCII code is N, you are mapped via
  6. # the Nth (counting from 0) entry in this table.  The editor will
  7. # only see the mapped code.  Only single character mappings are possible.
  8. # Under DOS, you can program function keys by sending the appropriate
  9. # Ansi sequence (see files e*.i) on startup, but this does not seem to
  10. # work for OS/2.  Tough.
  11.  
  12. # All data after a # is ignored until end of line.
  13. # All white space is ignored - hence escapes must be used.
  14. # The usual C conventions apply, except for \x (hex), but
  15. # including \s for space and \# for #.  Sorry, but you have to do a lot
  16. # of decimal to octal conversion :-)    - MOC
  17.  
  18. # First group map basic 128 character set
  19. \0                              # nul - noop on PC
  20. \1                              # ^A - pick
  21. \2                              # ^B - mark
  22. \3                              # ^C - interrupt
  23. \4                              # ^D - down 1/2 page
  24. \5                              # ^E - extended control functions
  25. \6                              # ^F - find (plus search)
  26. \7                              # ^G - Page Up
  27. \177                            # del - destructive backspace
  28.                 #       so that fat <-- key works :-)
  29. \11                             # ^I - HT (tab)
  30. \12                             # ^J - LF (cursor down)
  31. \13                             # ^K - VT (cursor up)
  32. \14                             # ^L - FF (cursor right)
  33. \15                             # ^M - CR (carriage return)
  34. \16                             # ^N - del (delete right)
  35. \17                             # ^O - insert/overwrite mode
  36. \20                             # ^P - noop
  37. \21                             # ^Q - XON (resume output)
  38. \22                             # ^R - window right
  39. \23                             # ^S - XOFF (suspend output)
  40. \24                             # ^T - find (minus search)
  41. \25                             # ^U - up 1/2 page
  42. \26                             # ^V - page down
  43. \27                             # ^W - switch to next window
  44. \30                             # ^X - window left
  45. \31                             # ^Y - close (delete) line
  46. \32                             # ^Z - save and exit
  47. \33                             # ^[ - esc (command mode)
  48. \34                             # ^\ - escape next char (^#, ^|, ^` or
  49.                 #      ^~ on some keyboards)
  50. \35                             # ^] - tab left
  51. \36                             # ^^ - home
  52. \37                             # ^_ - open (insert blank line)
  53. \s!"\#$%&'()*+,-./              # Space ...
  54. 0123456789:;<=>?
  55. @ABCDEFGHIJKLMNO
  56. PQRSTUVWXYZ[\\]^_
  57. `abcdefghijklmno
  58. pqrstuvwxyz{|}~\177             # ... DEL
  59.  
  60. # The extended control functions (following ^E) are not remappable:
  61. #       ^A                      recall last command string
  62. #       ^E                      do interactive replacement
  63. #       ^F                      do interactive replacement, find next
  64. #       ^J                      join line
  65. #       ^T                      do interactive replacement, find previous
  66. #       ^W                      alt (switch to alternate file)
  67. #       ^Y                      erase line (replace with blanks)
  68. #       ^^                      redraw screen
  69. #       ^_                      split line
  70. # These should be considered historical;  in all cases, there is an
  71. # equivalent function key (below).
  72.  
  73. # Next group map codes over 128 - with PC, this is usually just
  74. # the 160(dec), 240(oct) value generated by the extra cursor keys
  75. # on some keyboards:
  76.  
  77. \200\201\202\203\204\205\206\207
  78. \210\211\212\213\214\215\216\217
  79. \220\221\222\223\224\225\226\227
  80. \230\231\232\233\234\235\236\237
  81. \240\241\242\243\244\245\246\247        # 240(oct) = 160(dec)
  82. \250\251\252\253\254\255\256\257
  83. \260\261\262\263\264\265\266\267
  84. \270\271\272\273\274\275\276\277
  85. \300\301\302\303\304\305\306\307
  86. \310\311\312\313\314\315\316\317
  87. \320\321\322\323\324\325\326\327
  88. \330\331\332\333\334\335\336\337
  89. \340\341\342\343\344\345\346\347
  90. \350\351\352\353\354\355\356\357
  91. \360\361\362\363\364\365\366\367
  92. \370\371\372\373\374\375\376\377
  93.  
  94. # The final group is optional, and maps the extended ASCII codes
  95. # from cursor and function keys.  Currently, there is provision for
  96. # 133 of these (max value 132 == Ctrl-PgUp)
  97. # The first character (mapping for extended code 0) must not be 0.
  98. # This should not be a problem, as the first extended code (for NUL)
  99. # is 3 at present.
  100. # Example: to swap F1 (default command "open new line") with Shift-F1 (default
  101. # command "help"), exchange codes 59 and 84 (\73 and \124).
  102.  
  103. # Currently implemented codes are:
  104. #       Oct     Dec     Func
  105. #
  106. #       \17     15      |<--  (back tab)
  107. #       \73     59      F1 (open blank line)
  108. #       \74     60      F2 (close line)
  109. #       \75     61      F3 (mark)
  110. #       \76     62      F4 (pick)
  111. #       \77     63      F5 (-pick)
  112. #       \100    64      F6 (-mark)
  113. #       \101    65      F7 (-close)
  114. #       \102    66      F8 (alt)
  115. #       \103    67      F9 (+search)
  116. #       \104    68      F10 (-search)
  117. #       \107    71      Home
  118. #       \110    72      Cur Up
  119. #       \111    73      PgUp
  120. #       \113    75      Cur Left
  121. #       \115    77      Cur Right
  122. #       \117    79      End (<CMD>Home)
  123. #       \120    80      Cur Down
  124. #       \121    81      PgDn
  125. #       \122    82      Ins
  126. #       \123    83      Del
  127. #       \124    83      Shift-F1 (help == ESC-h-CR)
  128. #       \137    95      Ctrl-F2 (erase)
  129. #       \144    100     Ctrl-F7 (-erase)
  130. #       \146    102     Ctrl-F9 (interactive replace)
  131. #       \150    104     Alt-F1 (split)
  132. #       \151    105     Alt-F2 (join)
  133. #       \154    108     Alt-F5 (recall last command)
  134. #       \157    111     Alt-F8 (switch window)
  135. #       \160    112     Alt-F9 (replace and find next)
  136. #       \161    113     Alt-F10 (replace and find previous)
  137. #       \167    119     Ctrl-Home (redraw screen)
  138.  
  139. \1\1\2\3\4\5\6\7                        # 0-7
  140. \10\11\12\13\14\15\16\17                # 8-15
  141. \20\21\22\23\24\25\26\27                # 16-23
  142. \30\31\32\33\34\35\36\37                # 24-31
  143. \40\41\42\43\44\45\46\47                # 32-39
  144. \50\51\52\53\54\55\56\57                # 40-47
  145. \60\61\62\63\64\65\66\67                # 48-55
  146. \70\71\72\73\74\75\76\77                # 56-63
  147. \100\101\102\103\104\105\106\107        # 64-71
  148. \110\111\112\113\114\115\116\117        # 72-79
  149. \120\121\122\123\124\125\126\127        # 80-87
  150. \130\131\132\133\134\135\136\137        # 88-95
  151. \140\141\142\143\144\145\146\147        # 96-103
  152. \150\151\152\153\154\155\156\157        # 104-111
  153. \160\161\162\163\164\165\166\167        # 112-119
  154. \170\171\172\173\174\175\176\177        # 120-127
  155. \200\201\202\203\204\205                # 128-132
  156. 
  157.