mouse and key input component: added function to input a string (it was only one char at a time) from javivf (issue #13575)

git-svn-id: trunk@19598 -
This commit is contained in:
vincents 2009-04-24 08:14:58 +00:00
parent 23f9d1f9c4
commit ad9038a66e

View File

@ -35,6 +35,7 @@ type
procedure Up(Key: Word);
procedure Press(Key: Word);
procedure Press(StringValue : String);
procedure Apply(Shift: TShiftState);
procedure Unapply(Shift: TShiftState);
@ -64,6 +65,18 @@ begin
Up(Key);
end;
procedure TKeyInput.Press(StringValue: String);
var
i : Integer;
begin
i :=1;
while (i <= Length(StringValue)) do
begin
Press(Ord(StringValue[i]));
Inc(i);
end;
end;
procedure TKeyInput.Apply(Shift: TShiftState);
begin
if ssCtrl in Shift then Down(VK_CONTROL);