I have a custom task pane in a VSTO Outlook add-in which hosts a System.Windows.Forms.WebBrowser
control. All works well but in web forms DEL and BACKSPACE keys
Disclaimer: my answer is not related to Outlook plug-in, but it may help future visitors, who may find this page using a search engine (same as I did). It is relevant to the problem described, but in a different context.
Today is 2017, none of the answers worked (deleted, linked and others found by google search). I discovered that in my situation (embedded ActiveX control in a web page), DEL and BACKSPACE as well as other control keys (HOME, END, arrow keys) start working after I press TAB, and continues to work after that.
I added
obj.focus();
Immediately after setting the .Url
in my Javascript, and it magically solved the problem (obj
is my ActiveX browser written in .NET, using WPF browser control under the hood).
SendKeys, setting focus from within the control and intercepting keys in .NET did not help.