mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 14:40:29 +02:00
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:
parent
23f9d1f9c4
commit
ad9038a66e
@ -35,6 +35,7 @@ type
|
|||||||
procedure Up(Key: Word);
|
procedure Up(Key: Word);
|
||||||
|
|
||||||
procedure Press(Key: Word);
|
procedure Press(Key: Word);
|
||||||
|
procedure Press(StringValue : String);
|
||||||
|
|
||||||
procedure Apply(Shift: TShiftState);
|
procedure Apply(Shift: TShiftState);
|
||||||
procedure Unapply(Shift: TShiftState);
|
procedure Unapply(Shift: TShiftState);
|
||||||
@ -64,6 +65,18 @@ begin
|
|||||||
Up(Key);
|
Up(Key);
|
||||||
end;
|
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);
|
procedure TKeyInput.Apply(Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
if ssCtrl in Shift then Down(VK_CONTROL);
|
if ssCtrl in Shift then Down(VK_CONTROL);
|
||||||
|
Loading…
Reference in New Issue
Block a user