home *** CD-ROM | disk | FTP | other *** search
/ BUG 11 / BUGCD1998_02.ISO / email / sime / simdemo.z / keybind.def < prev    next >
Text File  |  1997-12-09  |  4KB  |  173 lines

  1. # this is a startup file
  2. # with comment lines
  3.  
  4. # Keymap Definition Format
  5. #
  6. # keymap <name> <default-bound-function>
  7. # key-print-rep  bound-function-name
  8. # key-print-rep  bound-function-name
  9. # key-print-rep  bound-function-name
  10. # end_keymap
  11.  
  12. # The editor currently pushes these default maps in the following order.
  13. # - fundamental goes on first, so it can catch keys the other maps miss.
  14. # - esc map next
  15. # - ctl-x map next
  16. # - default-prefix map on top
  17. # This strategy dispatches prefix keys first.
  18.  
  19. # Applications that want to push other special keymaps and prefix maps
  20. # should comment out all keys in the default-prefix-map, and then
  21. # push their own prefix map on top of the stack.
  22.  
  23. #   **** Warning ****
  24. #   All maps except the first one on the stack (fundamental) must use
  25. #   'rescan' as the default-bound-function!  Otherwise the key decoder
  26. #   will not traverse the key stack.
  27. #   **** Warning ****
  28.  
  29. keymap fundamental self-insert
  30.  
  31. # prefixes that point to other maps
  32.     esc         prefix esc-map
  33.     ^x        prefix ctl-x-map
  34.  
  35.     ^a        point-goto-bol
  36.     ^b        point-goto-char-rev
  37.     ^d        char-kill-fwd
  38.     ^e        point-goto-eol
  39.     ^f        point-goto-char-fwd
  40.     ^h        char-kill-rev
  41.     ^m        line-newline
  42.     ^k        line-kill-eol
  43.     ^n          point-goto-line-fwd
  44.     ^o        line-openline
  45.     ^p        point-goto-line-rev
  46.     ^r          point-goto-id-rev
  47.     ^t          point-goto-id-fwd
  48.     ^q        point-goto-word-rev
  49.     ^w          point-goto-word-fwd
  50.     ^y        point-goto-nonwhite-rev
  51.     ^u         point-goto-nonwhite-fwd
  52.  
  53.     up         point-goto-line-rev
  54.     down     point-goto-line-fwd
  55.     left    point-goto-char-rev
  56.     right    point-goto-char-fwd
  57.     ctl_left    point-goto-word-rev
  58.     ctl_right    point-goto-word-fwd
  59.     pgup    point-goto-page-rev
  60.     pgdn    point-goto-page-fwd
  61.  
  62.     backspace    char-kill-rev
  63.  
  64.     home    point-goto-bol
  65.     end        point-goto-eol
  66.     ctl_home    point-goto-bob
  67.     ctl_end    point-goto-eob
  68.  
  69.     del        char-kill-fwd
  70.     ins        point-goto-nowhere
  71.  
  72.     backtab    point-goto-word-rev
  73. end_keymap
  74.  
  75. keymap esc-map rescan
  76.  
  77. # these selection extenion commands lock on the buffer highlight while
  78. # the point is moved by various means.  The first buffer modification
  79. # key releases the tmp extend lock.  The permanent lock can only be
  80. # removed by the lock-off command.
  81.  
  82.     .   selection-extend-tmp
  83.     (   selection-extend-lock-on
  84.     )   selection-extend-lock-off
  85.     <   point-goto-bob-no-x
  86.     >   point-goto-eob-no-x
  87.  
  88. # these are the normal emacs bindings
  89.     b    point-goto-word-rev
  90.     d    word-kill-fwd
  91.     f    point-goto-word-fwd
  92.     h    word-kill-rev
  93.     v    point-goto-page-rev
  94. end_keymap
  95.  
  96.  
  97. keymap ctl-x-map rescan
  98.     f    point-goto-char-fwd
  99.     ^f    file-find
  100.     ^g    cmd-abort
  101.     ^i    file-insert
  102.     ^o    line-close
  103.     ^q    buffer-rw-toggle
  104.     4    prefix ctl-x-4-map
  105.  
  106.     b    buffer-goto
  107.     z    no-prefix-top-map
  108. end_keymap
  109.  
  110. keymap ctl-x-4-map rescan
  111.     a    "ctl-x-4-a"
  112.     b    "ctl-x-4-b"
  113. end_keymap
  114.  
  115.  
  116.  
  117.  
  118. ##################################################################
  119. # These are test keymaps and examples
  120. ##################################################################
  121.  
  122. keymap stack-1 rescan
  123.     ^x    prefix    stack-1-cx-prefix
  124.     z    stack-1-z
  125. end_keymap
  126.  
  127. keymap stack-1-cx-prefix rescan
  128.     a    stack-1-cx-a
  129.     b   stack-1-cx-b
  130. end_keymap
  131.  
  132.  
  133. keymap stack-2 rescan
  134.     ^x    prefix    stack-2-cx-prefix
  135. end_keymap
  136. keymap stack-2-cx-prefix rescan
  137.     4    prefix    stack-2-cx4-prefix
  138. end_keymap
  139. keymap stack-2-cx4-prefix rescan
  140.     c    stack-2-cx4-c
  141.     d    stack-2-cx4-d
  142. end_keymap
  143.  
  144.  
  145. keymap stack-3 rescan
  146.     ^x    prefix    stack-3-cx-prefix
  147. end_keymap
  148. keymap stack-3-cx-prefix rescan
  149.     4    stack-3-cx-4
  150. end_keymap
  151.  
  152. keymap stack-4 rescan
  153.     ^x    prefix    stack-4-cx-prefix
  154. end_keymap
  155. keymap stack-4-cx-prefix rescan
  156.     4    prefix stack-4-cx4-prefix
  157. end_keymap
  158. keymap stack-4-cx4-prefix rescan
  159.     a    stack-4-cx4-a
  160.     b    stack-4-cx4-b
  161. end_keymap
  162.  
  163. keymap map-top-1 rescan
  164.     ^[        prefix  ctl-x-map
  165.     ^x        prefix  esc-map
  166.     z        no-prefix-top-map
  167. end_keymap
  168.  
  169. keymap map-top-2 rescan
  170.     i      "i-function"
  171.     h   "h-function"
  172. end_keymap
  173.