I have a WebBrowser
control shown in a custom task pane in an Microsoft Office Application-level add-in created in Visual Studio. The web page shown in the WebBrowser
doesn't receive keyboard events that can be handled by JavaScript code, such as KeyUp
. The same page shown in a comparable WebBrowser
in a Form
does receive keyboard events. The WebBrowser
control itself doesn't seem to expose any events related to keyboard input, and I don't seem to be able to handle keyboard events by adding event handlers to the UserControl
added as a custom task pane.
I have created a minimal example – a Visual Studio solution – which recreates the problem.
Is there any way to pass on keyboard events to the web page?