Delphi Chromium Embedded - refresh page with F5

I use Delphi Chromium Embedded in my application and I have the following question: How can I emulate the F5 key to refresh the page?

+5
source share
2 answers

In OnKeyEventuse the following code:

uses
  CEFLib;

procedure TForm1.Chromium1KeyEvent(Sender: TObject;
  const browser: ICefBrowser; event: TCefHandlerKeyEventType; code,
  modifiers: Integer; isSystemKey: Boolean; out Result: Boolean);
begin
  if (event = KEYEVENT_RAWKEYDOWN) and (code = VK_F5) then
  begin
    Result := True;
    Chromium1.Browser.Reload;
  end;
end;
+4
source

@TLama maybe the correct code is similar to this (in dcef3 using delphi7):

    if (event^.kind = KEYEVENT_RAWKEYDOWN) and (event^.windows_key_code = VK_F5) then
0
source

All Articles