Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Barcode Scanner Integration

How can I emulate keyboard press once I scanned a barcode using a usb barcode scanner? I don't have any idea about this and I just want to get some suggestions/instructions on how can I do it. If I have this form, how will the barcode number be inputted in that textbox? thanks!

<form method="post" action="">
    <input type="text" id="barcode-input" name="barcode-input" value=""/>
</form>
like image 242
fart-y-goer Avatar asked Nov 29 '25 16:11

fart-y-goer


1 Answers

The barcode scanners that I have seen (not that many I have to admit) act like a keyboard. Old ones even have a PS/2 port. But even the USB ones like to just identify themselves as a keyboard. When you scan a code, the scanner behaves as if you would have actually pressed number keys on your keyboard, probably ending with a return key.

So what you do is put a focus in your textbox, and scan your code and be done.

like image 53
yankee Avatar answered Dec 02 '25 07:12

yankee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!