ex7.pp 427 B

12345678910111213141516171819202122
  1. program example1;
  2. { This program demonstrates the GetKeyEvent function }
  3. uses keyboard;
  4. Var
  5. K : TKeyEvent;
  6. begin
  7. InitKeyBoard;
  8. Writeln('Press keys, press "q" to end.');
  9. Repeat
  10. K:=GetKeyEvent;
  11. K:=TranslateKeyEvent(K);
  12. If IsFunctionKey(K) then
  13. Writeln('Got function key : ',KeyEventToString(K))
  14. else
  15. Writeln('not a function key.');
  16. Until (GetKeyEventChar(K)='q');
  17. DoneKeyBoard;
  18. end.