blob: 5495a30cace91a2a27d49e6ddf0683bdffc9eae3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
Program Example2;
{ Program to demonstrate the GetKeyEventCode function. }
Uses keyboard;
Var
K : TKeyEvent;
begin
InitKeyBoard;
Writeln('Press function keys, or press "q" to end.');
Repeat
K:=GetKeyEvent;
K:=TranslateKeyEvent(K);
If (GetKeyEventFlags(K)<>KbfnKey) then
Writeln('Not a function key')
else
begin
Write('Got key (',GetKeyEventCode(K));
Writeln(') : ',KeyEventToString(K));
end;
Until (GetKeyEventChar(K)='q');
DoneKeyboard;
end.
|