TC510K scan input stops if user selects and deselect input field.

C Carl Klavus 3 years 6 months ago
56 4 0

A simple web app page that logs every time it takes input from the tc510k scanner (configured to give carriage return as action key)
                       $(document).ready(function () {
             $(document).keypress(function (e) {
                  console.log("input");              });        });             Form example name:    
Steps to reproduce.
1) Open browser and go to webpage. (tested with default browser, chrome and app webview)
2) Scan barcode -> console will log "input" (as expected)3) Manually select input field -> selected input field
4) Manually click outside input field -> deselected input field
5) scan barcode -> NO LOG (should log "input")
No input comes from the scanner until user selects something else on the mobile device and then go back to the webbrowser.
 
Any idea why this happends?

Please Register or Login to post a reply

4 Replies

D Darryn Campbell

The latest recommendations on this topic are detailed at https://developer.zebra.com/blog/listening-keypress-events-datawedge

A Anders Grandt

Any solution?

D Daniel Lemmon

I've stumbled into the same issue building an Angular application that is listening to keypress events. I don't think that this is an issue that can be solved by Zebra even. I happen to have another evaluation device (RS30 by CipherLabs) and it suffers from the same problem as soon as a soft keyboard is presented.

My fear is that I'm going to have to create a cordova application to wrap around my hosted Angular app, which is disappointing.

Y Yanis Dalabiras

Hi Carl,

You might need to use keydown rather than keypress.  I tried the following and found the behaviour seems to happen regardless of whether you are scanning barcodes:
1) Same as your step 1
2) Manually select input field
3) Tap device keyboard
4) Observe "input" is not logged
5) Type on desktop keyboard (assuming connected to device with Chrome debug tools to the desktop) - Observe "input" is output regardless of whether the input field is selected or not.

If you repeat the above with keydown you should see "input" is always output even if the device keyboard is being used.

CONTACT
Can’t find what you’re looking for?