cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MDK How to disable auto-entering of scanned barcode in input

asgag
Explorer
0 Kudos

Hi Experts,

I use "Control.Type.FormCell.SimpleProperty" control as an editable numeric input representing a quantity. The user can modify manually the value in the input, or the user can scan a barcode to increase the value by 1.

The issue is when the user has the focus on the input and scans with a hardware scan (for example, laser scan from a Zebra device), the scanned barcode is automatically inserted in the input - and we don't want that, because the input keeps a quantity, not a barcode. We have a listener when scanning to increase the quantity by 1 which is working, but the auto insert of the scanned barcode in the input is making troubles.

I expected a property of the control for disabling the auto-insertion of the scanned barcode, but didn't find something like this.

I tried to change the focus from the input to something else hoping that the auto-insertion will not happen, but I couldn't change the focus from the input to something else.

Here is the code snippet of the control:

{"validationProperties": { "ValidationMessage": "Validation error message", "ValidationMessageColor": "ff0000", "ValidationViewIsHidden": "<Rule>"},"Value": "<Rule>","_Type": "Control.Type.FormCell.SimpleProperty","_Name": "QuantityInput","IsVisible": true,"Separator": true,"Caption": "Quantity","OnValueChange": "<Rule>","KeyboardType": "Number","AlternateInput": "None","Enabled": true,"IsEditable": "<Rule>"}
I am using MDK 23.8 client.This issue is not present when using camera scan.
Any help/guidance will be very much appreciated,Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert

Most likely the reason is that the hardware scanner is acting as a keyboard wedge and sending the scan value to the current field as keystrokes. You may need to look into configuring the hardware scanner to trigger an event / intent instead of as a keystroke. This will require additional coding in your MDK app to capture the event and act accordingly when received.

asgag
Explorer
0 Kudos

That was it: "Keystroke output" property was enabled on the Zebra device. I disabled it and solved my issue (we already had configured the hardware scanner to trigger an intent).

Thank you!

Answers (0)