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,17 +139,24 @@ begin
|
|||
//Non-ASCII
|
||||
if keypressed then begin
|
||||
Scan := ReadKey;
|
||||
//The delete key inserts the delete character
|
||||
if Scan = ansichar ($53) then begin
|
||||
Ch := ansichar ($7f);
|
||||
ASCII := true;
|
||||
end
|
||||
{$ifdef tape}
|
||||
//Insert a tape in the tape reader
|
||||
if Scan = ansichar ($52) then begin
|
||||
//The insert key sets a tape to be read
|
||||
else if Scan = ansichar ($52) then begin
|
||||
writeln ();
|
||||
write ('Tape to be read: ');
|
||||
readln (TapeInFile);
|
||||
if TapeInFile = '' then TapeInFile := ' ';
|
||||
TapeInPos := 0
|
||||
end;
|
||||
TapeInPos := 0;
|
||||
ASCII := false;
|
||||
end
|
||||
{$endif}
|
||||
ASCII := false;
|
||||
//Unused function keys insert a null
|
||||
else ASCII := true;
|
||||
end
|
||||
//Null
|
||||
else ASCII := true;
|
||||
|
@ -157,6 +164,23 @@ begin
|
|||
//Other ASCII
|
||||
else 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
|
||||
write (Ch); //Local echo
|
||||
R [X] := byte (Ch);
|
||||
|
|
Loading…
Reference in New Issue