package Keys is

    -- TERMINOLOGY ----------------------------------------------------
    --
    -- script file ... Generated by Editor.Set.Input_Logging_To;
    --                 executable by Editor.Set.Input_From.
    --                 It is a text file with this format:
    --
    --                     Delay_1
    --                     Key_Value_1
    --                     Delay_2
    --                     Key_Value_2
    --                     ...
    --                     Delay_N
    --                     Key_Value_N
    --
    --                 where Delay_i is in milliseconds and Key_Value_i
    --                 depends upon the terminal type.  Both appear as
    --                 Natural'Images.
    --
    -- key file ...... Direct translation of script file that shows
    --                 delay times and key names, thus making it
    --                 easier to edit than the script file.  It is a
    --                 text file with this format:
    --
    --                     Delay_1    Key_Name_1
    --                     Delay_2    Key_Name_2
    --                     ...
    --                     Delay_N    Key_Name_N
    --
    --                 where Delay_i still appears in milliseconds as
    --                 as a Natural'image, and Key_Name_i is the
    --                 Window_Io.Raw.Image of Key_i.
    --
    -- command file .. More extensive translation of script file
    --                 that merges key sequences into Ada commands.
    --                 Delay times are accumulated as Ada comments.
    -------------------------------------------------------------------


    procedure Begin_Logging (Script_File : String := ">>FILE NAME<<";
                             End_Key : String := "F1");
    procedure End_Logging;

    -- Begin_Logging binds the procedure End_Logging to the key
    -- specified by End_Key, then starts logging all keystrokes
    -- (and intermittent delays) to Script_File.  This logging is
    -- terminated by End_Logging.
    --
    -- If End_Key is the null string, then End_Logging is not
    -- bound to any key.


    procedure Disassemble (Script_File : String := "<SELECTION>";
                           Key_File : String := "";
                           Terminal : String := "");
    procedure Assemble (Key_File : String := "<SELECTION>";
                        Script_File : String := "";
                        Terminal : String := "");

    -- Disassemble translates the specified Script_File to a Key_File,
    -- and Assemble performs the inverse translation.  In either case,
    -- the target string defaults to the current output, and the
    -- terminal type defaults to the type of terminal currently in use.
    -- When a different terminal type is specified, it should be
    -- acceptable as a Window_Io.Terminal.


    procedure Pretty_Print (Script_File : String := "<SELECTION>";
                            Command_File : String := ">>FILE NAME<<");

    -- Pretty_Print translates the specified Script_File to the
    -- specified Command_File.


    procedure Total_Delay (Script_Files : String := "<SELECTION>");

    -- Total_Delay sums all of the delay times in the specified
    -- Script_File(s) and prints the total on the current output.


    procedure Run (Script_Files : String := "<SELECTION>";
                   Iterations : Positive := 1;
                   End_Key : String := "F1");

    -- Run directs the editor to read and execute keystrokes from
    -- the specified Script_File(s).  The entire operation will be
    -- repeated as many times as specified by Iterations.
    --
    -- If more than one Script_File or Iteration is specified,
    -- then each of the Script_Files must end with End_Key.


    Error : exception;

    -- Raised only when errors occur and exception propagation is
    -- requested by the current response profile.

end Keys;