macintosh_cookbook/examples/keyboard.pas
2020-05-07 18:47:11 +09:00

15 lines
202 B
ObjectPascal

program ExampleKeyboard;
var
Key: char;
begin
ShowText;
repeat
Write('Press a key. ');
Readln(Key);
Writeln('The ordinal value of this key is ', ord(Key), '.');
until ord(Key) = 22;
end.