Skip to content

Commit c40cd1b

Browse files
committed
1.0.4 fix "shift" in barcodes issue
1 parent c0f94b3 commit c40cd1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const barcodeHidReader = (function () {
140140
shortState = CAPTURING
141141
}
142142

143-
if (shortState === CAPTURING) {
143+
if (shortState === CAPTURING && e.key.length === 1) {
144144
events.push(
145145
Object.assign(new KeyboardEvent('keydown', e), { custom: true })
146146
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "barcode-hid-reader",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "simple js lib for capturing data from HID barcode scanners",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)