Hello,
There seems to be a problem with Tab key presses not being forwarded properly to Delphi hosted WPF Visual Plugins. We noticed the issue when we wanted to be able to do some custom logic in our WPF control when the user presses the Tab key. It would appear that the Tab key is being intercepted at some point prior to the WPF Visual Plugin as no events at any level in the plugin seem to be able to capture the Tab key. They do however capture all other key presses just fine.
We have attached an simple example which contains a Delphi VCL application which hosts a very simple WPF Visual Plugin. The source code for each project is included. If you run the Visual Studio test application for the Visual Plugin class library and try to tab through the DataGrid cells you should notice that the tab key is captured and a message presents this. If, however you run the Delphi application and attempt to do the same, the Tab key is not captured but if you press ‘T’ it captures the T key.
The events we have tried have been KeyDown & PreviewKeyDown at all applicable levels of visual elements in the plugin. We have also tried to override the OnPreviewKeyDown(e: System.Windows.Input.KeyEventArgs) of the VisualPlugin class but this did not capture the Tab key either.
We would appreciate it if you could show us a way to be able to capture the Tab key press in our WPF control. Thank you for your time and help.