Page 1 of 1

SendKeyEvent does not sent a .(point)

Posted: Tue Feb 11, 2020 3:04 am
by micmorozov
Hello!

i need to send a text to CEF. I do it as follows:

Code: Select all

New(event);
  try
    event.focus_on_editable_field:= 1;
    event.is_system_key:= 0;
    event.modifiers:= EVENTFLAG_NONE;
    event.windows_key_code := Ord(tmp);
    event.native_key_code := Ord(tmp);
    event.character := #0;
    event.unmodified_character := #0;

    event.kind:= KEYEVENT_RAWKEYDOWN;
    ASurfWebBrowserChr.Browser.Host.SendKeyEvent(event);
    event.kind:= KEYEVENT_CHAR;
    ASurfWebBrowserChr.Browser.Host.SendKeyEvent(event);
    event.kind:= KEYEVENT_KEYUP;
    ASurfWebBrowserChr.Browser.Host.SendKeyEvent(event);
  finally
    Dispose(event);
  end;
Еeverything works well, but if tmp='.'; then the point is not displayed in the browser.
Why? How does a dot differ from a comma, for example?

Thanks

Re: SendKeyEvent does not sent a .(point)

Posted: Tue Feb 11, 2020 9:04 am
by salvadordf
Hi,

I haven't tried sending a dot but I just tested the SimpleOSRBRowser demo to see if there was a problem with that particular character and it worked fine.

Run that demo and log all the event information sent to the browser when you press that key. Use the TForm1.AppEventsMessage procedure to log all that information and you will get all the event parameters you need to use TChromium.SendKeyEvent