I've been searching around and experimenting various things for days now for this but am just a bit too green to USB/HID to get my head around it.
What I would ideally like to do is write a windows service in c# that will accept input from a USB HID device (specifically a barcode scanner). I want that service to dominate the input from a specific device I.e. the input will not be output to the currently focused application as if it were typed on a keyboard.
Is this possible? I've managed to bodge-hijack input with a winforms app using windows events but that just trapped certain key combinations and stole focus and then returned focus on other key combinations. This didn't really work as it wasn't fast enough and some input was lost to the currently focused app or was disrupted if a user was typing whilst scanning.
I want to detect a specific HID and then directly consume that HIDs input.
Can anyone suggest how I might do this without resorting to writing device drivers? Is this even possible?
Thanks for any help, very much appreciated.
Dan
What I would ideally like to do is write a windows service in c# that will accept input from a USB HID device (specifically a barcode scanner). I want that service to dominate the input from a specific device I.e. the input will not be output to the currently focused application as if it were typed on a keyboard.
Is this possible? I've managed to bodge-hijack input with a winforms app using windows events but that just trapped certain key combinations and stole focus and then returned focus on other key combinations. This didn't really work as it wasn't fast enough and some input was lost to the currently focused app or was disrupted if a user was typing whilst scanning.
I want to detect a specific HID and then directly consume that HIDs input.
Can anyone suggest how I might do this without resorting to writing device drivers? Is this even possible?
Thanks for any help, very much appreciated.
Dan