home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / mailpro / getkeu.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-08-23  |  625 b   |  37 lines

  1. unit GetKeU;
  2.  
  3. interface
  4. uses Crt;
  5. procedure GetKey(var Ch: char; var FunctionKey: boolean);
  6. function ReturnKey(var FunctionKey: boolean): char;
  7.  
  8. implementation
  9.  
  10. procedure GetKey;
  11. begin
  12. FunctionKey := false;
  13. while not KeyPressed do begin end;
  14. Ch := ReadKey;
  15. if (Ch = #0) and KeyPressed then
  16.    begin
  17.    FunctionKey := true;
  18.    Ch := ReadKey;
  19.    end;
  20. end;
  21.  
  22. function ReturnKey;
  23. var Ch:  char;
  24. begin
  25. FunctionKey := false;
  26. while not KeyPressed do begin end;
  27. Ch := ReadKey;
  28. if (Ch = #0) and KeyPressed then
  29.    begin
  30.    FunctionKey := true;
  31.    Ch := ReadKey;
  32.    end;
  33. ReturnKey := Ch;
  34. end;
  35.  
  36. end.
  37.