Make KeyPressed act hand by hand with ReadKey (#3036)
This commit is contained in:
parent
087a00b636
commit
e17dd66fd5
|
|
@ -155,9 +155,9 @@ function ReadKey: char;// TODO продумать это
|
|||
var
|
||||
KeyInfo: ConsoleKeyInfo;
|
||||
begin
|
||||
if NextKey <> Chr(0) then
|
||||
if NextKey <> #0 then
|
||||
begin
|
||||
ReadKey := nextkey;
|
||||
ReadKey := NextKey;
|
||||
NextKey := #0;
|
||||
end
|
||||
else
|
||||
|
|
@ -172,7 +172,7 @@ end;
|
|||
|
||||
function KeyPressed: boolean;
|
||||
begin
|
||||
KeyPressed := Console.KeyAvailable;
|
||||
KeyPressed := (NextKey <> #0) or Console.KeyAvailable;
|
||||
end;
|
||||
|
||||
function WindowWidth: integer;
|
||||
|
|
@ -300,4 +300,4 @@ end;
|
|||
begin
|
||||
//zdes oshibka ISConsoleApplication u nas nikogda ne inicializiruetsja
|
||||
__InitModule;
|
||||
end.
|
||||
end.
|
||||
|
|
|
|||
Loading…
Reference in a new issue