
                                Key Assignment 

        As mentioned and made reference to in GETKEY.TXT familiarity with
ASCII and it's integral function to programming has several applications
which you may or may not be already familiar with.  One of them is Key-
Assignments.

        Depending on where your interests lie you may have a special need
to call frequently used commands if you're partial to the " command line ".
One thing that I've become extremely accustomed to is " Key-Assignment "

        If you're familiar with ANSI.SYS you may reassign keys through
ANSI escape sequences. To do so follow the below listed guidelines.

1) Refer to ASCII chart (ASCII.EXE) to determine which key combinations
you desire to contain whatever commands you have in mind.

2) There are several routines that can be implemented to invoke the
assignments.  Among them are poking them directly into the ANSI buffer and
via small batch routines.

Ex.

:fkeys.bat
@echo off
echo [sį Saves cursor position
echo [16;"Print "pį This Esc. sequence reassigns Ctrl-P
                       to echo "Print " to the command line
                       with a leading space. Subsequent
                       entries will contain the remainder
                       of the "Print " command. E.g.
                       "Print filename.ext ".
       
        The significance of the 16 is that it's the decimal
          eqivalent of "Ctrl-P"  However, if the case were to
          reassign "Alt-P" as the invoking key combination,
          the Esc. sequence would like this.
                                           
                                           
                                            [0;25;"Print ";13p
                                                             
                              The significance               The ";13" is
                              of the "0" here is that            an optional
                              "Alt-P" is Ext. ASCII and          specifier and
                              the "0" is required if             should be used
                              the assignment should              if your intent
                              happen to be in extended           is to execute
                              ASCII. ASCII tables (ASCII         something W/o
                              .EXE) clearly distinguishes        additional
                              between noramal ASCII and          paramaters.
                              extended.                          13 is also ^M.

        Again, should you desire to know more about ANSI and related functions
consult a more thorough source.

        Something such as key assignment can suffice to be extremely practical
if you're partial to DOS and frequently used commands.  Assigning DIRS to a
key has proven to substantially ease some of the dificulty and redundancy
of command line instructs.  Don't forget, DIRS was programmed out of such
concerns.


Ex.1

echo [0;59;"tm "p         [0;139;"win";13p
                          
     [F1]į Telmate -CR  [Alt-F11]į Windows +CR
                       
                        Carriage Return

Ex.2
echo [0;79;"menu"p        [0;81;"c:\dirs";13p
                          
     [Alt-M]į Menu -CR  [Pg-Dn]į Dirs +CR

Ex.3
echo [1;"ascii";13p
     
     [Ctrl-A]į Ascii.Exe +CR

Ex.4
echo [1;1p
     
      [Resets Ctrl-A]

        The above examples may be included sequentially or not on one or several
lines of the batch file.  Note carefully that Ex.4 alludes that a key can be
reassigned to it's original state.

RNG
