-
Notifications
You must be signed in to change notification settings - Fork 17
Scaner event when you have the focus on an input box #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Dxzo. Can you give me some more details on your application? Are you using the keyup event on the specific input for another purpose? Can you share some code? |
I have an input box that works like a search engine similar to a browser, I use it for the user to manually search for the code of their product and select it, for this I use the 'keyup' event. Now I wanted to implement the search when the client has a scanner, that is, once the user scan your product, my function will be triggered: $ (window.document) .on ('' scan.pos.barcode '', function (event) { This works well when the user does not have the focus in the input box, since the 'keyup' event of my search engine does not fire, but when it is, the focus conflicts because the bar code is written in the input and also my function is triggered that's what I want to avoid, I just want my function to be executed. |
I think the main problem here is that the USB barcode scanner is basically treated like a keyboard. Every character it reads gets entered as a keypress event. This would be similar to saying, "I don't want my keyboard to enter input into a text field when it's focused". I don't currently have a good solution to this as it would be mostly dependent upon how your code is structured. However, this is not a limitation of this library, rather just a side effect of how the hardware is designed. |
the event 'scan.pos.barcode' works very well when the focus is not on a text box, but when it is, the bar code is written and the 'keyup' event of my input box is activated that I want to avoid. Can you help me?
The text was updated successfully, but these errors were encountered: