feature_keypressed can be used to determine if the current platform supports calling the built-in function keypressed.
if not supported(feature_keypressed) then
begin
writeln('keypressed not supported on the current platform');
abort
end;
Operating Systems: All
Standard Pascal: No