I try to use this project : https://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard
I want to handle keys just for a specific keyboard.
It is working but, I want to release event and run the default code for the other keyboards... How can I do that ?
Here the code :
var rawinput = new RawInput(Handle, CaptureOnlyInForeground);
// Adding a message filter will cause keypresses to be handled
rawinput.AddMessageFilter();
rawinput.KeyPressed += OnKeyPressed;
private void OnKeyPressed(object sender, RawInputEventArg e)
{
if (e.KeyPressEvent.DeviceName == "My Device")
{
// I handle the event et run my custom code
}
else
{
// I don't want to handle the event and run default processing (fill textbox, etc.)
// How can I do ?
}
}
break;from it?breakdoesn't work in event handlers, than maybe something like this suits your needs?