//for no delphi on my machine, I'm not sure if all are right!
//I think the mathod is good, check it out
1.Set Form's keypreview to true;
2.On Form's OnKeyPress event:
if Sender is TEdit then
begin
if (Sender as TEdit).Name = 'Edit1' then
begin
if Key = yourKey then
begin
Key := nil;
Edit1.Text := Edit1.Text + YourString;//perhaps some insert text mathod
end;
end;
end;
OnKeyDownEvent:
if []=Shift then
case Key of
VK_F1..VK_F12:
begin
wKey := Key-VK_F1+1;
Key := 0;
sKeys := yKeyMaps[wKey];
for i:=1 to Length(sKeys)do
PostMessage(Self.Handle, WM_CHAR, Byte(sKey),0);
end;
end;