Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour while using Keyboard wedge type Scanners with UWP+webview2 app #4287

Open
nsandeep87 opened this issue Jan 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@nsandeep87
Copy link

nsandeep87 commented Jan 10, 2024

What happened?

I am having an angular 13 web app. To render this on UWP, we use webview2 and link the dist folder generated from the web app. In our we also have scanner functionality. The scanner is Keyboard wedge type of scanner ( Zebra DS4608). This is used to scan barcodes Each time we scan, the Scanner responds as a keyboard keystroke. We have keydown event handler to listen to scanned barcodes. Each time we scan the barcode, the scanner sends the output(as keystrokes) in the below format

ScannedValue
where:
prefix: is a control key that is configured on the keyboard wedge type scanner (ctrl+A). The prefix tells our web app that the we are about the start the scan payload
suffix: is a control key that is configured on the keyboard wedge type scanner (ctrl+J). The suffix tells our webapp that we have reached the end of scanned payload
scannedValue: scannedValue are the actual barcodes that appear as keystrokes

Now the issue that we see are as mentioned below:

  1. The ctrl keys for prefix and suffix do not appear to consistent in the keydown handler. A lot of times, scanner sent ctrl+J but in our event handler, it is not identified as ctrl key. ( We are using e.ctrlKey to check if this a ctrlKey or not)
  2. The other behaviour is, keys that are not control keys, the keydown event handler recognised as a ctrl Key.

Both the above issues are causing problems in our app. Is there a solution to this.

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

1.0.2210.55

Framework

WinUI2/UWP

Operating System

Windows 10, Windows 11

OS Version

10.0.19045.3693

Repro steps

I am having an angular 13 web app. To render this on UWP, we use webview2 and link the dist folder generated from the web app. In our we also have scanner functionality. The scanner is Keyboard wedge type of scanner ( Zebra DS4608). This is used to scan barcodes Each time we scan, the Scanner responds as a keyboard keystroke. We have keydown event handler to listen to scanned barcodes. Each time we scan the barcode, the scanner sends the output(as keystrokes) in the below format

ScannedValue
where:
prefix: is a control key that is configured on the keyboard wedge type scanner (ctrl+A). The prefix tells our web app that the we are about the start the scan payload
suffix: is a control key that is configured on the keyboard wedge type scanner (ctrl+J). The suffix tells our webapp that we have reached the end of scanned payload
scannedValue: scannedValue are teh actual barcodes that appear as keystrokes

Now the issue that we see are as mentioned below:

  1. The ctrl keys for prefix and suffix do not appear to consistent in the keydown handler. A lot of times, scanner sent ctrl+J but in our event handler, it is not identified as ctrl key. ( We are using e.ctrlKey to check if this a ctrlKey or not)
  2. The other behaviour is, keys that are not control keys, the keydown event handler recognised as a ctrl Key.

Both the above issues are causing problems in our app. Is there a solution to this.

Repros in Edge Browser

No

Regression

Don't know

Last working version (if regression)

No response

@nsandeep87 nsandeep87 added the bug Something isn't working label Jan 10, 2024
@nsandeep87 nsandeep87 changed the title [Problem/Bug]: Inconsistent behaviour while using Keyboard wedge type Scanners with UWP+webview2 app Jan 10, 2024
@bradp0721 bradp0721 assigned tofuandeve and unassigned bradp0721 Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants