I have a USB barcode scanner attached. I'm currently detecting whether key presses were sent to a text box from it via keyups, by having it send a special key combination before it sends the barcode.
However I was wondering if there is another way to do it.
I took at the KeyEventArgs
private void TextBox_KeyUp(object sender, KeyEventArgs e)
{
this.TextBlock1.Text = e.KeyboardDevice.ToString();
}
I thought e.KeyboardDevice might give me some info on which "keyboard" e.g. the standard keyboard or the "usb barcode scanner keyboard" but I can't seem to find any of that information.
I just thought there may be a neater way of doing this than sending the special key combination from the barcode scanner and using that.