How to suppress keyboard events for scanned data?

How can I prevent barcode scans from being handed to my application as keyboard typing? I receive the barcode scans through an event which is distributed in my application to view models automatically, and the “typed text” of the scans is being passed to form controls as if someone is typing on a keyboard, and polluting text boxes and creating issues.

Using Xamarin Forms/C#.

Hello @Kyle_Hatcher ,
In order to be up and running immediately out of the box, Datalogic devices are programmed at the factory by activating a Keyboard Wedge feature, which allows - as you correctly noted - read barcodes to be sent to applications as if they had been manually typed by the user on the current control.
In this way also general applications that are not aware of the scan-engine can benefit of the reading capabilities of the Datalogic Devices.
This functionality is documented in all the device user’s manuals (e.g. see page 50, of Skorpio X5 Users’s Manual.pdf, section Wedge) and can be disabled or enabled in various ways:

  1. from the configuration menu interface on board the terminal, by going to Settings / Datalogic Settings / Scanner Settings / Wedge as described in the User’s Manual.
  2. via Datalogic ScanToDeploy (by adding a “Device & Scanner Setting” action, then choosing the appropriate parameter in the Scanner Settings / Wedge section).
  3. using a third’s party MDM, by integrating the the features of Datalogic OEMConfig.
  4. via SDK, though the property com.datalogic.decode.configuration.ScannerProperties.KeyboardWedge.enable

For the Datalogic Xamarin SDK (overview), look at the Standard API documentation, → Com.Datalogic.Decode.Configuration namespace, →
KeyboardWedge Class, → Enable property.

See also the article How to enable/disable the Scan Engine through Android Studio SDK on this pages. The “Method 1” section of the originating article and this answer show how to enable/disable the KeyboardWedge in Java and in Xamarin.

Simone Callegari
Datalogic Mobile Products Specialist - SW Engineer

2 Likes

Thanks, this is what we needed.

1 Like