diff --git a/docs/fseditor.txt b/docs/fseditor.txt index fc560beb08aefdd9d828bce30b9350055edf99e9..8c643c9fe42515326a565d25f1bbb43df4998dd9 100644 --- a/docs/fseditor.txt +++ b/docs/fseditor.txt @@ -39,8 +39,8 @@ K - NOTHING L - Insert line M - Carriage Return N - NOTHING -O - Quick save/exit -P - NOTHING +O - Page Up +P - Page Down Q - Quick abort... FLOW CONTROL CHAR!!! R - Redraw screen S - NOTHING... FLOW CONTROL CHAR!!! @@ -48,9 +48,9 @@ T - NOTHING (Justify Line in SyncEdit) U - Quote V - Toggle insert mode W - Delete word backwards -X - Page Down +X - NOTHING Y - Delete Line -Z - Page Up +Z - Save and exit ESC - NOTHING (ANSI Introducer... use with caution) \ - NOTHING (Want regexp) ] - Move left @@ -65,10 +65,10 @@ CTRL-N - Unselect all CTRL-B - Home (Top of document) CTRL-E - End of document CTRL-J - Down one line +CTRL-O - Page Up +CTRL-P - Page Down CTRL-Q - Quick abort... FLOW CONTROL CHAR!!! CTRL-R - Redraw screen -CTRL-X - Page Down -CTRL-Z - Page Up CTRL-^ - Up one line CTRL-_ - Quick abort (Same as CTRL-Q) SPACE - Toggle sepection of current line @@ -87,14 +87,14 @@ ones fall into three catagories: 3) "Changers" ones I would change in a heartbeat if I had an alternative. The breakdown is as follows: -Keepers: ABCEFGHIJLMRW -Lukewarm: VXY -Changers: OQU_ +Keepers: ABCEFGHIJLMRWZ +Lukewarm: OPVY +Changers: QU_ The reason X and Y are in lukewarm instead of changers is that PgUp/PgDn should be both close together and enterable with one hand in my opinion. -The following CTRL keys are currently unused: DKNPT\ +The following CTRL keys are currently unused: DKNPSTX\ CTRL-Q and CTRL-S I do *not* want to use without alternates as they are the Xon/Xoff chars used in flow control and are sometimes impossible to send from diff --git a/exec/fseditor.js b/exec/fseditor.js index 55f089c8588bb6aef6ccbd5163c7ea7cfce8b97a..489ff1f12553dc7a8745d57271f3d6bf3f1855ef 100644 --- a/exec/fseditor.js +++ b/exec/fseditor.js @@ -1233,7 +1233,7 @@ function quote_mode() case '\x1f': case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */ return(true); - case '\x18': /* CTRL-X (PgDn in SyncEdit) */ + case '\x10': /* CTRL-P */ quote_ypos+=quote_height-1; quote_topline+=quote_height-1; if(quote_ypos>=quote_line.length) @@ -1244,7 +1244,7 @@ function quote_mode() quote_topline=0; draw_quote_window(); break; - case '\x1a': /* CTRL-Z (EOF) (PgUp in SyncEdit) */ + case '\x0f': /* CTRL-O */ quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) @@ -1504,13 +1504,44 @@ function edit(quote_first) case '\x0e': /* CTRL-N */ break; case '\x0f': /* CTRL-O (Quick Save/exit in SyncEdit) */ - var f=new File(system.temp_dir+"INPUT.MSG"); - f.open("w"); - var s=make_strings(true,true); - f.write(s[0]); - f.close(); - return; + if(last_xpos==-1) + last_xpos=xpos; + if(ypos==0) { + console.beep(); + break; + } + ypos-=lines_on_screen-1; + if(ypos<0) + ypos=0; + if(topline>ypos) + topline=ypos; + var i; + for(i=edit_top; i<=edit_bottom; i++) + draw_line(i-edit_top+topline); + xpos=last_xpos; + if(xpos>line[ypos].text.length) + xpos=line[ypos].text.length; + set_cursor(); + break; case '\x10': /* CTRL-P */ + if(last_xpos==-1) + last_xpos=xpos; + if(ypos>=line.length-1) { + console.beep(); + break; + } + ypos+=lines_on_screen-1; + if(ypos>line.length-1) + ypos=line.length-1; + if(ypos>=topline+lines_on_screen) + topline=ypos-lines_on_screen+1; + var i; + for(i=edit_top; i<=edit_bottom; i++) + draw_line(i-edit_top+topline); + xpos=last_xpos; + if(xpos>line[ypos].text.length) + xpos=line[ypos].text.length; + set_cursor(); break; case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */ return; @@ -1574,24 +1605,6 @@ function edit(quote_first) set_cursor(); break; case '\x18': /* CTRL-X (PgDn in SyncEdit) */ - if(last_xpos==-1) - last_xpos=xpos; - if(ypos>=line.length-1) { - console.beep(); - break; - } - ypos+=lines_on_screen-1; - if(ypos>line.length-1) - ypos=line.length-1; - if(ypos>=topline+lines_on_screen) - topline=ypos-lines_on_screen+1; - var i; - for(i=edit_top; i<=edit_bottom; i++) - draw_line(i-edit_top+topline); - xpos=last_xpos; - if(xpos>line[ypos].text.length) - xpos=line[ypos].text.length; - set_cursor(); break; case '\x19': /* CTRL-Y (Delete Line in SyncEdit) */ /* Delete Line */ @@ -1618,25 +1631,12 @@ function edit(quote_first) break; break; case '\x1a': /* CTRL-Z (EOF) (PgUp in SyncEdit) */ - if(last_xpos==-1) - last_xpos=xpos; - if(ypos==0) { - console.beep(); - break; - } - ypos-=lines_on_screen-1; - if(ypos<0) - ypos=0; - if(topline>ypos) - topline=ypos; - var i; - for(i=edit_top; i<=edit_bottom; i++) - draw_line(i-edit_top+topline); - xpos=last_xpos; - if(xpos>line[ypos].text.length) - xpos=line[ypos].text.length; - set_cursor(); - break; + var f=new File(system.temp_dir+"INPUT.MSG"); + f.open("w"); + var s=make_strings(true,true); + f.write(s[0]); + f.close(); + return; case '\x1b': /* ESC (This should parse extra ANSI sequences) */ break; case '\x1c': /* CTRL-\ (RegExp) */