Reputation: 33
I'm doing POS system and i have wired barcode scanner with the following feature: Model: F5, Port: USB, Symbol: 1D. I even tried the barcode in notepad and i noticed that it automatically triggering the enter key after the barcode string. Now what I'm after in this question is the possibility of triggering shift key or tab key before the barcode string. So by that i can make a KeyDown event in my windows form app for putting the focus to my textbox whenever it sense shift key or tab key.
In simple words i want to do barcode reading without manually putting the focus in textbox. Thank you in advance.
Upvotes: 0
Views: 2163
Reputation: 13
Barcode scanners will always use an enter after printing out the barcode. This indicates that the barcode has finished printing.
You could do something like this (if the scanner does not allow a prefix to be added):
Of course if you went this route, you'd have to consider users inputing characters. So you'd probably have to check the lapsed time for the input etc.
Ultimately, it would be best if you were able to have control of the barcodes (where you can prefix them on your own such as "USR15840" and pick up the keypress on "USR" and enter).
Upvotes: 0
Reputation: 4350
Most scanners can add prefix code to the scanned barcode data for notification.
For example, this article will be helpful.
How can I add a Prefix value to my ds4208 barcode scanner
Please check the manual of the scanner you are using.
Upvotes: 1