home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / dos / tools / aurora21 / cukbd.aml < prev    next >
Text File  |  1995-08-10  |  23KB  |  578 lines

  1.  
  2. // -------------------------------------------------------------------
  3. // The Aurora Editor v2.1
  4. // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
  5. //
  6. // Aurora/CUA Keyboard definitions (included by MAIN.AML)
  7. //
  8. // If you have made any changes, save this file and select 'Recompile
  9. // the Editor' from the Set menu. Exit and re-enter the editor for
  10. // your changes to take effect.
  11. // -------------------------------------------------------------------
  12.  
  13. // -------------------------------------------------------------------
  14. //  Edit and File Manager windows
  15. // -------------------------------------------------------------------
  16.  
  17.   object  edit_fmgr
  18.  
  19.   // Controls
  20.   function  '≡'                                // close window
  21.     close
  22.   end
  23.  
  24.   // Menu activation
  25.   key  <esc>           gotobar                 // to last menu bar item
  26.   key  <f10>           gotobar                 // to last menu bar item
  27.   key  <alt f10>       gotomenu                // goto last pull-down menu
  28.  
  29.   key  <alt f>         gotomenu "file"         // to file menu (cua)
  30.   key  <alt a>         gotomenu "macro"        // to macro menu (cua)
  31.   key  <alt p>         gotomenu "options"      // to options menu (cua)
  32.   key  <alt w>         gotomenu "window"       // to window menu (cua)
  33.   key  <alt h>         gotomenu "help"         // to help menu (cua)
  34.   key  <f1>            gotomenu "help"         // to help menu (cua)
  35.  
  36.   // Scroll
  37.   key  <pgdn>          pagedown                // scroll down (cua)
  38.   key  <pgup>          pageup                  // scroll up (cua)
  39.   key  <ctrl pgup>     row (getviewtop)        // to page top
  40.   key  <ctrl pgdn>     row (getviewbot)        // to page bottom
  41.   key  <ctrl home>     row 1                   // to file top (cua)
  42.   key  <ctrl end>      row (getlines)          // to file bottom (cua)
  43.   key  <center>        adjustrow               // center cursor
  44.   key  <ctrl f9>       adjustrow 1             // scroll to page top
  45.   key  <ctrl f10>      adjustrow (getviewrows) // scroll to page bottom
  46.   key  <ctrl up>       rollrow -1              // scroll up one line
  47.   key  <ctrl down>     rollrow  1              // scroll down one line
  48.   key  <ctrl ->        lastpos                 // to last cursor position
  49.  
  50.   // print w/prompt for marked text
  51.   function print2
  52.     if mark? then
  53.       case yncbox "Print Marked Block Only?"
  54.         when 'Yes' options = 'b'
  55.         when 'Cancel', '' return
  56.       end
  57.     end
  58.     print options
  59.   end
  60.  
  61.   // File
  62.   key  <ctrl n>        opennew                 // new edit window
  63.   key  <f3>            askopen                 // open prompt (cua)
  64.   key  <ctrl o>        askopen                 // open prompt (cua)
  65.   key  <alt z>         openlast                // open last window
  66.   key  <alt ->         filelist                // file list
  67.   key  <ctrl p>        print2                  // print
  68.   key  <alt q>         close                   // close window
  69.   key  <ctrl f4>       close                   // close window (cua-win)
  70.   key  <alt f4>        closeall                // close all windows (cua-win)
  71.   key  <alt x>         closeall                // close all windows and save
  72.   key  <shift f1>      quickref 'qw'           // quick function reference
  73.   key  <shift f2>      quickref 'fw'           // function reference
  74.  
  75.   // Window
  76.   key  <alt 0>         winlist                 // window list (cua)
  77.   key  <alt down>      minimize                // minimize window
  78.   key  <alt up>        maximize                // maximize window
  79.   key  <f6>            nextwindow              // next window (cua)
  80.   key  <shift f6>      prevwindow              // prev window (cua)
  81.   key  <shift f3>      tile 'v'                // tile vertical
  82.   key  <shift f4>      tile 'h'                // tile horizontal
  83.   key  <shift f5>      cascade                 // cascade
  84.   key  <ctrl k><q>     close                   // close window
  85.  
  86.   // Search
  87.   key  <ctrl q><s>     askscan                 // file scan prompt
  88.   key  <ctrl b>        gotomark 't'            // find top of block
  89.   key  <ctrl 6>        cyclebook               // cycle through bookmarks
  90.  
  91.   // Set
  92.   key  <ctrl f1>       togglemode              // toggle video mode
  93.   key  <alt f2>        recompile               // recompile the editor
  94.  
  95.   // Macro
  96.   key  <shift f12>     pickmacro               // macro picklist
  97.   key  <ctrl f12>      runmac "maclist"        // macro menu
  98.   key  <alt f12>       askeval                 // macro command prompt
  99.   key  <alt f9>        askrun                  // DOS command prompt
  100.   key  <f9>            shell                   // exit to DOS
  101.  
  102.   // Other
  103.   key  <alt f5>        opencfg "tran"          // edit translation table
  104.  
  105.   // undefined or unnamed keys
  106.   key <otherkey> (keycode)
  107.     say (getkeyname (keycode)) + " not defined"
  108.   end
  109.  
  110.  
  111. // -------------------------------------------------------------------
  112. //  Prompts and Edit windows
  113. // -------------------------------------------------------------------
  114.  
  115.   object  prompt
  116.  
  117.   // Controls
  118.   function  '≡'                                // close window
  119.     close
  120.   end
  121.  
  122.   function  '*'                                // simulate <enter>
  123.     call <enter>                               //  (2-line box only)
  124.   end
  125.  
  126.   // Cursor
  127.   key  <left>          left                    // move cursor left
  128.   key  <right>         right                   // move cursor right
  129.   key  <home>          col 1                   // to column one
  130.   key  <end>           col  getlinelen + 1     // to end of line
  131.  
  132.   // Cursor + CUA-marking
  133.   key  <shift left>    left
  134.                        smark
  135.   key  <shift right>   right
  136.                        smark
  137.   key  <shift home>    col 1
  138.                        smark
  139.   key  <shift end>     col getlinelen + 1
  140.                        smark
  141.  
  142.   // Scroll
  143.   key  <ctrl pgup>     rollcol -(getviewcols - 1)   // page left
  144.   key  <ctrl pgdn>     rollcol   getviewcols - 1    // page right
  145.  
  146.   // Editing
  147.   key  <ins>           setting 'I' TOGGLE      // toggle insert mode
  148.   key  <del>
  149.     if getmarkbuf == getcurrbuf then
  150.       deleteblock                              // delete selected text
  151.     else
  152.       delchar                                  // delete character
  153.     end
  154.   end
  155.  
  156.   key  <backspace>     backsp                  // delete left character
  157.   key  <alt f6>        delchar (getlinelen)    // erase to end of line
  158.   key  <ctrl [>        literal                 // enter literal character
  159.   key  <alt =>         asciilist               // display ascii chart
  160.  
  161.   // Block
  162.   //key  <alt a>         markchar                // mark character
  163.   key  <alt k>         markcolumn              // mark column
  164.   key  <alt 1>         markword                // mark word
  165.   key  <alt 2>         markeol                 // mark to end of line
  166.   key  <alt u>         destroymark             // unmark
  167.  
  168.   // copy block to prompt
  169.   key  <alt c>
  170.     instext (getmarktext)
  171.     col  getlinelen + 1
  172.   end
  173.  
  174.   // paste from clipboard to prompt (cua)
  175.   key  <shift ins>
  176.     oldmark = usemark _ClipName
  177.     instext (getmarktext)
  178.     usemark oldmark
  179.     col  getlinelen + 1
  180.   end
  181.   key  <ctrl v>        call <shift ins>
  182.  
  183.   // copy from prompt to clipboard (cua)
  184.   key  <ctrl ins>      copy
  185.   key  <ctrl c>        copy
  186.  
  187.   // Prompt history
  188.   key  <up>            prevhist                // retrieve prev prompt
  189.   key  <down>          nexthist                // retrieve next prompt
  190.   key  <pgup>          askhistory              // history popup menu
  191.   key  <pgdn>          askhistory              // history popup menu
  192.  
  193.   // Exit
  194.   key  <esc>           close                   // quit prompt
  195.  
  196.   // non-function keys
  197.   key  <char> (character)                      // typeable keys
  198.     write character
  199.   end
  200.  
  201.   // filename completion
  202.   key  <ctrl tab>      askcomplete             // filename completion
  203.   key  <tab>           askcomplete
  204.   end
  205.  
  206.  
  207. // -------------------------------------------------------------------
  208. //  Edit windows
  209. // -------------------------------------------------------------------
  210.  
  211.   object  edit
  212.  
  213.   // Controls
  214.   function  '≡'
  215.     close                                      // close window
  216.   end
  217.  
  218.   // Menu
  219.   key  <esc>           gotobar                 // to last menu bar item
  220.   key  <alt s>         gotomenu "search"       // to search menu (cua)
  221.   key  <alt o>         gotomenu "fold"         // to fold menu (cua)
  222.   key  <alt b>         gotomenu "block"        // to block menu (cua)
  223.   key  <alt e>         gotomenu "edit"         // to edit menu (cua)
  224.   key  <alt t>         gotomenu "text"         // to text menu (cua)
  225.  
  226.   // Cursor
  227.   key  <up>            up                      // move cursor up
  228.   key  <down>          down                    // move cursor down
  229.  
  230.   // Cursor + CUA-marking
  231.   key  <shift up>      up
  232.                        smark
  233.   key  <shift down>    down
  234.                        smark
  235.  
  236.   key  <enter>         enter                   // enter key
  237.   key  <greyenter>     enter                   // keypad enter key
  238.  
  239.   key  <del>
  240.     if getmarkbuf == getcurrbuf then
  241.       deleteblock                              // delete selected text
  242.     else
  243.       delchar2                                 // delete character
  244.     end
  245.   end
  246.  
  247.   key  <backspace>     backsp                  // delete left char
  248.   key  <ctrl t>        delword _CSet           // delete right word
  249.  
  250.   key  <tab>
  251.     if getmarkbuf == getcurrbuf then
  252.       shiftblock _TabWidth                     // shift block
  253.     else
  254.       tabright                                 // tab right
  255.     end
  256.   end
  257.   key  <shift tab>
  258.     if getmarkbuf == getcurrbuf then
  259.       shiftblock -_TabWidth                    // shift block
  260.     else
  261.       tableft                                  // tab left
  262.     end
  263.   end
  264.  
  265.   key  <ctrl left>     prevword                // find left word
  266.                        smark                   // cua marking
  267.   key  <ctrl right>    nextword                // find right word
  268.                        smark                   // cua marking
  269.  
  270.   // Scroll
  271.   key  <pgdn>          pagedown                // page down
  272.   key  <pgup>          pageup                  // page up
  273.  
  274.   // Scroll + CUA-marking
  275.   key  <shift pgdn>    pagedown
  276.                        smark
  277.   key  <shift pgup>    pageup
  278.                        smark
  279.  
  280.   key  <ctrl home>     row 1                   // to file top
  281.                        smark
  282.   key  <ctrl end>      row (getlines)          // to file bottom
  283.                        smark
  284.  
  285.   // scroll up one line
  286.   key  <ctrl up>
  287.     rollrow -1
  288.     if getrow <> getviewbot then
  289.       down
  290.     end
  291.   end
  292.  
  293.   // scroll down one line
  294.   key  <ctrl down>
  295.     rollrow  1
  296.     if getrow <> getviewtop then
  297.       up
  298.     end
  299.   end
  300.  
  301.   // File
  302.   key  <f3>            askopen                 // open prompt (cua)
  303.   key  <ctrl o>        askopen                 // open prompt (cua)
  304.   key  <alt i>         askinsert               // open and insert prompt
  305.   key  <alt n>         askname                 // rename prompt
  306.   key  <f2>            save                    // save file (cua)
  307.   key  <ctrl s>        save                    // save file (cua)
  308.   key  <f4>            open "*.*"              // display file manager
  309.   key  <ctrl f4>       close                   // close window (cua-win)
  310.   key  <alt q>         close                   // close window
  311.   key  <alt f4>        closeall                // close all windows (cua-win)
  312.   //key  <ctrl x>        close 's'               // close window
  313.  
  314.   // Edit
  315.   key  <alt backspace> undo                    // undo last change (cua)
  316.   key  <ctrl z>        undo                    // undo last change (cua)
  317.   key  <alt ins>       redo                    // redo last change (cua) ??
  318.   key  <ctrl a>        redo                    // redo last change (cua)
  319.  
  320.   // clipboard keys
  321.   key  <shift del>     cut                          // cut (cua)
  322.   key  <ctrl x>        cut (if? (shiftkey?) 'a')    // cut/cut-append (cua)
  323.   key  <ctrl ins>      copy                         // copy (cua)
  324.   key  <ctrl c>        copy (if? (shiftkey?) 'a')   // copy/copy-append (cua)
  325.   key  <shift ins>     paste                        // paste (cua)
  326.   key  <ctrl v>        paste (if? (shiftkey?) 'o')  // paste/paste-over (cua)
  327.   key  <ctrl del>      clear                        // clear clipboard (cua)
  328.  
  329.   key  <ctrl u>
  330.     if shiftkey? then
  331.       paste 'w'                                     // paste from windows
  332.     else
  333.       copy 'w'                                      // copy to windows
  334.     end
  335.   end
  336.  
  337.   // cut/cut-append current line
  338.   key  <ctrl y>
  339.     undobegin
  340.     oldmark = usemark 'T'
  341.     markline
  342.     cut (if? (shiftkey?) 'a')
  343.     usemark oldmark
  344.     undoend
  345.   end
  346.  
  347.   // Window
  348.   //key  <ctrl c>        copywin                 // copy window
  349.   key  <alt v>         splitwin 'v'            // split window vertical
  350.   key  <ctrl f8>       toolbar                 // display tool bar
  351.  
  352.   // Block
  353.   key  <alt l>         markline                // mark line
  354.   key  <alt 3>         markpara "tb"           // mark paragraph
  355.   key  <alt c>         copyblock2              // copyblock
  356.   key  <alt m>         moveblock2              // move block
  357.   key  <ctrl m>        moveblockover           // move block over
  358.   key  <alt d>         deleteblock2            // delete block
  359.   key  <shift f7>      shiftblock -1           // unindent block
  360.   key  <shift f8>      shiftblock  1           // indent block
  361.   key  <ctrl k><f>     fillblock2              // fill block with string
  362.   key  <alt r>         formatblock2            // reformat block
  363.   key  <alt y>         formatblock2 "rj"       // reformat & right just block
  364.   key  <ctrl k><s>     saveblock2              // save block
  365.   key  <ctrl k><o>     sortblock2              // sort block
  366.   key  <ctrl k><u>     caseblock               // change block to uppercase
  367.   key  <shift f9>      quote                   // quote a block
  368.   key  <ctrl k><c>     justblock2 'c'          // center a block
  369.  
  370.   // Search
  371.   key  <f5>            askfind                 // find prompt (cua)
  372.   key  <ctrl f>        askfind                 // find prompt
  373.   key  <alt f3>        askfind                 // find prompt (win)
  374.   key  <ctrl g>        askrepl                 // replace prompt  ??
  375.   key  <ctrl i>        isearch                 // incremental search
  376.   key  <ctrl h>        askfindo                // find occurrences
  377.  
  378.   key  <ctrl l>        findlast                // do last find/replace
  379.   key  <ctrl 2>        quickbook               // set quick bookmark
  380.   key  <ctrl j>        askrow                  // go to line prompt
  381.   key  <alt 7>         search2 "f/f"           // go to next fold
  382.   key  <ctrl ]>        gotomatch2              // find matching char
  383.   key  <alt f7>        gotoerror               // go to compiler error
  384.  
  385.   // place bookmarks (ms-dos edit)
  386.   key  <ctrl k><0>     placebook '0'
  387.   key  <ctrl k><1>     placebook '1'
  388.   key  <ctrl k><2>     placebook '2'
  389.   key  <ctrl k><3>     placebook '3'
  390.   key  <ctrl k><4>     placebook '4'
  391.   key  <ctrl k><5>     placebook '5'
  392.   key  <ctrl k><6>     placebook '6'
  393.   key  <ctrl k><7>     placebook '7'
  394.   key  <ctrl k><8>     placebook '8'
  395.   key  <ctrl k><9>     placebook '9'
  396.  
  397.   // goto bookmarks (ms-dos edit)
  398.   key  <ctrl q><0>     gotobook2 '0'
  399.   key  <ctrl q><1>     gotobook2 '1'
  400.   key  <ctrl q><2>     gotobook2 '2'
  401.   key  <ctrl q><3>     gotobook2 '3'
  402.   key  <ctrl q><4>     gotobook2 '4'
  403.   key  <ctrl q><5>     gotobook2 '5'
  404.   key  <ctrl q><6>     gotobook2 '6'
  405.   key  <ctrl q><7>     gotobook2 '7'
  406.   key  <ctrl q><8>     gotobook2 '8'
  407.   key  <ctrl q><9>     gotobook2 '9'
  408.  
  409.   // Fold
  410.   key  <alt 8>         foldline                // fold next line
  411.   key  <alt 9>         foldline 'u'            // unfold next line
  412.   key  <alt g>         destroyfold2            // destroy closed/open fold
  413.   key  <alt \>                                 // open or close fold
  414.     if fold? then
  415.        openfold
  416.     else
  417.        closefold
  418.     end
  419.   end
  420.   key  <alt [>         foldall 'os'            // open all folds
  421.   key  <alt ]>         foldall 'cs'            // close all folds
  422.  
  423.   // Text
  424.   key  <ctrl enter>    insline2                // insert line
  425.   key  <ctrl backspace> delline                // delete line
  426.   key  <alt j>         joinline                // join line
  427.   key  <alt 4>         insline (gettext)       // duplicate line
  428.   key  <alt 5>         swapline                // swap line
  429.   key  <alt 6>         centerline              // center line
  430.   key  <alt f1>        commentline             // comment/uncomment line
  431.   key  <ctrl k><t>     timestamp               // date/time stamp
  432.   key  <ctrl k><x>     tabfile                 // expand tabs
  433.   key  <ctrl \>        hiliteword              // highlight words
  434.  
  435.   // Set
  436.   key  <ctrl w>        setting 'L' TOGGLE      // live word wrap toggle
  437.   key  <ctrl d>        setting 'D' TOGGLE      // line draw toggle
  438.  
  439.   // Macro
  440.   key  <shift f10>     compilemacro2 (getbufname)  // compile current file
  441.   key  <shift f11>     runmacro2 (getbufname)      // run current file
  442.  
  443.   // non-function (typeable) keys
  444.   key  <char> (character)                      // typeable keys
  445.     write character
  446.   end
  447.  
  448.   // Other
  449.   key  <ctrl q><q>     askrepkey               // repeat entered keys
  450.  
  451.   // invoke a spell checker from within an edit window
  452.   // (replace 'jspell' with your favorite spell checker)
  453.   key  <f11>
  454.     save                                       // save the current file
  455.     run  "jspell " + getbufname  "ck"          // call spellchecker
  456.     reopen                                     // reopen current file
  457.   end
  458.  
  459. // -------------------------------------------------------------------
  460. //  File Manager windows
  461. // -------------------------------------------------------------------
  462.  
  463.   object  fmgr
  464.  
  465.   // Menu activation
  466.   key  <alt m>         gotomenu "mark"         // to mark menu (cua)
  467.   key  <alt c>         gotomenu "command"      // to command menu (cua)
  468.   key  <alt s>         gotomenu "sort"         // to sort menu (cua)
  469.   key  <tab>           gotobar2                // to drive menu bar
  470.  
  471.   // Cursor
  472.   key  <left>          rollcol -1              // scroll left one column
  473.   key  <right>         rollcol  1              // scroll right one column
  474.   key  <home>          col 1                   // scroll to column one
  475.  
  476.   key  <up>            up                      // move cursor up
  477.   key  <down>          down                    // move cursor down
  478.   key  <shift up>      fmark                   // mark files
  479.                        up
  480.   key  <shift down>    fmark                   // mark files
  481.                        down
  482.  
  483.   // file manager commands (single character command codes)
  484.   key  <char> (c)
  485.  
  486.     // toggle file mark
  487.     if c == ' ' then
  488.       fmark
  489.  
  490.     // <shift-character> commands
  491.     elseif shiftkey? then
  492.       case  locase c
  493.         when 'o'     fopen 'o'                   // open file/directory
  494.         when 'e'     fopen 'e'                   // open file/directory
  495.         when 'z'     fopen "ze"                  // open maximized
  496.         when 'b'     fopen 'b'                   // open binary file
  497.         when 'y'     fopen "be"                  // open binary in one window
  498.         when 'k'     openkey2 (getffile)         // open key macro file
  499.         when 'm'     fmove                       // move file
  500.         when 'c'     fcopy                       // copy file
  501.         when 'd'     fdelete                     // delete file
  502.         when 'n'     frename                     // rename file
  503.         when 'r'     frun 'c'                    // run program/batch file
  504.         when 'p'     fprint                      // print file
  505.         when 'a'     fattr                       // change file attributes
  506.         when 't'     ftouch                      // touch file
  507.  
  508.         // spell checker
  509.         when 's'     run "jspell " + getffile  "ck"
  510.  
  511.         // unarchive .ZIP or .LZH files
  512.         when 'u'
  513.           f = getffile
  514.           run (if? (pos ".lzh" f 'i') "lha e " "pkunzip ") + f  "ck"
  515.           reopen
  516.  
  517.         // view .ZIP or .LZH archives
  518.         when 'v'
  519.           f = getffile
  520.           runcap (if? (pos ".lzh" f 'i') "lha v " "pkunzip -v ") + f
  521.       end
  522.  
  523.     // hotkey to files
  524.     else
  525.       onhotkey c
  526.     end
  527.  
  528.   // File
  529.   key  <ctrl backspace>   fup                  // parent directory
  530.  
  531.   // Mark
  532.   key  <alt k>         fmark "ma"              // mark all files
  533.   key  <alt u>         fmark "ua"              // unmark all
  534.  
  535.   // Command
  536.   key  <enter>         fopen '1'               // open file (one only)
  537.   key  <ctrl enter>    fopen 'q'               // open file (close fmgr)
  538.   key  <del>           fdelete                 // delete file
  539.  
  540.   // Sort
  541.   key  <alt n>         fsort 'n'               // sort by name
  542.   key  <alt e>         fsort 'e'               // sort by extension
  543.   key  <alt d>         fsort 'd'               // sort by date/time
  544.  
  545.   // Print
  546.   key  <ctrl p>        print                   // print fmgr contents
  547.   end
  548.  
  549.  
  550. // -------------------------------------------------------------------
  551. //  Movable/Sizable windows
  552. // -------------------------------------------------------------------
  553.  
  554.   object  win
  555.  
  556.   key  <ctrl f5>       sizekey                 // move/size with kbd
  557.   key  <ctrl f6>       pankey                  // pan video with kbd
  558.  
  559.   //key  <alt ins>       sizewin -2 -1 -2 -1 2   // move window northwest
  560.   key  <alt del>       sizewin  2  1  2  1 2   // move window southeast
  561.   end
  562.  
  563.  
  564. // -------------------------------------------------------------------
  565. //  All windows
  566. // -------------------------------------------------------------------
  567.  
  568.   object  mon
  569.  
  570.   // key macros
  571.   key  <ctrl r>        record                  // toggle record setting
  572.   key  <ctrl e>        play                    // play scrap key macro
  573.  
  574.   // define multi-key prefixes
  575.   key  <ctrl k>        prefix <ctrl k>         // define <ctrl k> prefix
  576.   key  <ctrl q>        prefix <ctrl q>         // define <ctrl q> prefix
  577.  
  578.