home *** CD-ROM | disk | FTP | other *** search
- unit GetKeU;
-
- interface
- uses Crt;
- procedure GetKey(var Ch: char; var FunctionKey: boolean);
- function ReturnKey(var FunctionKey: boolean): char;
-
- implementation
-
- procedure GetKey;
- begin
- FunctionKey := false;
- while not KeyPressed do begin end;
- Ch := ReadKey;
- if (Ch = #0) and KeyPressed then
- begin
- FunctionKey := true;
- Ch := ReadKey;
- end;
- end;
-
- function ReturnKey;
- var Ch: char;
- begin
- FunctionKey := false;
- while not KeyPressed do begin end;
- Ch := ReadKey;
- if (Ch = #0) and KeyPressed then
- begin
- FunctionKey := true;
- Ch := ReadKey;
- end;
- ReturnKey := Ch;
- end;
-
- end.
-