I've used this to send text to an annoying popup 3G application with no interface, its a hack be we wern't left with any option.
procedure TForm1.TypeMessage(Msg: string);
var
CapsOn: boolean;
i: integer;
ch: char;
shift: boolean;
key: short;
begin
CapsOn := (GetKeyState( VK_CAPITAL ) and $1) <> 0;
for i:=1 to length(Msg) do
begin
ch := Msg[i];
ch := UpCase(ch);
if ch <> Msg[i] then
begin
if CapsOn then
begin
keybd_event( VK_SHIFT, 0, 0, 0 );
end;
keybd_event( ord(ch), 0, 0, 0 );
keybd_event( ord(ch), 0, KEYEVENTF_KEYUP, 0 );
if CapsOn then
begin
keybd_event( VK_SHIFT, 0, KEYEVENTF_KEYUP, 0 );
end;
end
else
begin
key := VKKeyScan( ch );
// UpperCase
if ((not CapsOn) and (ch>='A') and (ch <= 'Z')) or
((key and $100) > 0) then
begin
keybd_event( VK_SHIFT, 0, 0, 0 );
end;
keybd_event( key, 0, 0, 0 );
keybd_event( key, 0, KEYEVENTF_KEYUP, 0 );
if ((not CapsOn) and (ch>='A') and (ch <= 'Z')) or
((key and $100) > 0) then
begin
keybd_event( VK_SHIFT, 0, KEYEVENTF_KEYUP, 0 );
end;
end;
end;
end;
hope that helps
UPDATE
Edited to allow other characters (non alpha ) ie shifted numerals !"£$ etc.