If I intercept a key press using win32 calls, I now have a key code. Is there a way to convert that to a System.Windows.Forms.Keys value?
Use KeyInterop.KeyFromVirtualKey()
.
The integer values for System.Windows.Forms.Keys enum match that of the Win32 calls.
Keys keyData = (Keys)rawWin32KeyCode;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With