mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-04 14:51:31 +01:00
DBG Pseudo-terminal: send user input immediately
git-svn-id: trunk@33612 -
This commit is contained in:
parent
0baa3bd505
commit
97db2e450d
@ -5,21 +5,13 @@ inherited PseudoConsoleDlg: TPseudoConsoleDlg
|
||||
DockSite = True
|
||||
object Memo1: TMemo[0]
|
||||
Left = 0
|
||||
Height = 217
|
||||
Height = 240
|
||||
Top = 0
|
||||
Width = 320
|
||||
Align = alClient
|
||||
OnUTF8KeyPress = Memo1UTF8KeyPress
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object Edit1: TEdit[1]
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 217
|
||||
Width = 320
|
||||
Align = alBottom
|
||||
OnKeyPress = Edit1KeyPress
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
|
||||
@ -7,16 +7,15 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, FileUtil,
|
||||
IDEWindowIntf, IDEOptionDefs,
|
||||
Forms, Controls, Graphics, Dialogs, StdCtrls, DebuggerDlg, BaseDebugManager;
|
||||
Forms, Controls, Graphics, Dialogs, StdCtrls, DebuggerDlg, BaseDebugManager, LCLType;
|
||||
|
||||
type
|
||||
|
||||
{ TPseudoConsoleDlg }
|
||||
|
||||
TPseudoConsoleDlg = class(TDebuggerDlg)
|
||||
Edit1: TEdit;
|
||||
Memo1: TMemo;
|
||||
procedure Edit1KeyPress(Sender: TObject; var Key: char);
|
||||
procedure Memo1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
|
||||
private
|
||||
{ private declarations }
|
||||
protected
|
||||
@ -37,11 +36,11 @@ var
|
||||
|
||||
{ TPseudoConsoleDlg }
|
||||
|
||||
procedure TPseudoConsoleDlg.Edit1KeyPress(Sender: TObject; var Key: char);
|
||||
procedure TPseudoConsoleDlg.Memo1UTF8KeyPress(Sender: TObject;
|
||||
var UTF8Key: TUTF8Char);
|
||||
begin
|
||||
if Key <> #13 then exit;
|
||||
DebugBoss.DoSendConsoleInput(Edit1.Text+LineEnding);
|
||||
Edit1.Text := '';
|
||||
DebugBoss.DoSendConsoleInput(Utf8Key);
|
||||
Utf8Key := #0;
|
||||
end;
|
||||
|
||||
procedure TPseudoConsoleDlg.DoClose(var CloseAction: TCloseAction);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user