I am using Delphi Chromium Embedded in my application, and I have the following question: How can I emulate F5 key to refresh page ?
In the OnKeyEvent
use 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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With