Code cleanup

This commit is contained in:
mysticbbs 2013-05-23 20:43:55 -04:00
parent 8c44cf02bb
commit 80571f1c8e
1 changed files with 27 additions and 24 deletions

View File

@ -1,7 +1,7 @@
{$I M_OPS.PAS}
Unit m_Input_Darwin; Unit m_Input_Darwin;
{$I M_OPS.PAS}
Interface Interface
Const Const
@ -26,12 +26,12 @@ Type
KeySend : longint; KeySend : longint;
Function ttyRecvChar : Char; Function ttyRecvChar : Char;
Procedure PushKey(Ch:char); Procedure PushKey (Ch : Char);
Function PopKey:char; Function PopKey : Char;
Procedure PushExt(b:byte); Procedure PushExt(b:byte);
Function FAltKey(ch:char):byte; Function FAltKey(ch:char):byte;
function sysKeyPressed: boolean; Function sysKeyPressed: boolean;
function KeyWait (MS: LongInt) : boolean; Function KeyWait (MS: LongInt) : boolean;
Function KeyPressed:Boolean; Function KeyPressed:Boolean;
Function ReadKey:char; Function ReadKey:char;
Procedure PurgeInputData; Procedure PurgeInputData;
@ -211,10 +211,12 @@ Begin
end; end;
ch:=ttyRecvChar; ch:=ttyRecvChar;
{Esc Found ?} {Esc Found ?}
CASE ch OF CASE ch OF
#27: begin #27: begin
State:=1; State:=1;
WaitMS(10); WaitMS(10);
@ -391,6 +393,7 @@ Begin
#127: PushKey(#8); #127: PushKey(#8);
else PushKey(ch); else PushKey(ch);
End; End;
ReadKey:=PopKey; ReadKey:=PopKey;
End; End;