[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Assign_Pressed_Hook


Purpose   Assigns a procedure that will be called every time a key is
          pressed.

Decln.    Assign_Pressed_Hook(Proc: Key_Pressed_Type);

Remarks   Proc is the name of the procedure to Hook into the GetKey
          routine. The procedure must be declared far with 1 passed
          parameter; a variable character. The hooked procedure is passed
          the character that the user just pressed. The character can be
          modified to any value before being returned to GetKey.

Example

    {$F+}
    PROCEDURE GLOBAL_TASKS(VAR C : CHAR);
    BEGIN
        CASE C OF
        F1  : HELP_ROUTINES;
        ALTX: EXIT_ROUTINES;
        END; {CASE}
    END;
    {$F}

BEGIN
    ....
    ASSIGN_PRESSED_HOOK(GLOBAL_TASKS);
    ....
END;

This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
programmers should replace the procedure with the statement:

     KTTT.PRESSEDHOOK := @GLOBAL_TASKS;

See Also: GetKey Assign_Idle_Hook
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson