MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Inconsistent behaviour while using Keyboard wedge type Scanners with UWP+webview2 app
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
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:
- 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)
- 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:
- 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)
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.