Ovo isto, ali malo drugacije:
Code:
program trap_key;
uses crt;
var
c : integer;
function GetKey : Integer
var
ch : char;
begin
ch := readkey;
if ch = 0 then result := readkey + 256
else result := ch;
end;
begin
repeat
c:=GetKey;
writeln('Code : ',c);
until c<>27;
end.
Inspiration exists, but it has to find us working.