No need. It listens to keyboard input and looks for either matching prefix/suffix characters or a matching regex. Matching input gets added to the component's data property and fires the component's onActionPerformed event.
Could you please share your configuration settings for data and regex? I'm currently scanning barcodes, and while I can see them appearing in the '123Scan' app, they aren't populating under Ignition.
Also I've set the onActionPerformed event as following
The 'Barcode Scanner Input' component and the 'Scan Barcode' action represent two completely different ways to gather a barcode.
The 'Barcode Scanner Input' is always listening for keystrokes, which match a particular pattern (regex, or prefix + suffix, per the component's settings). While it's on the window, if your scanner acts as a keyboard wedge, it will automatically collect input and add it to its internal buffer.
The 'Scan Barcode' action invokes a scan using the mobile device's built in hardware - it currently only works on the installed native apps on Android and iOS, and may or may not be compatible with your mobile computer/how it performs scanning.
You should pick one or the other, not try to use both.
When using the Barcode Scanner Input component, you don't need an onActionPerformed event to pickup scans. That is for doing something once the scan is captured.
Get the component working with your scanner before trying to handle the data. Program your barcode scanner to add a prefix and suffix character that will frame the scan for easy detection. The other option, again, is to create a regular expression that matches the pattern of your barcode format.
Set one of the two up, and start scanning. You should see the barcode data appear inside the component itself. After that is working, then add an onActionPerformed script to get the scan from its data property and do what you will with it.
Thanks for the clarification, @PGriffith and @dkhayes117. I've noticed that when I scan a barcode, it utilizes that regex and provides me with a value after each keystroke in designer. How can I make this process dynamic so that any scan appends the value to the data?
If you want to allow any barcode format and distinguish between actual keyboard input, your best option is to add a prefix and suffix character to the scan by programming the scanner to do so.
For example, you scan 1234567 your scanner will append a prefix and suffix of your choice, like, $1234567*. Then the component knows when to capture input as a scan because it is framed with $ and *.
Regex is more suited to filtering scans to a specific pattern, "I need only this barcode format to be picked up - A-123-002-1"