Category : Recently Uploaded Files
Archive   : AURORA21.ZIP
Filename : CUKBD.AML
// -------------------------------------------------------------------
// The Aurora Editor v2.1
// Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
//
// Aurora/CUA Keyboard definitions (included by MAIN.AML)
//
// If you have made any changes, save this file and select 'Recompile
// the Editor' from the Set menu. Exit and re-enter the editor for
// your changes to take effect.
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// Edit and File Manager windows
// -------------------------------------------------------------------
object edit_fmgr
// Controls
function 'ð' // close window
close
end
// Menu activation
key
key
key
key
key
key
key
key
key
// Scroll
key
key
key
key
key
key
key
key
key
key
key
key
// print w/prompt for marked text
function print2
if mark? then
case yncbox "Print Marked Block Only?"
when 'Yes' options = 'b'
when 'Cancel', '' return
end
end
print options
end
// File
key
key
key
key
key
key
key
key
key
key
key
key
// Window
key
key
key
key
key
key
key
key
key
close // close window
// Search
keyaskscan // file scan prompt
keygotomark 't' // find top of block
keycyclebook // cycle through bookmarks
// Set
keytogglemode // toggle video mode
keyrecompile // recompile the editor
// Macro
keypickmacro // macro picklist
keyrunmac "maclist" // macro menu
keyaskeval // macro command prompt
keyaskrun // DOS command prompt
keyshell // exit to DOS
// Other
keyopencfg "tran" // edit translation table
// undefined or unnamed keys
key(keycode)
say (getkeyname (keycode)) + " not defined"
end
// -------------------------------------------------------------------
// Prompts and Edit windows
// -------------------------------------------------------------------
object prompt
// Controls
function 'ð' // close window
close
end
function '*' // simulate
call// (2-line box only)
end
// Cursor
keyleft // move cursor left
keyright // move cursor right
keycol 1 // to column one
keycol getlinelen + 1 // to end of line
// Cursor + CUA-marking
keyleft
smark
keyright
smark
keycol 1
smark
keycol getlinelen + 1
smark
// Scroll
keyrollcol -(getviewcols - 1) // page left
keyrollcol getviewcols - 1 // page right
// Editing
key setting 'I' TOGGLE // toggle insert mode
key
if getmarkbuf == getcurrbuf then
deleteblock // delete selected text
else
delchar // delete character
end
end
keybacksp // delete left character
keydelchar (getlinelen) // erase to end of line
keyliteral // enter literal character
keyasciilist // display ascii chart
// Block
//keymarkchar // mark character
keymarkcolumn // mark column
keymarkword // mark word
keymarkeol // mark to end of line
keydestroymark // unmark
// copy block to prompt
key
instext (getmarktext)
col getlinelen + 1
end
// paste from clipboard to prompt (cua)
key
oldmark = usemark _ClipName
instext (getmarktext)
usemark oldmark
col getlinelen + 1
end
keycall
// copy from prompt to clipboard (cua)
keycopy
keycopy
// Prompt history
keyprevhist // retrieve prev prompt
keynexthist // retrieve next prompt
keyaskhistory // history popup menu
keyaskhistory // history popup menu
// Exit
keyclose // quit prompt
// non-function keys
key(character) // typeable keys
write character
end
// filename completion
keyaskcomplete // filename completion
keyaskcomplete
end
// -------------------------------------------------------------------
// Edit windows
// -------------------------------------------------------------------
object edit
// Controls
function 'ð'
close // close window
end
// Menu
keygotobar // to last menu bar item
keygotomenu "search" // to search menu (cua)
keygotomenu "fold" // to fold menu (cua)
keygotomenu "block" // to block menu (cua)
keygotomenu "edit" // to edit menu (cua)
keygotomenu "text" // to text menu (cua)
// Cursor
keyup // move cursor up
keydown // move cursor down
// Cursor + CUA-marking
keyup
smark
keydown
smark
keyenter // enter key
keyenter // keypad enter key
key
if getmarkbuf == getcurrbuf then
deleteblock // delete selected text
else
delchar2 // delete character
end
end
keybacksp // delete left char
keydelword _CSet // delete right word
key
if getmarkbuf == getcurrbuf then
shiftblock _TabWidth // shift block
else
tabright // tab right
end
end
key
if getmarkbuf == getcurrbuf then
shiftblock -_TabWidth // shift block
else
tableft // tab left
end
end
keyprevword // find left word
smark // cua marking
keynextword // find right word
smark // cua marking
// Scroll
keypagedown // page down
keypageup // page up
// Scroll + CUA-marking
keypagedown
smark
keypageup
smark
keyrow 1 // to file top
smark
keyrow (getlines) // to file bottom
smark
// scroll up one line
key
rollrow -1
if getrow <> getviewbot then
down
end
end
// scroll down one line
key
rollrow 1
if getrow <> getviewtop then
up
end
end
// File
keyaskopen // open prompt (cua)
keyaskopen // open prompt (cua)
keyaskinsert // open and insert prompt
keyaskname // rename prompt
keysave // save file (cua)
keysave // save file (cua)
keyopen "*.*" // display file manager
keyclose // close window (cua-win)
keyclose // close window
keycloseall // close all windows (cua-win)
//keyclose 's' // close window
// Edit
keyundo // undo last change (cua)
keyundo // undo last change (cua)
keyredo // redo last change (cua) ??
keyredo // redo last change (cua)
// clipboard keys
keycut // cut (cua)
keycut (if? (shiftkey?) 'a') // cut/cut-append (cua)
keycopy // copy (cua)
keycopy (if? (shiftkey?) 'a') // copy/copy-append (cua)
keypaste // paste (cua)
keypaste (if? (shiftkey?) 'o') // paste/paste-over (cua)
keyclear // clear clipboard (cua)
key
if shiftkey? then
paste 'w' // paste from windows
else
copy 'w' // copy to windows
end
end
// cut/cut-append current line
key
undobegin
oldmark = usemark 'T'
markline
cut (if? (shiftkey?) 'a')
usemark oldmark
undoend
end
// Window
//keycopywin // copy window
keysplitwin 'v' // split window vertical
keytoolbar // display tool bar
// Block
keymarkline // mark line
keymarkpara "tb" // mark paragraph
keycopyblock2 // copyblock
keymoveblock2 // move block
keymoveblockover // move block over
keydeleteblock2 // delete block
keyshiftblock -1 // unindent block
keyshiftblock 1 // indent block
keyfillblock2 // fill block with string
keyformatblock2 // reformat block
keyformatblock2 "rj" // reformat & right just block
keysaveblock2 // save block
keysortblock2 // sort block
keycaseblock // change block to uppercase
keyquote // quote a block
keyjustblock2 'c' // center a block
// Search
keyaskfind // find prompt (cua)
keyaskfind // find prompt
keyaskfind // find prompt (win)
keyaskrepl // replace prompt ??
keyisearch // incremental search
keyaskfindo // find occurrences
keyfindlast // do last find/replace
keyquickbook // set quick bookmark
keyaskrow // go to line prompt
keysearch2 "f/f" // go to next fold
keygotomatch2 // find matching char
keygotoerror // go to compiler error
// place bookmarks (ms-dos edit)
key<0> placebook '0'
key<1> placebook '1'
key<2> placebook '2'
key<3> placebook '3'
key<4> placebook '4'
key<5> placebook '5'
key<6> placebook '6'
key<7> placebook '7'
key<8> placebook '8'
key<9> placebook '9'
// goto bookmarks (ms-dos edit)
key<0> gotobook2 '0'
key<1> gotobook2 '1'
key<2> gotobook2 '2'
key<3> gotobook2 '3'
key<4> gotobook2 '4'
key<5> gotobook2 '5'
key<6> gotobook2 '6'
key<7> gotobook2 '7'
key<8> gotobook2 '8'
key<9> gotobook2 '9'
// Fold
keyfoldline // fold next line
keyfoldline 'u' // unfold next line
keydestroyfold2 // destroy closed/open fold
key// open or close fold
if fold? then
openfold
else
closefold
end
end
keyfoldall 'os' // open all folds
keyfoldall 'cs' // close all folds
// Text
keyinsline2 // insert line
keydelline // delete line
keyjoinline // join line
keyinsline (gettext) // duplicate line
keyswapline // swap line
keycenterline // center line
keycommentline // comment/uncomment line
keytimestamp // date/time stamp
keytabfile // expand tabs
keyhiliteword // highlight words
// Set
keysetting 'L' TOGGLE // live word wrap toggle
keysetting 'D' TOGGLE // line draw toggle
// Macro
keycompilemacro2 (getbufname) // compile current file
keyrunmacro2 (getbufname) // run current file
// non-function (typeable) keys
key(character) // typeable keys
write character
end
// Other
key askrepkey // repeat entered keys
// invoke a spell checker from within an edit window
// (replace 'jspell' with your favorite spell checker)
key
save // save the current file
run "jspell " + getbufname "ck" // call spellchecker
reopen // reopen current file
end
// -------------------------------------------------------------------
// File Manager windows
// -------------------------------------------------------------------
object fmgr
// Menu activation
keygotomenu "mark" // to mark menu (cua)
keygotomenu "command" // to command menu (cua)
keygotomenu "sort" // to sort menu (cua)
keygotobar2 // to drive menu bar
// Cursor
keyrollcol -1 // scroll left one column
keyrollcol 1 // scroll right one column
keycol 1 // scroll to column one
keyup // move cursor up
keydown // move cursor down
keyfmark // mark files
up
keyfmark // mark files
down
// file manager commands (single character command codes)
key(c)
// toggle file mark
if c == ' ' then
fmark
//commands
elseif shiftkey? then
case locase c
when 'o' fopen 'o' // open file/directory
when 'e' fopen 'e' // open file/directory
when 'z' fopen "ze" // open maximized
when 'b' fopen 'b' // open binary file
when 'y' fopen "be" // open binary in one window
when 'k' openkey2 (getffile) // open key macro file
when 'm' fmove // move file
when 'c' fcopy // copy file
when 'd' fdelete // delete file
when 'n' frename // rename file
when 'r' frun 'c' // run program/batch file
when 'p' fprint // print file
when 'a' fattr // change file attributes
when 't' ftouch // touch file
// spell checker
when 's' run "jspell " + getffile "ck"
// unarchive .ZIP or .LZH files
when 'u'
f = getffile
run (if? (pos ".lzh" f 'i') "lha e " "pkunzip ") + f "ck"
reopen
// view .ZIP or .LZH archives
when 'v'
f = getffile
runcap (if? (pos ".lzh" f 'i') "lha v " "pkunzip -v ") + f
end
// hotkey to files
else
onhotkey c
end
// File
keyfup // parent directory
// Mark
keyfmark "ma" // mark all files
keyfmark "ua" // unmark all
// Command
keyfopen '1' // open file (one only)
keyfopen 'q' // open file (close fmgr)
keyfdelete // delete file
// Sort
keyfsort 'n' // sort by name
keyfsort 'e' // sort by extension
keyfsort 'd' // sort by date/time