3

I have a barcode scanner (a Motorola Symbol LS4208) which scans codes and writes them where the mouse focus is at that moment( a word file, a form field). The scanner is connected via USB. I want to write a Java application that listens continuouslly and intercepts all the results received from the scanner. How can I write this program? The scanner acts like a keyboard so I can use something like KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher, but how would I differenciate from a user keyboard input and the scanner?

prmottajr
  • 1,816
  • 1
  • 13
  • 22
Cosmin Vasii
  • 1,429
  • 3
  • 14
  • 18
  • in some other SO answer, someone told that you can differenciate the scanner from someone inspecting the speed the string took to be written (but I don't know how to get this from the event) – Leo Mar 18 '14 at 17:22
  • 1
    Possible duplicate of [Barcode Scanner implementation on Java](https://stackoverflow.com/questions/8146840/barcode-scanner-implementation-on-java) – Jurgen Camilleri Jan 31 '19 at 08:12

0 Answers0