blob: 397c5f35a40b9393dd46a9519b28a00f859007d1 (
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
26
27
|
program example6;
{ This program demonstrates the PollShiftStateEvent function }
uses keyboard;
Var
K : TKeyEvent;
begin
InitKeyBoard;
Writeln('Press keys, press "q" to end.');
Repeat
K:=PollKeyEvent;
If k<>0 then
begin
K:=PollShiftStateEvent;
Writeln('Got shift state : ',ShiftStateToString(K,False));
// Consume the key.
K:=GetKeyEvent;
K:=TranslateKeyEvent(K);
end
{ else
write('.')};
Until (GetKeyEventChar(K)='q');
DoneKeyBoard;
end.
|