I have a USB scanner that is in keyboard mode. The jquery code here actually works surprisingly well.
Any scanner activity is written to the console.
My problem is that I cannot work out how to prevent barcode scanned data inserting into the current form input field as well.
Ideally, I would want scanned data to be sent to a hidden input field somewhere - so as not to interfere with a users typing.
I have tried e.disableDefault() in various places inside the function but it doesn’t seem to work.