Bug 50405 - [UWP] Entry input box not firing Completed event handler with a bluetooth barcode scanner
Summary: [UWP] Entry input box not firing Completed event handler with a bluetooth bar...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.4
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-12-19 19:34 UTC by Jon Goldberger [MSFT]
Modified: 2017-03-07 21:21 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Jon Goldberger [MSFT] 2016-12-19 19:34:44 UTC
## Description

When using a bluetooth barcode scanner that acts like a keyboard to the OS, i.e. the scanner converts the barcode to text and spits out a string, it works as expected on iOS and Android in that the Completed event is fired but on UWP the Completed event is not consistently fired. 

I can not personally reproduce this as I do not have a barcode scanner of the type used by the reporting customer, but to test to see if it is a Forms issue or not, I created a simple native UWP app with a TextBox and handled the TextChanged and SelectionChanged events, the same events Forms handles for a UWP TextBox, and the issue still occurred with their bluetooth scanner on the native UWP app, so does not seem to be an issue in Xamarin Forms.

The reporting customer was able to work around this in the native UWP app I created by handling the KeyDown event of the TextBox and watching for the Enter key to know when the input was completed. Knowing this, then I suggested they create a custom renderer to handle the KeyDown (or better yet KeyUp) event for the native control to work around this issue. 

This does seem like an edge case and the custom renderer might just be the way to go rather than being a "workaround," but filing this as an enhancement request in case the Forms team feels this is something worth addressing in Forms code.

## Steps to reproduce

Need Bluetooth Barcode Scanner : Pegasus PS-1110
Device tested on: Microsoft Lumia 550(Window Phone)
OS Version : 1607 and OS buld:10.0.14393.189

1. Launch the app and connect the Bluetooth scanner.

2. Select the Entry control.

3. Scan any barcode.

Expected result: Entry field should populate after a single scan

Actual result: Need to scan barcode multiple times for Entry field to populate.

## Environment

Microsoft Visual Studio Professional 2015
Version 14.0.25424.00 Update 3
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Professional

LightSwitch for Visual Studio 2015   00322-50050-03552-AA805
Microsoft LightSwitch for Visual Studio 2015

Microsoft Visual Studio Tools for Applications 2015   00322-50050-03552-AA805
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-50050-03552-AA805
Microsoft Visual Basic 2015

Visual C# 2015   00322-50050-03552-AA805
Microsoft Visual C# 2015

Visual C++ 2015   00322-50050-03552-AA805
Microsoft Visual C++ 2015

Visual F# 2015   00322-50050-03552-AA805
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-50050-03552-AA805
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.10.01020.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Clang with Microsoft CodeGen   14.0.25515
Clang with Microsoft CodeGen

Color Theme Designer   1.0
Designer for creating new color themes

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Multilingual App Toolkit   4.0.1605.0
Multilingual App Toolkit helps you localize your Windows Store app by providing file management, pseudo and machine translation, translation editor, and build integration. http://aka.ms/matinstallv4

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2015 ENU   14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Analysis Services   13.0.1605.88
Microsoft SQL Server Analysis Services Designer 
Version 13.0.1605.88

SQL Server Data Tools   14.0.60629.0
Microsoft SQL Server Data Tools

SQL Server Integration Services   
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5

SQL Server Reporting Services   13.0.1605.88
Microsoft SQL Server Reporting Services Designers 
Version 13.0.1605.88

TypeScript   1.8.35.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   4.1.1.3 (34a92cd)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.1.1.1 (7db2aac)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   9.8.1.4 (3cf8aae)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Jimmy [MSFT] 2017-03-07 21:21:30 UTC
This PR might actually help with this: https://github.com/xamarin/Xamarin.Forms/pull/747

However if it does not, as this has been classified as an enhancement request it would be best suited as a UserVoice suggestion[1] or a proposal in our Evolution forum[2] for future consideration. When submitting a proposal on the Evolution forum, be sure to first read the contribution guidelines[3] so your proposal is ready for discussion with the Forms team and community.

[1] https://xamarin.uservoice.com/forums/144858-xamarin-platform-suggestions
[2] https://forums.xamarin.com/categories/xamarin-forms-evolution
[3] https://forums.xamarin.com/discussion/84503/please-read-first