To have FacetTerm automatically create this hotkey each
   time it starts-up, you must make a "keymap" file  and tell
   FacetTerm to load the file via the ".facet" file. First
   create the "keymap" file -- it can be put in the $HOME directory for
   personal use, or in "/usr/facetterm" for system-wide use.  You can name
   the file whatever you want, but if you name it ".facetmap" you won't have
   to specify a filename for FacetTerm in the ".facet" file. In
   this case, let's call it ".facetmap". The format of the "keymap" file is
   simple.  Each hotkey needs a single line starting with "map",
   followed by a <TAB>, the key to re-map, another
   <TAB>, and then the keys you want it mapped to. For example:
   ###########################
   # FacetTerm Hotkey Macros #
   ###########################
   map    ^P     214-985-9901
   Note, each line must start in the first column and lines starting with a
   "#" are considered comment lines that are ignored by
   FacetTerm. Don't forget, the "^P" is literally a
   "^" and a "P" -- not a "<CTRL>P".
   
After the "keymap" file is created, modify the ".facet" file so
   FacetTerm will automatically load the "keymap" file upon
   start-up. Find and uncomment the line in the ".facet" file, "#
   keymap=".
   keymap=
   # keymap=mykeymap
   Note, we didn't need to specify the filename because we used ".facetmap",
   otherwise we would have had to specify the filename after the
   "keymap=".
   
Special characters are specified the same way in "keymap" files as
   they are in "function key" files (see Making FacetTerm Function Key
   Files on page 187 of the manual for details).  A few of the commonly
   used special characters are:  "\s" for SPACE, "\h" for the Window Command
   Line hotkey (default is "<CTRL>W"), and "\r" for RETURN.
   
Hotkeys are a GREAT way to simplify FacetTerm commands. For example:
   #############################
   # FacetTerm Command Hotkeys #
   #############################
   # change to next/previous active window
   map    ^N     \h+\s
   map    ^P     \h-\s
   # toggle between last two windows
   map    ^O     \hl
   # run "mail" program in 1st available window
   map    ^E     \hrmail\r
   # re-activate idle window
   map    ^A     \ha
   # activate screen saver
   map    ^X     \hxsy
   
With a little careful planning, hotkeys can be used to automate complex
   tasks. In this real-life example, our FacetTerm customer is
   running a database program in Window #1 and a spread-sheet in Window #2. The
   job calls for looking up a year-to-date sales figure for each customer from
   the database screen (line 5, columns 10 through 15 to be exact), and then
   inputing it into the spreadsheet. Traditionally, you would manually write
   down the sales figures on a piece of paper and then re-enter them into the
   spreadsheet. However, with FacetTerm, all of this is
   accomplished with the press of a single hotkey at each customer's database
   screen.
   ##############################
   # FacetTerm Masterful Macros #
   ##############################
   # plug YTD sales into spread-sheet
   map    ^T     \hcUddddLrrrrrrrrr\rrrrrr\r\h2\hp\r\h1
   
This is a good example of taking advantage of several
   FacetTerm features.  Let's decode it for better digestion.
   ;-) The keystroke sequence being mapped into the "<CTRL>T"
   hotkey is:
   
\hc           ^Wc - start
      the FacetTerm Copy command
   Udddd          Go to the very
      top line of the screen and then go down 4 lines
   Lrrrrrrrrr    Go to the very left column
      of the screen and then go right 9 columns
   \r            Enter
      RETURN to mark the 1st corner of the Copy Block
   rrrrr         Go to the right
      5 columns
   \r            Enter
      RETURN to mark the 2nd corner of the Copy Block
   \h2           ^W2 - change
      to Window #2
   \hp           ^Wp - paste
      the contents of the copy buffer at cursor in spread-sheet
   \r            Enter
      RETURN to go down one line in spread-sheet
   \h1           ^W1 - change
      back to Window #1 and go on to the next customer
   As you can see, you are only limited by your imagination and the size of
   your keyboard!
   
When picking a key for use as a hotkey, make sure that the key is not
   already being used.  Some keys may already be in use by other applications
   and some may be special keys used by the UNIX system.  For instance, "^S"
   is commonly used as the XOFF character for serial line flow control. Keys
   that are often good to try are: ^Z, ^X, ^N, ^G, ^E, ^T, ^Y, ^O, and ^P.
   While it's generally not a good idea, you can use regular keys as hotkeys.
   It's just as easy to use "T" as a hotkey as it is to use "^T" -- a regular
   "T" is just more likely to be needed in the normal course of data entry.
   Eric Yundt is a member of the FacetCorp Technical Support
   staff and is also FacetCorp WebMaster. He can be reached at
   (214) 985-9901 or by email at
   Eric@FacetCorp.COM.