[comp.editors] Function Keys

rnelson@eecs.wsu.edu (Roger Nelson - Grad Student) (02/02/91)

-----

I've seen many people comment that function keys slow down productivity:
complaining that using function keys requires one to move the hands off
of home row.

I find that in most cases, commands that one would likely bind to
function keys are commands that one wouldn't want to rush into
(so to speak)  for example: file save/load, paragraph reformating,
line deletion etc.... places where you are going to have to take
extra time to respond to a prompt, or pay more careful attention
to the screen as you position the cursor or something.

OCCASIONAL (commonly used functions should not be out of reach) use of a 
function key also gives the opportunity to let you stretch your hand out a 
little so your hands aren't always scrunched up on home row:-)

I also prefer using a text editor as a file browser.  For this, a full
cursor control keypad is a must (or at least well laid out scrolling
commands bound to the numeric keypad as you find on IBM PC style
keyboards).

When I wrote my UNIX based text editor, I spent quite some time designing the
default keyboard layout so that the command key bindings were easy to
recall, comfortable to reach, and translatable across a variety of
terminals.  Although my editor allows the user to define long Escape,
Ctrl, Meta, Function key sequences (a la emacs and Wordstar), my default
bindings all use less than three key strokes (ie Esc J to join two lines,
Esc Shift J (or Return) to split a line).

Whatever the case, the user should be able to set up his own command
key bindings to whatever he finds comfortable. (I find neither vi nor
emacs default key bindings at all comfortable).

For those that are interested, the following diagram shows the default
command key bindings I used in my text editor.  The numeric keypad layout
is a combination VMS/EDT, Amiga, and IBM-PC style word processor and
text editor keyboard layouts.  Related commands were bound to juxtaposed 
function keys for example f5-f8 were all bound with commands related to 
block or line mode selection (copy, cut, paste, sort etc...).

All REDT commands were also bound to Meta/Home row keys in an intuitive
manner.  For example Meta C, L, W to delete characters, words, lines, and 
Meta Shift C, L, and W to undelete the respective object.  
All scrolling commands were bound to keys such as:   

     Meta {    go to beginning of file 
     Meta }    go to end of file
     Meta <    go to top of screen
     Meta >    go to bottom of screen
     Meta [    go to beginning of line
     Meta ]    go to end of line
     Meta (    go to previous word
     Meta )    go to next word

           +---------------+---------------+---------------+---------------+
Meta/Shift |F17 SPAWN      |F18  BACKWARD  |F19 A.INDNT OFF|F20 SAVE RULER |
  Meta     |(!) SYSTEM     |(@)  OVERWRITE |(#) REFRESH    |($) EDIT RULER |
           +---------------+---------------+---------------+---------------+
  Shift    |F1  SCRIPT     |F2  FORWARD    |F3  AUTO INDENT|F4  LOAD RULER |
UnShifted  |(1) COMMAND    |(2) INSERT MODE|(3) CHNG BUFFER|(4) CHNG RULER |
           +---------------+---------------+---------------+---------------+
                                         
           +---------------+---------------+---------------+---------------+
Meta/Shift |F21            |F22   COUNT    |F23 SUM        |F24 AVERAGE    |
  Meta     |(%) SELECT BOX |(^)   COPY     |(&) SAVE SELECT|(*) UPPERCASE  |
           +---------------+---------------+---------------+---------------+
  Shift    |F5  UNSELECT   |F6    SORT     |F7   TALLY     |F8  INVERT CASE|
UnShifted  |(5) SELECT LINE|(6)   CUT      |(7)  PASTE     |(8) LOWER CASE |
           +---------------+---------------+---------------+---------------+
                                       
           +---------------+---------------+---------------+---------------+
Meta/Shift |F25            |F26            |F27            |F28 TRANS LINE |
  Meta     |(()   QUIT     |())   SAVE     |(_) GET FILE   |(+) SPLIT      |
           +---------------+---------------+---------------+---------------+
  Shift    |F9   ZAP       |F10EDIT FILENAM|F11  LOAD      |F12 TRANS CHAR |
UnShifted  |(9)  EXIT      |(0)  WRITE     |(-) APPEND     |(=) JOIN       |
           +---------------+---------------+---------------+---------------+
                                       
           +---------------+---------------+---------------+---------------+
Meta/Shift |F29SAVE KEY DEF|F30            |F31            |F32  SPELL     |
  Meta     |    REMEMBER   |    FORMAT     |      FIND     | SEARCH&REPLACE|
           +---------------+---------------+---------------+---------------+
  Shift    |F13            |F14            |F15 INCR FIND  |F16EDIT REPLACE|
UnShifted  |     LEARN     |    REPEAT     |    FIND NEXT  |    REPLACE    |
           +---------------+---------------+---------------+---------------+


                                        +--------+--------+--------+--------+
                                        |*  (PF1)| / (PF2)|+  (PF3)|-  (PF4)|
                                        | CENTER |  TRIM  |  TRIM  |UNDELETE|
                                        |        |  LEFT  |  RIGHT |  LINE  |
                                        |   *    |   /    |   +    | DELETE |
                                        +--------+--------+--------+--------+
               With Meta or Shift ----> |7 LEFT  |8 BEGIN.|9 PREV  |Tab  (-)|
                                        | MARGIN | OF FILE|  LINE  |UNDELETE|
                   Unshifted      ----> | BEGIN. | TOP OF |  PREV  |  WORD  |
                                        | OF LINE| SCREEN | SCREEN | DELETE |
                                        +--------+--------+--------+--------+
                                        |4 PAN   |5 GOTO  |6  PAN  |,       |
                                        |  LEFT  | COLUMN |  RIGHT |UNDELETE|
                                        |  PREV  |  GOTO  |  NEXT  |  CHAR  |
                                        |  WORD  |  LINE  |  WORD  | DELETE |
               +--------+               +--------+--------+--------+--------+
               |Up      |               |1 RIGHT |2 END OF|3 NEXT  |Enter   |
               |  PREV  |               | MARGIN |  FILE  |  LINE  |        |
               | SCREEN |               | END OF | BOTTOM |  NEXT  | INSERT |
               |   UP   |               |  LINE  | SCREEN | SCREEN |  CHAR  |
      +--------+--------+--------+      +--------+--------+--------+        |
      |Left    |Down    |Right   |      |0                |. DEFINE|        |
      |  PREV  |  NEXT  |  NEXT  |      |   INSERT LINE   |   KEY  | ENTER  |
      |  WORD  | SCREEN |  WORD  |      |                 |  QUERY | ASCII  |
      |  LEFT  |  DOWN  | RIGHT  |      |    OPEN LINE    |   KEY  |        |
      +--------+--------+--------+      +-----------------+--------+--------+
_____________________________________________________________________
      ______________
____  | ^          |    Roger Nelson          rnelson@yoda.eecs.wsu.edu
\^^ |*| ^          |    Agricultural Engineering Department     ///
 |^^//  ^^         |    Computer Science Department            ///
 |  '  ^          +|    Washington State University        \\\///
 \_  ^    _________|    Pullman, WA 99164                   \XX/
   `-----'