fpc/api/unix/testkeyb.pas
2000-10-26 23:08:47 +00:00

31 lines
424 B
ObjectPascal

program raw_read;
uses
keyboard;
var
c : char;
col : byte;
begin
InitKeyboard;
c:=' ';
col:=1;
while c<>'x' do
begin
c:=RawReadKey;
if ord(c)<32 then
begin
write('"#',ord(c),'"');
inc(col,4);
end
else
write(c);
inc(col);
if col>=80 then
begin
writeln;
col:=0;
end;
end;
DoneKeyboard;
end.