Hi Guys, I need some help please. I am using this code to send keys to a form:
procedure TForm1.name(ref_name: string);
var
i: Integer;
TempKeyEvent: TCefKeyEvent;
begin
for i := 1 to length(ref_name) do
begin
// WM_KEYDOWN
TempKeyEvent.kind := KEYEVENT_RAWKEYDOWN;
TempKeyEvent.modifiers := 0;
TempKeyEvent.windows_key_code := ord(ref_name);
TempKeyEvent.native_key_code := 0;
TempKeyEvent.is_system_key := ord(false);
TempKeyEvent.character := #0;
TempKeyEvent.unmodified_character := #0;
TempKeyEvent.focus_on_editable_field := ord(false);
Chromium1.SendKeyEvent(@TempKeyEvent);
// WM_CHAR
TempKeyEvent.kind := KEYEVENT_CHAR;
Chromium1.SendKeyEvent(@TempKeyEvent);
// WM_KEYUP
TempKeyEvent.kind := KEYEVENT_KEYUP;
Chromium1.SendKeyEvent(@TempKeyEvent);
end;
end;
This code works well but not with dot (.)
Some idea how solve this issue?
Thanks
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Send keys event dont work with dot
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Send keys event dont work with dot
Hi,
Run the SimpleOSRBRowser demo and log the parameters passed with SendKeyEvent when you press the dot key.
Use TForm1.AppEventsMessage procedure to log that information and repeat it in your application.
Run the SimpleOSRBRowser demo and log the parameters passed with SendKeyEvent when you press the dot key.
Use TForm1.AppEventsMessage procedure to log that information and repeat it in your application.
-
- Posts: 52
- Joined: Sat Dec 09, 2017 4:40 pm
Re: Send keys event dont work with dot
Thanks salvadordf, now works.