home *** CD-ROM | disk | FTP | other *** search
- program STI_KDEM; { demonstration of the STI_KEYS }
- { unit }
- Uses
- CRT, { standard unit }
- STI_KEYS; { the STI_KEYS unit }
-
- Var
- InKeys : KeyRec; { a record for keystrokes }
-
- {---------------------------------------------------------------------------}
-
- procedure Explain; { explain whats going on }
-
- begin
- writeln(' STI_KDEM');
- writeln('');
- writeln(' This is an example of the codes returned from');
- writeln(' the STI_KEYS unit. Press combinations of keys');
- writeln(' to see what happens.');
- end;
-
- {---------------------------------------------------------------------------}
-
- begin
- ClrScr; { clear the screen }
- Explain; { explain whats happening }
- repeat { loop and get keys then show }
- begin { what is happening }
- InKeys := STI_InKey3;
- GotoXY(1,10); Write('Byte 1 : ',InKeys[1],' : ',ord(InKeys[1]),' ');
- GotoXY(1,11); Write('Byte 2 : ' ,' : ',ord(InKeys[2]),' ');
- GotoXY(1,12); Write('Byte 3 : ' ,' : ',ord(InKeys[3]),' ');
- end;
- until InKeys[1] = #27;
- ClrScr; { clear the screen }
- end.