I am working on a web based Java application (GWT is used for my UI). I have a warehouse management system.I need to scan the barcodes and show them in a textbox. I am aware that the scanners would send keyboard events. How do I capture these events and populate them in my textbox ? Should the cursor focus be on the textbox while scanning the barcode ?
Can anyone please provide a code snippet of how to capture these events and populate in the textbox ?
Please note that this needs to work across different OS and browsers. This should work for laptops/desktops. It is not for mobile apps.