You can try adding your own event handler for WpfControl itself, instead of trying to connect to WinForm KeyDown.
Here is an example. Let's say your WinForm is of type Form1 , WpfControl is UserControl1 , and the caller for WpfControl is called (never guesses)) is elementHost.
public Form1() { InitializeComponent(); elementHost.ChildChanged += ElementHost_ChildChanged; } private void ElementHost_ChildChanged(object sender, ChildChangedEventArgs e) { var ctr = (elementHost.Child as UserControl1); if (ctr == null) return; ctr.KeyDown += ctr_KeyDown; } void ctr_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { }
UPD: e.KeyboardDevice.Modifiers (e is System.Windows.Input.KeyEventArgs ) stores information about Ctrl, Alt, etc.
The smallest
source share