Hi Salvador,
In CEF I use Chromium1.SendKeyEvent to send a keyboard event to the browser, there is something similar in WebView4?
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.
SendKeyEvent
- salvadordf
- Posts: 4094
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: SendKeyEvent
Hi,
Try using TWVBrowserBase.SimulateKeyEvent.
Read the code comments for that function. It uses the "Input.dispatchKeyEvent" DevTools method :
https://chromedevtools.github.io/devtools-protocol/1-3/Input/#method-dispatchKeyEvent
See the TWVBrowserBase.KeyboardShortcutSearch and TWVBrowserBase.KeyboardShortcutRefreshIgnoreCache functions as an example.
I used the SimpleOSRBrowser demo in CEF4Delphi to get the KeyCode parameter values
Try using TWVBrowserBase.SimulateKeyEvent.
Read the code comments for that function. It uses the "Input.dispatchKeyEvent" DevTools method :
https://chromedevtools.github.io/devtools-protocol/1-3/Input/#method-dispatchKeyEvent
See the TWVBrowserBase.KeyboardShortcutSearch and TWVBrowserBase.KeyboardShortcutRefreshIgnoreCache functions as an example.
I used the SimpleOSRBrowser demo in CEF4Delphi to get the KeyCode parameter values