macintosh_cookbook/examples/keyboard.pas

15 lines
202 B
ObjectPascal
Raw Normal View History

2020-05-07 09:47:11 +00:00
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.