uses crt;
const ESC=#27; ENTER=#13; F1=#59;
F10=#68; TAB=#9; SPACE=#32;
UP=#72; DOWN=#80; LEFT=#75; RIGHT=#77;
HOME=#71; END_=#79;
PAGE_UP=#73; PAGE_DN=#81;
var ch:char;
begin
clrscr;
repeat
ch:=Upcase(readkey);
case ch of
'A'..'z': write ('Letter');
SPACE: write ('SPACE');
ENTER: write ('ENTER');
TAB: write ('TAB');
#0: begin
ch:=readkey;
case ch of
F1: write ('F1');
F10: write ('F10');
LEFT: write ('LEFT');
RIGHT: write ('RIGHT');
UP: write ('UP');
DOWN: write ('DOWN');
HOME: write ('HOME');
END_: write ('END');
PAGE_UP: write ('PgUp');
PAGE_DN: write ('PgDn');
end;
end;
else begin
end;
end;
until ch=Esc;
end.