home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / textedit / auror111.zip / AKBD.A < prev    next >
Text File  |  1993-11-07  |  17KB  |  405 lines

  1.  
  2. //┌────────────────────────────────────────────────────────────────────┐
  3. //│ The Aurora Editor v1.11  - Keyboard and Mouse definitions          │
  4. //│                                                                    │
  5. //│ Please keep a backup copy of this file.                            │
  6. //│                                                                    │
  7. //│ For a description of these keyboard and mouse definitions and how  │
  8. //│ to change them, select the "Key/Mouse/Menu Config" item from the   │
  9. //│ "Help" pull-down menu. Then then select "Defining the Keyboard"    │
  10. //│ from the submenu.                                                  │
  11. //│                                                                    │
  12. //│ If you have made any changes, save this file and select "Restore   │
  13. //│ Settings" from the "Set" pulldown menu. Exit and re-enter the      │
  14. //│ editor for your changes to take effect.                            │
  15. //│                                                                    │
  16. //│ Key prefixes used:                                                 │
  17. //│   "k_c_" =  <Ctrl> keys                                            │
  18. //│   "k_a_" =  <Alt> keys                                             │
  19. //│   "k_s_" =  <Shift> keys                                           │
  20. //│                                                                    │
  21. //└────────────────────────────────────────────────────────────────────┘
  22.  
  23.  
  24.   // edit and file manager windows
  25.   obj  edit-fmgr (
  26.  
  27.   fun
  28.  
  29.     // Controls
  30.     ≡            (wquit %p)                  ,// close window
  31.  
  32.     // Menu activation
  33.     k_esc        (menb)                      ,// to last menu bar item
  34.     k_f10        (menb)                      ,// to last menu bar item
  35.     k_a_f10      (men)                       ,// last pull-down menu
  36.     k_f1         (menh)                      ,// help pull-down
  37.     k_a_t        (men2)                      ,// to last toolbar control
  38.  
  39.     // Scroll
  40.     k_c_home     (cptop)                     ,// to page top
  41.     k_c_end      (cpbot)                     ,// to page bottom
  42.     k_c_pgup     (cgoto @ 1)                 ,// to file top
  43.     k_c_pgdn     (cgoto @ (qtexend))         ,// to file bottom
  44.     k_pad5       (ladj @ -1)                 ,// center cursor
  45.     k_c_f9       (ladj @ 1)                  ,// scroll to page top
  46.     k_c_f10      (ladj @ (qwinp @ %y1d))     ,// scroll to page bottom
  47.     k_c_up       (scry -1)                   ,// scroll up one line
  48.     k_c_down     (scry  1)                   ,// scroll down one line
  49.     k_c_-        (clast)                     ,// to last cursor position
  50.  
  51.     // File
  52.     k_c_n        (newf)                      ,// new edit window
  53.     k_a_e        (askopen)                   ,// open prompt
  54.     k_a_z        (openlast)                  ,// open last window
  55.     k_a_-        (flis)                      ,// file list
  56.     k_a_q        (quit %p)                   ,// close window
  57.     k_a_x        (gquit %p)                  ,// close all windows
  58.     k_s_f1       (qref)                      ,// quick reference
  59.  
  60.     // Window
  61.     k_a_w        (wlis)                      ,// window list
  62.     k_c_z        (wmax)                      ,// maximize window
  63.     k_c_a        (wnex)                      ,// next window
  64.     k_s_f3       (wtilev)                    ,// tile vertical
  65.     k_s_f4       (wtileh)                    ,// tile horizontal
  66.     k_s_f5       (wcasc)                     ,// cascade
  67.     k_c_k+q      (wquit %p)                  ,// close window
  68.  
  69.     k_a_ins      (winsizt -2 -1 -2 -1  2)    ,// move window northwest
  70.     k_a_del      (winsizt  2  1  2  1  2)    ,// move window southeast
  71.  
  72.     // Search
  73.     k_c_s        (askscan)                   ,// file scan prompt
  74.     k_c_b        (mloc @ %t)                 ,// find top of block
  75.     k_c_6        (bget)                      ,// to previous bookmark
  76.  
  77.     // Print
  78.     k_c_p        (print)                     ,// print
  79.     k_a_p        (print %m)                  ,// print block
  80.  
  81.     // Set
  82.     k_c_f1       (vfont %t)                  ,// toggle video mode
  83.     k_a_f2       (setres)                    ,// restore settings
  84.  
  85.     // Macro
  86.     k_c_v        (askmcmd)                   ,// macro command prompt
  87.     k_a_f9       (askoscmd %ck)              ,// DOS command prompt
  88.     k_a_f8       (askoscap)                  ,// DOS capture prompt
  89.     k_f9         (osshell)                   ,// exit to DOS
  90.  
  91.     // Mouse
  92.     m_r_down_client    (men)                 ,// last menu pull-down
  93.     m_l_dbclick_bkgnd  (wlis)                .// window list
  94.  
  95.   ).
  96.  
  97.  
  98.   // Prompts and Edit windows
  99.   obj  prompt (
  100.  
  101.   fun
  102.  
  103.     // Cursor
  104.     k_left       (left)                      ,// move cursor left
  105.     k_right      (right)                     ,// move cursor right
  106.     k_home       (chome)                     ,// to column one
  107.     k_end        (ceol)                      ,// to end of line
  108.  
  109.     // Scroll
  110.     k_f7         (scrx (- (xpagsiz)))        ,// page left
  111.     k_f8         (scrx (xpagsiz))            ,// page right
  112.  
  113.     // Editing
  114.     k_ins        (cmtog)                     ,// toggle insert mode
  115.     k_del        (delch)                     ,// delete character
  116.     k_backspace  (baksp)                     ,// delete left character
  117.     k_f6         (leol)                      ,// erase to end of line
  118.     k_a_f6       (leol %l)                   ,// erase to beginning of line
  119.     k_c_t        (wrddel CSet)               ,// delete right word
  120.     k_c_[        (lit)                       ,// enter literal character
  121.     k_a_=        (wasc)                      ,// display ascii chart
  122.  
  123.     // Block
  124.     k_a_a        (mset %s)                   ,// mark character
  125.     k_a_b        (mset %r)                   ,// mark column
  126.     k_a_1        (wrdmrk CSet)               ,// mark word
  127.     k_a_2        (meol)                      ,// mark to end of line
  128.     k_a_u        (mdes)                      ,// unmark
  129.     k_a_c        (mcpyp. ceol)               ,// copy block to prompt
  130.  
  131.     // Prompt history
  132.     k_up         (wrtv %p)                   ,// retrieve prev prompt
  133.     k_down       (wrtv %n)                   ,// retrieve next prompt
  134.  
  135.     // Exit
  136.     k_esc        (quit)                      ,// quit prompt
  137.     k_a_q        (quit)                      ,// quit prompt
  138.  
  139.  
  140.     // Mouse
  141.  
  142.     // mouse left button down                 // begin mouse mark
  143.     m_l_down_client (
  144.       arg  w x y r.
  145.       moubegmrk  x y MouMrkS.
  146.     ),
  147.  
  148.     // mouse move
  149.     m_move_client (                           // extend mouse mark
  150.       arg  x y r.
  151.       moumovmrk  x y.
  152.     ),
  153.  
  154.     // mouse left button up
  155.     m_l_up_client (                           // end mouse mark
  156.       arg  x y.
  157.       mouendmrk  x y
  158.     ).
  159.  
  160.   ).
  161.  
  162.  
  163.   // edit windows only
  164.   obj  edit (
  165.  
  166.   fun
  167.  
  168.     // tool bar
  169.     <≡>            (wtool)                   ,// close tool bar
  170.     <?>            (hlp 18 6 %f)             ,// tool bar help
  171.     <*>            (fmgr)                    ,// display file manager
  172.     </>            (wcopy)                   ,// copy window
  173.     <─>            (wspl %h)                 ,// split window horz
  174.     <|>            (wspl %v)                 ,// split window vert
  175.     <o>            (askopen)                 ,// open prompt
  176.     <s>            (save)                    ,// save file
  177.     <F>            (askfind)                 ,// find prompt
  178.     <f>            (finl)                    ,// do last find/replace
  179.     <r>            (mrfl %b)                 ,// reflow block
  180.     <«>            (undo)                    ,// undo last change
  181.     <»>            (undo %r)                 ,// redo last change
  182.     <>>            (mfld %f)                 ,// fold block
  183.     <<>            (lfld %u)                 ,// unfold line
  184.  
  185.     // Cursor
  186.     k_up           (up)                      ,// move cursor up
  187.     k_down         (down)                    ,// move cursor down
  188.     k_enter        (enteredit)               ,// enter key
  189.     k_tab          (ctab)                    ,// tab right
  190.     k_s_tab        (ctab %l)                 ,// tab left
  191.     k_c_right      (cwrd @  CSet)            ,// find right word
  192.     k_c_left       (cwrd %r CSet)            ,// find left word
  193.  
  194.     // File
  195.     k_a_i          (askopenins)              ,// open and insert prompt
  196.     k_c_]          (wrdlod CSetB)            ,// open file at cursor
  197.     k_a_n          (askname)                 ,// rename prompt
  198.     k_f3           (save)                    ,// save file
  199.     k_c_ins        (fpre)                    ,// next file
  200.     k_c_del        (fnex)                    ,// prev file
  201.     k_f4           (fmgr)                    ,// display file manager
  202.     k_a_q          (fquit %p)                ,// close file/window
  203.     k_c_x          (fquit %f)                ,// save & close file/window
  204.  
  205.     // Window
  206.     k_c_c          (wcopy)                   ,// copy window
  207.     k_a_h          (wspl %h)                 ,// split window horizontal
  208.     k_a_v          (wspl %v)                 ,// split window vertical
  209.     k_c_f8         (wtool)                   ,// display tool bar
  210.     k_c_f7         (wsty)                    ,// change window style
  211.  
  212.     // Block
  213.     k_a_l          (mset %l)                 ,// mark line
  214.     k_a_3          (mpgh %tb)                ,// mark paragraph
  215.     k_a_c          (mcpy)                    ,// copy block
  216.     k_a_o          (mmov %o)                 ,// overlay block
  217.     k_a_m          (mmov)                    ,// move block
  218.     k_c_m          (mmov %of)                ,// move block over
  219.     k_a_d          (mdel)                    ,// delete block
  220.     k_s_f7         (mshf -1)                 ,// unindent block
  221.     k_s_f8         (mshf 1)                  ,// indent block
  222.     k_c_k+f        (askmfill)                ,// fill block prompt
  223.     k_a_r          (mrfl %b)                 ,// reflow block
  224.     k_a_y          (mrfl %br)                ,// reflow & right just block
  225.     k_c_k+s        (msave)                   ,// save block
  226.     k_c_k+o        (msrt)                    ,// sort block
  227.     k_c_k+u        (mcase %u)                ,// change block to uppercase
  228.     k_c_k+c        (mjust %c)                ,// center block
  229.  
  230.     // Search
  231.     k_f5           (askfind)                 ,// find prompt
  232.     k_c_f          (askfind)                 ,// find prompt
  233.     k_c_g          (askrpl)                  ,// replace prompt
  234.     k_c_l          (finl)                    ,// do last find/replace
  235.     k_c_2          (bset)                    ,// set quick bookmark
  236.     k_c_j          (askglin)                 ,// go to line prompt
  237.     k_a_7          (cfld)                    ,// go to next fold
  238.     k_a_f3         (finm)                    ,// find matching char
  239.     k_a_f7         (finc)                    ,// go to compiler error
  240.  
  241.     // Fold
  242.     k_a_8          (lfld)                    ,// fold next line
  243.     k_a_9          (lfld %s)                 ,// unfold next line
  244.     k_a_0          (mflda %ua)               ,// unfold all
  245.     k_a_f          (mfld %f)                 ,// fold block
  246.     k_a_g          (lfld %u)                 ,// unfold line
  247.  
  248.     // Edit
  249.     k_c_u          (undo)                    ,// undo last change
  250.     k_c_y          (undo %r)                 ,// redo last change
  251.     k_c_enter      (lins %a)                 ,// insert line
  252.     k_c_backspace  (ldel)                    ,// delete line
  253.     k_a_s          (lspl)                    ,// split line
  254.     k_a_j          (ljoin)                   ,// join line
  255.     k_a_4          (ldup)                    ,// duplicate line
  256.     k_a_5          (lswp)                    ,// swap line
  257.     k_a_6          (lcen)                    ,// center line
  258.     k_a_f1         (lcom)                    ,// comment/uncomment line
  259.     k_c_k+t        (stamp)                   ,// date/time stamp
  260.     k_c_k+x        (exptab)                  ,// expand tabs
  261.  
  262.     // Clipboard
  263.     k_grey-        (clpcpy %d)               ,// cut
  264.     k_c_grey-      (clpcpy %ad)              ,// cut append
  265.     k_grey+        (clpcpy)                  ,// copy
  266.     k_c_grey+      (clpcpy %a)               ,// copy append
  267.     k_grey*        (clppst)                  ,// paste
  268.     k_c_grey*      (clppst %o)               ,// paste over
  269.     k_c_grey/      (clpclr)                  ,// clear clipboard
  270.  
  271.     // Set
  272.     k_c_w          (wmwrap)                  ,// word wrap toggle
  273.     k_c_d          (wmdraw)                  ,// line draw toggle
  274.  
  275.  
  276.     // Mouse
  277.  
  278.     // double-click in client area
  279.     m_l_dbclick_client (                      // begin mouse mark (dbl-click)
  280.       arg  w x y r.
  281.       moubegmrk  x y MouMrkD %d.
  282.     ),
  283.  
  284.     // right button down
  285.     m_r_down_border (                         // display file manager
  286.       arg  w x y r.
  287.       if (eq r 11 12) (fmgr).
  288.     ).
  289.   ).
  290.  
  291.  
  292.   // file manager windows only
  293.   obj  fmgr (
  294.  
  295.   fun
  296.  
  297.     // Menu activation
  298.     k_tab          (men2)                    ,// to drive menu bar
  299.  
  300.     // Cursor
  301.     k_left         (scrx -1)                 ,// scroll left one column
  302.     k_right        (scrx  1)                 ,// scroll right one column
  303.     k_home         (cgoto 1)                 ,// scroll to column one
  304.     k_up           (up)                      ,// move cursor up
  305.     k_down         (down)                    ,// move cursor down
  306.  
  307.     // File Manager commands (single character command codes)
  308.     k_chr (
  309.       arg  k c.
  310.       = %c (chc c %l).
  311.       if (eq c %o %e) (fopen c) (             // open file/directory
  312.       if (eq c %z)  (fopen %ze) (             // open maximized
  313.       if (eq c %b)  (fopen %b) (              // open binary file
  314.       if (eq c %y)  (fopen %be) (             // open binary in one window
  315.       if (eq c %k)  (fopenk) (                // open key macro file
  316.       if (eq c %m)  (fmov) (                  // move file
  317.       if (eq c %c)  (fcpy) (                  // copy file
  318.       if (eq c %d)  (fdel) (                  // delete file
  319.       if (eq c %n)  (fren) (                  // rename file
  320.       if (eq c %r)  (frun %c) (               // run program/batch file
  321.       if (eq c %p)  (fprt) (                  // print file
  322.       if (eq c %a)  (fatt) (                  // change file attributes
  323.       if (eq c %t)  (ftch) (                  // touch file
  324.       if (eq c " ") (fmtog) (                 // mark/unmark file
  325.  
  326.       // spelling checker (replace "ss" with your favorite spell checker)
  327.       if (eq c %s) (
  328.         os (cat "ss " (dn)) %ck.
  329.       )(
  330.  
  331.       // image viewer (replace "picem" with your favorite viewer)
  332.       if (eq c %i) (
  333.         os (cat "picem " (dn)) %c.
  334.       )(
  335.  
  336.       // unarchive .ZIP or .LZH files
  337.       if (eq c %u)  (
  338.         = %f (dn).
  339.         os (cat (if (fin f ".lzh" %i) "lha e " "pkunzip ") f) %ck.
  340.         refresh.
  341.       )(
  342.  
  343.       // view .ZIP or .LZH archives
  344.       if (eq c %v) (
  345.         = %f (dn).
  346.         oscap (cat (if (fin f ".lzh" %i) "lha v " "pkunzip -v ") f).
  347.       )(
  348.  
  349.       )))))))))))))))))).
  350.     ),
  351.  
  352.     // File
  353.     k_c_backspace  (fpar)                    ,// parent directory
  354.  
  355.     // Mark
  356.     k_a_m          (fmrk)                    ,// mark all files
  357.     k_a_u          (fumrk)                   ,// unmark all
  358.  
  359.     // Command
  360.     k_enter        (fopen %1)                ,// open file (one only)
  361.     k_c_enter      (fopen %q)                ,// open file (close fmgr)
  362.     k_del          (fdel)                    ,// delete file
  363.  
  364.     // Sort
  365.     k_a_n          (fsrt %n)                 ,// sort by name
  366.     k_a_s          (fsrt %s)                 ,// sort by size
  367.     k_a_d          (fsrt %d)                 ,// sort by date/time
  368.     k_a_o          (fsrt %o)                 ,// no sort (DOS order)
  369.  
  370.     // Print
  371.     k_c_p          (print %d)                ,// print fmgr contents
  372.  
  373.     m_l_dbclick_client (                      // double-click to open
  374.       fopen %1
  375.     ).
  376.  
  377.   ).
  378.  
  379.  
  380.   // movable/sizable windows
  381.   obj  win (
  382.  
  383.   fun
  384.     k_c_f5         (wkey)                    ,// move/size windows
  385.     k_c_f6         (wkey %p)                 .// pan video background
  386.  
  387.   ).
  388.  
  389.  
  390.   // all windows
  391.   obj  mon (
  392.  
  393.   fun
  394.     k_c_r          (krec)                    ,// record key macro toggle
  395.     k_c_e          (kplay)                   ,// play scrap key macro
  396.     k_c_i          (kdel)                    ,// erase scrap key macro
  397.  
  398.     // define compound key prefixes
  399.     k_c_k          (keyx %k_c_k)             ,// define <Ctrl-K> prefix
  400.     k_c_o          (keyx %k_c_o)             ,// define <Ctrl-O> prefix
  401.     k_c_q          (keyx %k_c_q)             .// define <Ctrl-Q> prefix
  402.  
  403.   ).
  404.  
  405.