Intercept Barcode Scanner, Pass to Application with Focus When Done?

后端 未结 3 1000
滥情空心
滥情空心 2020-12-18 12:21

Is there a way to intercept USB Barcode Scanner input, utilize it, then pass it on to the application that has focus?

We currently use Barcode scanners load order sh

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-18 12:30

    To a computer, a barcode scanner is just like a keyboard, without the keys. When you scan a barcode, the scanner converts the barcode into keyboard input. In order to capture the input in a second program, you'd need to use a keyboard hook.

    Look at this project and this project. You can make a program that uses one of these keyboard hooks and any data you scan with your barcode scanner will get routed to your program too.

提交回复
热议问题