home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / HILFEN / MODEM / COMAND28 / REMAP.DOC < prev    next >
Text File  |  1993-12-01  |  23KB  |  825 lines

  1. COM-AND Remap Script
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.           -------------------------------------------
  17.                 COM-AND Remap Script
  18.           Script based compiler for COM-AND remapping
  19.           -------------------------------------------
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.     COM-AND is distributed freely and may be copied by anyone for
  33.     any number of machines, for purposes of evaluation.  The author
  34.     offers COM-AND and its accessory programs as a package, as
  35.     "shareware".  If you USE the program a registration of $50.00 is
  36.     required.  The author may be reached:
  37.  
  38.  
  39.                  CABER Software
  40.                  R. (Scott) McGinnis
  41.                  P.O. Box 3607 Mdse Mart
  42.                  Chicago, IL 60654-0607
  43.  
  44.                  PLINK, GEnie id: TARTAN
  45.                  CIS id: 73147,2665
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. Version 1.2: 910711
  55.  
  56. COM-AND Remap Script
  57.  
  58.  
  59.                  Table of Contents
  60.                  -----------------
  61.  
  62. I.    Introduction  .............................................. page 1
  63.  
  64.     A. What is COM-AND ......................................... page 1
  65.     B. Terminal Emulation ...................................... page 1
  66.     C. The REMAP Script ........................................ page 1
  67.  
  68. II.    Running REMAP.CMD .......................................... page 2
  69.  
  70. III.    REMAP source files ......................................... page 3
  71.  
  72.     A. Comments ................................................ page 3
  73.     B. Section names ........................................... page 3
  74.     C. Redefinitions ........................................... page 3
  75.     D. Remapped keys within redefinitions ...................... page 5
  76.  
  77. IV.    DOORWAY Remaps ............................................. page 6
  78.  
  79. V.    Program Requirements ....................................... page 7
  80.  
  81. VI.    Program and Author Information    ............................ page 8
  82.  
  83.  
  84.                 Appendices
  85.                 ----------
  86.  
  87.  
  88. A.    File structures ............................................ page 9
  89.  
  90. B.    Syntax ..................................................... page 10
  91.  
  92. C.    Tokens ..................................................... page 11
  93.  
  94. D.    Sample file ................................................ page 12
  95.  
  96. E.    Unusual Remaps ............................................. page 13
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. Version 1.2: 910711
  110.  
  111. COM-AND Remap Script                             Page   1
  112.  
  113.  
  114. I.    Introduction
  115.  
  116.  
  117.     A. What is COM-AND?
  118.  
  119.  
  120.        COM-AND for the IBM PC and compatibles is a communications program
  121.        that may be used by itself, or with several integrated accessory
  122.        programs (which themselves may be used independently of COM-AND).
  123.        COM-AND provides standard comm program functions:  a dialing
  124.        directory, macros, disc logging, binary and ASCII file transfers,
  125.        scripted execution and so on.
  126.  
  127.  
  128.     B. Terminal Emulation
  129.  
  130.        COM-AND also supports terminal emulation through 'display emula-
  131.        tion', 'translation', and 'keyboard remapping' functions.  These
  132.        functions are independent...  VT100 display emulation may be com-
  133.        bined with the VT100 keyboard remap supplied, or the display
  134.        emulation may be combined with a different remap (one constructed
  135.        to a different set of preferences).
  136.  
  137.  
  138.     C. The REMAP script
  139.  
  140.        The script REMAP.CMD is a compiler of sorts.  It defines 'codes'
  141.        for each key COM-AND can detect (it can't detect all keys) and a
  142.        simple syntax for redefinition.  REMAP.CMD also allows several
  143.        redefinitions to be combined in one source file; each set of
  144.        definitions being given a name.
  145.  
  146.  
  147.        This document discusses the function of the REMAP.CMD script,
  148.        and the syntax used in source files given to REMAP.CMD.
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164. Version 1.2: 910711
  165.  
  166. COM-AND Remap Script                             Page   2
  167.  
  168.  
  169. II.    Running REMAP.CMD
  170.  
  171.  
  172.     The REMAP script is invoked through COM-AND's script processor (F2).
  173.     When invoked, REMAP opens a window offering a menu of choices.    The
  174.     choices are:
  175.  
  176.  
  177.     1) Compile source into a new remap file (COM-AND.RMP)
  178.  
  179.        Compilation of a source file produces a new COM-AND.RMP file
  180.        for use by COM-AND.    The source file name is requested; when
  181.        the source file is opened it is scanned once for 'sections'.
  182.  
  183.        If the source file contains one or more 'sections' (i.e. NAME
  184.        commands) the section names will be listed in a new window, and
  185.        one must be selected.
  186.  
  187.        When a source file contains no sections, or when a section has
  188.        been selected, a new window is opened and the compilation begins.
  189.        Lines of text are displayed within the new window as they are
  190.        processed.  Press ESC to pause the compilation.
  191.  
  192.     2) Syntax check a source file
  193.  
  194.        REMAP allows a syntax check as well as compile.  A syntax check
  195.        results in no change to the current COM-AND.RMP.
  196.  
  197.     3) Search for files (Alt-F)
  198.  
  199.        REMAP allows you to search for files using the Alt-F file
  200.        directory function of COM-AND.
  201.  
  202.     4) Edit a file (you supply the editor)
  203.  
  204.        REMAP allows you to invoke an editor on a source file (the syntax
  205.        for the invocation is assumed - you may wish to change it).    When
  206.        you exit the editor, you are returned to COM-AND and REMAP.
  207.  
  208.     5) Turn remap on (using current COM-AND.RMP map file)
  209.  
  210.     6) Turn remap off
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Version 1.2: 910711
  220.  
  221. COM-AND Remap Script                             Page   3
  222.  
  223.  
  224. III.    REMAP source files
  225.  
  226.  
  227.     REMAP expects an ASCII file as source for the compilation.  ASCII
  228.     files are prepared by text editors (e.g.  EDLIN).  Word processors
  229.     usually do not emit ASCII files...  if you wish to use a word pro-
  230.     cessor to prepare a source file for REMAP, be sure that it gives
  231.     you ASCII output (often called non-document format).
  232.  
  233.  
  234.     [NOTE:    The REMAP script allows you to invoke a text editor or word
  235.     processor from within the script itself.  Modify the first line of
  236.     the script to declare the complete program name (e.g.  C:\PE.EXE).
  237.     If you leave it blank, REMAP will query for a program name.]
  238.  
  239.  
  240.     Lines of source to REMAP.CMD are limited in length to 80 characters.
  241.     Source files contain three types of lines:
  242.  
  243.  
  244.     A. Comments
  245.  
  246.        Comment lines are blank, or begin with ";" or "*".  They are
  247.        ignored by the compiler.
  248.  
  249.     B. Section names
  250.  
  251.        The source file may (optionally) be divided into several sections
  252.        through the inclusion of "NAME = ..." command lines.  REMAP scans
  253.        the file before compilation; if section names are found, a window
  254.        is opened and you are asked to select a section to compile.
  255.  
  256.     C. Redefinitions
  257.  
  258.        All other lines of a source file are redefinitions.    A redefin-
  259.        ition command declares that a given key is to be redefined as
  260.        another key or keys.  For example:
  261.  
  262.        A = B    ; redefines the 'A' key as 'B'
  263.        0x1a = AltX    ; Redefines control-z (0x1a) as Alt-X
  264.        0x80 = F2 "remap.cmd!"
  265.  
  266.  
  267.        The last example requires some explanation...  0x80 is 80 hex.
  268.        to get an 80 hex using the keyboard, press and hold the ALT key
  269.        while typing 1 2 8 on the numeric pad (128 decimal is 80 hex).
  270.  
  271.  
  272.  
  273.  
  274. Version 1.2: 910711
  275.  
  276. COM-AND Remap Script                             Page   4
  277.  
  278.  
  279. III.    REMAP source files (continued)
  280.  
  281.  
  282.     C. Redefinitions (continued)
  283.  
  284.        The last example declares that when you type 80 hex (alt-1-2-8),
  285.        COM-AND will see F2, then the string "remap.cmd" then a carriage
  286.        return (the "!" at the end is a carriage return).
  287.  
  288.        You may declare a string using the usual conventions for macro
  289.        strings or may declare the keystrokes individually.    For example,
  290.  
  291.        0x80 = A B C CR    ; and
  292.        0x80 = "ABC!"        ; and
  293.        0x80 = "AB" CR       ; and
  294.        0x80 = "AB^M"
  295.  
  296.  
  297.        are equivalent strings.  The "CR" in the first example is a
  298.        carriage return token defined by REMAP.  The "!" in the second
  299.        example is transformed to a carriage return (to declare a "!"
  300.        itself, type "!!").  The "^M" in the fourth line is 'control-M",
  301.        another way to say carriage return (to declare "^" by itself,
  302.        enter it as "^^").
  303.  
  304.  
  305.        The left side of the equals must be a token defined by the remap
  306.        script;  the tokens are listed in the appendices below.
  307.  
  308.  
  309.        The redefinition may be any one token or character or group of
  310.        characters and characters.  Blanks (" "), commas (",") and
  311.        semi-colons (";") must be declared within quotes;  REMAP treats
  312.        those characters as delimiters.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329. Version 1.2: 910711
  330.  
  331. COM-AND Remap Script                             Page   5
  332.  
  333.  
  334. III.    REMAP source files (continued)
  335.  
  336.  
  337.     D. Remapped keys within redefinitions
  338.  
  339.        The remapping routines of COM-AND perform remapping on remaps
  340.        themselves, with one exception.  Any redefinition more than one
  341.        ASCII key or one function key in length will ITSELF be subject
  342.        to remapping.  For example:
  343.  
  344.        ^PgDn = PgDn     ; Remap COM-AND's download ftn to ^PgDn
  345.        PgDn = ^PgDn "1!"    ; Automatically select WXMODEM on PgDn
  346.  
  347.  
  348.        The second remap (the remap of the PgDn key) translates to the
  349.        sequence: PgDn (COM-AND's download select window), "1" and CR.
  350.        The ^PgDn is remapped itself to invoke PgDn when executed.
  351.  
  352.  
  353.        This is particularly important to recognize when remapping COM-
  354.        AND defined keys (such as PgDn, PgUp, F10, etc).  The new sequence
  355.        assigned to the key will probably be more than one keystroke (one
  356.        ASCII key or one function key) in length and if so, is subject to
  357.        remapping itself.  Be aware!
  358.  
  359.  
  360.        The original function that has been remapped may be assigned to
  361.        another key (usually one not used by COM-AND or the remap).    To
  362.        avoid remapping of the remap the assignment MUST be limited to
  363.        a single key (one ASCII key or one function key).
  364.  
  365.  
  366.        The example above demonstrates: the first line, '^PgDn = PgDn',
  367.        declares that Control-PgDn will function as the original COM-AND
  368.        download protocol select window.  As it is one keystroke (PgDn)
  369.        in length, it is not remapped itself.  The second line, 'PgDn =
  370.        ^PgDn "1!"' declares that the PgDn key itself will invoke the
  371.        download selection window, and select item #1.
  372.  
  373.  
  374.        One last note, had the second line above been written 'PgDn =
  375.        PgDn "1!"', the remap would be circular... and if allowed would
  376.        loop indefinitely.  The REMAP script prohibits simple circular
  377.        definitions.
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384. Version 1.2: 910711
  385.  
  386. COM-AND Remap Script                             Page   6
  387.  
  388.  
  389. IV.    DOORWAY Remaps
  390.  
  391.  
  392.     Considerable interest was expressed to the author about COM-AND 2.7's
  393.     use with the DOORWAY utility (and similar facilities).    DOORWAY is
  394.     a communications program for the PC making certain programs (not
  395.     graphics mode) or DOS available to a remote caller.  The host display
  396.     is transmitted to the remote caller in ANSI format, and received key-
  397.     strokes from the remote caller are made to appear (to the program, or
  398.     DOS) as if typed from the local keyboard.
  399.  
  400.  
  401.     The one problem with DOORWAY and DOORWAY-like functions is the set
  402.     of non-ANSI keys (e.g. F1-F10, Alt'd keys and so on).  On the remote
  403.     caller's PC, in COM-AND, function and Alt'd keys invoke special func-
  404.     tions - how to send them to the DOORWAY host?
  405.  
  406.  
  407.     A simple (but tedious) remap can be made to redefine COM-AND function
  408.     and Alt'd keys to sequences that are transmitted.  However, when the
  409.     remap is enabled, all special functions in COM-AND (tied to those
  410.     function and Alt'd keys) are disabled.
  411.  
  412.  
  413.     No matter... with COM-AND version 2.7 this remap was used, and used
  414.     successfully, with DOORWAY.  One key was reserved for a remap that
  415.     toggled the remapping itself... making it very usable.    [In one case,
  416.     the Alt-equal key was remapped to invoke a script that turned remap
  417.     ON if it was OFF, and OFF it is was ON.  All other function and Alt'd
  418.     keys were transformed into the two byte sequence required by
  419.     DOORWAY when the remap was enabled.]
  420.  
  421.  
  422.     With version 2.8, the Alt-hyphen combination toggles 'remote' mode.
  423.     In remote mode, function and Alt'd keys are transmitted to a DOORWAY
  424.     or DOORWAY-like utility.  Alt-hyphen serves as a toggle, making it
  425.     the one key that is NOT transmitted.  Should Alt-hyphen itself be
  426.     needed by the application, it may be transmitted through a script.
  427.  
  428.  
  429.     Remapping is needed to meet many needs.  However, innovations in the
  430.     use of COM-AND generally come from its user-base.  As the author be-
  431.     comes acquainted with the real world needs of his customers, COM-AND
  432.     is extended and improved.
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439. Version 1.2: 910711
  440.  
  441. COM-AND Remap Script                             Page   7
  442.  
  443.  
  444. V.    Program requirements
  445.  
  446.  
  447.     This program can only function on an IBM PC or DOS compatible
  448.     machine.  COM-AND does direct to screen buffer fetches and stores
  449.     (unless BIOS screen updates are directed using the /C switch or the
  450.     Alt-O options menu).
  451.  
  452.  
  453.     COM-AND is TopView aware even without the /C switch or Alt-O option.
  454.  
  455.  
  456.     COM-AND supports MDA, CGA, EGA and Hercules.  COM-AND uses a Micro-
  457.     soft Mouse if one is available...
  458.  
  459.  
  460.     COM-AND disk I/O is done through the 'Handle' oriented I/O routines
  461.     added to DOS 2.0.  Therefore DOS 2.0 is a minimum requirement.
  462.  
  463.  
  464.     COM-AND (Version 2.8) requires 256K for itself.  You need 384K to
  465.     take advantage of the DOS Gateway and to load accessories.
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494. Version 1.2: 910711
  495.  
  496. COM-AND Remap Script                             Page   8
  497.  
  498.  
  499. VI.    Author information
  500.  
  501.  
  502.     COM-AND was written using Microsoft Macro-Assembler.  The author
  503.     likes assembler.  Assembly language is an entirely appropriate
  504.     vehicle for some of the program, and a not-inappropriate vehicle
  505.     for the rest of it.  Everything, in moderation...
  506.  
  507.  
  508.     The author of this program is R. Scott McGinnis of Chicago, IL.
  509.     PLINK and GEnie ID:  TARTAN.  Comment and suggestions (and criticism
  510.     in moderation) are welcomed:
  511.  
  512.              CABER Software
  513.              R. (Scott) McGinnis
  514.              P.O. Box 3607 Mdse Mart
  515.              Chicago, IL 60654-0607
  516.  
  517.  
  518.     I thank my wife, Elizabeth, who I love dearly.
  519.  
  520.  
  521.     This script (Version 1.2) may be distributed freely (but it isn't a
  522.     whole lot of use without COM-AND).  Any improvements that are sug-
  523.     gested to the author will get attention...  errors reported to the
  524.     author will be corrected.  COM-AND is shareware.  If COM-AND is USED
  525.     after a reasonable period of evaluation, a registration of $50.00 is
  526.     required.
  527.  
  528.  
  529.     Most of the hardware names and software names in this document are
  530.     trademarks or trade names of specific manufacturers.
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549. Version 1.2: 910711
  550.  
  551. COM-AND Remap Script                             Page   9
  552.  
  553.  
  554. A.    File structures
  555.  
  556.     COM-AND.RMP            ; 768 bytes maximum
  557.  
  558.        Entries are structured:
  559.  
  560.       byte  0          1     2                 ...
  561.         +---------+---------+---/ /---+---/ /---+---/ /---+
  562.         ! Key     ! Length    ! Redefinition for length     !
  563.         +---------+---------+---/ /---+---/ /---+---/ /---+
  564.  
  565.         where 'key' refers to an ASCII key value
  566.  
  567.         or as:
  568.  
  569.       byte  0          1     2      3                   ...
  570.         +---------+---------+---------+---/ /---+---/ /---+---/ /---+
  571.         ! 0       ! Key    ! Length  ! Redefinition for length    !
  572.         +---------+---------+---------+---/ /---+---/ /---+---/ /---+
  573.  
  574.         where '0/key' refers to an extended scancode as defined by BIOS.
  575.  
  576.  
  577.         The table size is taken by the files size.    Optionally, 0,0
  578.         in an entry's first two bytes end the table.
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604. Version 1.2: 910711                           Appendices
  605.  
  606. COM-AND Remap Script                             Page  10
  607.  
  608.  
  609. B.    Syntax
  610.  
  611.  
  612.     REMAP.CMD defines a simple language for remapping.  Special keys
  613.     (such as F1) are given 'names' (Function key F1 is 'F1').  A simple
  614.     syntax is defined to redefine any key COM-AND can detect (it cannot
  615.     detect all keys or key-combinations).  REMAP.CMD expects to be given
  616.     a source file prepared with a text editor (like a script).  It com-
  617.     piles the source file into COM-AND.RMP.
  618.  
  619.     Lines of source in REMAP.CMD are limited to 80 characters.  The
  620.     script REMAP.CMD defines lines with three types of syntax.
  621.  
  622.     .  Comments: Comment lines are blank, or begin with ";" or "*"
  623.  
  624.     .  Sections: The source file can be divided into up to 15 sections
  625.              and separately compiled) with the in-line command:
  626.  
  627.              NAME = <name for display>
  628.  
  629.     .  Remaps:   Within a section, a remapping has the syntax:
  630.  
  631.              <token> = <newkey>
  632.  
  633.              The list of defined tokens is given below.  The <new-
  634.              key(s)> operand has the form:
  635.  
  636.              (<token>!<char>!<str>!<num>) [(" "!"," <newkey>] [";"]
  637.  
  638.              where "(...)" indicates a mandatory choice, "!"
  639.              indicates 'or', and "[...]" indicates an optional
  640.              choice.  The final optional semi-colon allows in-line
  641.              comments following.  For example:
  642.  
  643.              F10 = F10
  644.              0x80 = F2 "remap.cmd!" ; Alt-1-2-8 (80 hex) invokes it
  645.  
  646.              <Char> denotes a single character (with exception of
  647.                 ";", " " and ",").
  648.              <Str>  denotes a double-quote delimited string.  Within
  649.                 strings, ^^ -> ^, !! -> !, `x -> x, and the rules
  650.                 for macro strings otherwise apply.
  651.              <Num>  denotes a hex numeric (e.g. 0x80).
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659. Version 1.2: 910711                           Appendices
  660.  
  661. COM-AND Remap Script                             Page  11
  662.  
  663.  
  664. C.    Tokens
  665.  
  666.  
  667.     Tokens defined in REMAP.CMD are:
  668.     ------------------------------------------------
  669.     Normal                    Shifted
  670.     --------------------------------------- --------
  671.     F1    CurL    CR    (any single    SF1
  672.     F2    CurR    BS     key: e.g. A,    SF2
  673.     F3    CurUp    BELL     case being    SF3
  674.     F4    CurDn    INS     significant)    SF4
  675.     F5    End    DEL            SF5
  676.     F6    Home    TAB    (any single    SF6
  677.     F7    PgDn        key in quotes:    SF7
  678.     F8    PgUp        e.g. "A", case  SF8
  679.     F9    Tab        significant)    SF9
  680.     F10    Esc                SF10
  681.             (decimal/hex numerics)    RevTab
  682.     -----------------------------------------------
  683.     Control
  684.     -----------------------------------------------
  685.     CF1    ^F1    ^A    ^K    ^U    ^PrtSc
  686.     CF2    ^F2    ^B    ^L    ^V    ^CurL
  687.     CF3    ^F3    ^C    ^M    ^W    ^CurR
  688.     CF4    ^F4    ^D    ^N    ^X    ^End
  689.     CF5    ^F5    ^E    ^O    ^Y    ^Home
  690.     CF6    ^F6    ^F    ^P    ^Z    ^PgDn
  691.     CF7    ^F7    ^G    ^Q    ^@    ^PgUp
  692.     CF8    ^F8    ^H    ^R    ^[
  693.     CF9    ^F9    ^I    ^S    ^\
  694.     CF10    ^F10    ^J    ^T    ^]
  695.     -----------------------------------------------
  696.     Alt'd
  697.     -----------------------------------------------
  698.     AF1    AltF1    AltA    AltK    AltU    Alt0 (not numeric pad)
  699.     AF2    AltF2    AltB    AltL    AltV    Alt1
  700.     AF3    AltF3    AltC    AltM    AltW    Alt2
  701.     AF4    AltF4    AltD    AltN    AltX    Alt3
  702.     AF5    AltF5    AltE    AltO    AltY    Alt4
  703.     AF6    AltF6    AltF    AltP    AltZ    Alt5
  704.     AF7    AltF7    AltG    AltQ        Alt6
  705.     AF8    AltF8    AltH    AltR        Alt7
  706.     AF9    AltF9    AltI    AltS    Alt-    Alt8
  707.     AF10    AltF10    AltJ    AltT    AltEq    Alt9
  708.     -----------------------------------------------
  709.     Other
  710.     -----------------------------------------------
  711.     FUNCTN (operand only... produces 0/0x80 for COM-AND TV950)
  712.     NULL   (Equivalent to Alt_NumericKeyPad_0)
  713.  
  714. Version 1.2: 910711                           Appendices
  715.  
  716. COM-AND Remap Script                             Page  12
  717.  
  718.  
  719. D.    Sample file
  720.  
  721.  
  722.     A sample source file, REMAPS.TXT, is supplied with this document.
  723.     It contains several sections, with appropriate names, for terminals
  724.     COM-AND supports (or would like to support!).  One section of the
  725.     file is presented here as an example:
  726.  
  727.     name = VT100
  728.     ;
  729.     ;    VT100 definitions
  730.     ;
  731.     DEL   = 0x7f                ; Character delete
  732.     CurUp = ESC [ 0x41            ; Cursor up
  733.     CurDn = ESC [ 0x42            ; Cursor down
  734.     CurL  = ESC [ 0x44            ; Cursor left
  735.     CurR  = ESC [ 0x43            ; Cursor right
  736.     Home  = ESC [ 0x48            ; Home cursor
  737.     End   = ESC [ 0x4b            ; Erase to end of line
  738.     ^PgDn = ESC [ 0x48 ESC [ " "  0x4A  ; Clear screen
  739.     ^PgUp = ESC [ 0x4D            ; Delete line
  740.     ^Home = ESC [ 0x4c            ; Insert line
  741.  
  742.     AF1   = ESC O q             ; Keypad application mode 1
  743.     AF2   = ESC O r             ; Keypad application mode 2
  744.     AF3   = ESC O s             ; Keypad application mode 3
  745.     AF4   = ESC O t             ; Keypad application mode 4
  746.     AF5   = ESC O u             ; Keypad application mode 5
  747.     AF6   = ESC O v             ; Keypad application mode 6
  748.     AF7   = ESC O w             ; Keypad application mode 7
  749.     AF8   = ESC O x             ; Keypad application mode 8
  750.     AF9   = ESC O y             ; Keypad application mode 9
  751.     AF10  = ESC O p             ; Keypad application mode 0
  752.  
  753.     CF10  = AF10                ; COM-AND uses AF10 as shell
  754.  
  755.     SF1   = ESC O 0x50            ; Program function 1 (PF1)
  756.     SF2   = ESC O 0x51            ; Program function 2 (PF2)
  757.     SF3   = ESC O 0x53            ; Program function 3 (PF3)
  758.     SF4   = ESC O 0x54            ; Program function 4 (PF4)
  759.  
  760.     SF5   = ESC O 0x6d            ; Keypad application mode dash
  761.     SF6   = ESC O 0x6c            ; Keypad application mode comma
  762.     SF7   = ESC O 0x4d            ; Keypad application mode enter
  763.     SF8   = ESC O 0x6e            ; Keypad application mode period
  764.  
  765.  
  766.  
  767.  
  768.  
  769. Version 1.2: 910711                           Appendices
  770.  
  771. COM-AND Remap Script                             Page  13
  772.  
  773.  
  774. E.    Unusual Remaps
  775.  
  776.  
  777.     Keyboard remapping is not necessarily limited to terminal emulation.
  778.     Remaps may be used to replace COM-AND function keys with new (perhaps
  779.     different) functions altogether.
  780.  
  781.  
  782.     A remap may define a string that will be executed by COM-AND (similar
  783.     to the way a macro key might be used).    The string may be text to
  784.     transmit, or any other function key.  For example:
  785.  
  786.         F10 = 255 "HELP" CR
  787.  
  788.     This remap says in effect:  When the F10 key is pressed, COM-AND will
  789.     see the character with value 255, the characters "H" "E" "L" and "P",
  790.     and a CR.  255 as an ASCII character is documented in COM-AND.DOC
  791.     under Alt-M Macros.  The character 255 in COM-AND has the same
  792.     function as F2 (run a script), but does not pop up a window and
  793.     search the drive for all files *.CMD and *.ENF.  "HELP" would be
  794.     interpreted by the 255 function as a script name (either HELP.,
  795.     HELP.CMD or HELP.ENF on the default or COM-AND= subdirectory).    The
  796.     CR causes the 255 function to execute the script named HELP.
  797.  
  798.  
  799.     So...  one might write one's own help window (see the help screens in
  800.     FILEMGR or LEARN), call it HELP.CMD, put it in the COM-AND= subdir,
  801.     and never see the author's idea of a HELP summary again.  It might be
  802.     paginated, indexed, what-have-you.
  803.  
  804.  
  805.     Another use for the '255' key is the execution of single script
  806.     statements.  The remap:
  807.  
  808.         AltX = 255 ".BYE"
  809.  
  810.     remaps the Alt-X key to the subsequent characters.  however, when
  811.     Alt-X is pressed, instead of a script being executed named BYE, the
  812.     script statement BYE is executed.  The initial "." signals a script
  813.     statement is to be executed, instead of a script file name.  [By the
  814.     way, this remap avoids the carrier test and query on termination...]
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824. Version 1.2: 910711                           Appendices
  825.