Make the delete key insert the delete character unused function keys insert a null.
This commit is contained in:
parent
2b92cf26a5
commit
7316f8ad79
34
emulator.pas
34
emulator.pas
|
@ -139,24 +139,48 @@ begin
|
||||||
//Non-ASCII
|
//Non-ASCII
|
||||||
if keypressed then begin
|
if keypressed then begin
|
||||||
Scan := ReadKey;
|
Scan := ReadKey;
|
||||||
|
//The delete key inserts the delete character
|
||||||
|
if Scan = ansichar ($53) then begin
|
||||||
|
Ch := ansichar ($7f);
|
||||||
|
ASCII := true;
|
||||||
|
end
|
||||||
{$ifdef tape}
|
{$ifdef tape}
|
||||||
//Insert a tape in the tape reader
|
//The insert key sets a tape to be read
|
||||||
if Scan = ansichar ($52) then begin
|
else if Scan = ansichar ($52) then begin
|
||||||
writeln ();
|
writeln ();
|
||||||
write ('Tape to be read: ');
|
write ('Tape to be read: ');
|
||||||
readln (TapeInFile);
|
readln (TapeInFile);
|
||||||
if TapeInFile = '' then TapeInFile := ' ';
|
if TapeInFile = '' then TapeInFile := ' ';
|
||||||
TapeInPos := 0
|
TapeInPos := 0;
|
||||||
end;
|
|
||||||
{$endif}
|
|
||||||
ASCII := false;
|
ASCII := false;
|
||||||
end
|
end
|
||||||
|
{$endif}
|
||||||
|
//Unused function keys insert a null
|
||||||
|
else ASCII := true;
|
||||||
|
end
|
||||||
//Null
|
//Null
|
||||||
else ASCII := true;
|
else ASCII := true;
|
||||||
end
|
end
|
||||||
//Other ASCII
|
//Other ASCII
|
||||||
else ASCII := true;
|
else ASCII := true;
|
||||||
until ASCII = true;
|
until ASCII = true;
|
||||||
|
//Bodge for the home and end keys
|
||||||
|
if Ch = ansichar ($37) then begin
|
||||||
|
if keypressed then begin
|
||||||
|
Scan := ReadKey;
|
||||||
|
Scan := ReadKey;
|
||||||
|
Scan := ReadKey;
|
||||||
|
Ch := ansichar (0);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else if Ch = ansichar ($38) then begin
|
||||||
|
if keypressed then begin
|
||||||
|
Scan := ReadKey;
|
||||||
|
Scan := ReadKey;
|
||||||
|
Scan := ReadKey;
|
||||||
|
Ch := ansichar (0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
//Process the keypress
|
//Process the keypress
|
||||||
write (Ch); //Local echo
|
write (Ch); //Local echo
|
||||||
R [X] := byte (Ch);
|
R [X] := byte (Ch);
|
||||||
|
|
Loading…
Reference in New Issue