mysticbbs/mdl/mdltest6.pas

54 lines
1.6 KiB
ObjectPascal

// ====================================================================
// Mystic BBS Software Copyright 1997-2013 By James Coyle
// ====================================================================
//
// This file is part of Mystic BBS.
//
// Mystic BBS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Mystic BBS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Mystic BBS. If not, see <http://www.gnu.org/licenses/>.
//
// ====================================================================
Program Test6;
{$I M_OPS.PAS}
Uses
m_Input,
m_Output;
Var
Keyboard : TInput;
Screen : TOutput;
TempChar : Char;
Begin
Keyboard := TInput.Create;
Screen := TOutput.Create(True);
Screen.WriteLine('MDL: Input/Output test program. (ESCAPE) to Quit');
Screen.SetWindow(1, 3, 80, 25, True);
Repeat
If Keyboard.KeyPressed Then Begin
TempChar := Keyboard.ReadKey;
If TempChar = #27 Then
Break
Else
Screen.WriteLine('Key pressed: ' + TempChar);
End;
Until False;
Keyboard.Free;
Screen.Free;
End.