onScan.attachTo(document, {
suffixKeyCodes: [13], // enter-key expected at the end of a scan
reactToPaste: true, // Compatibility to built-in scanners in paste-mode (as opposed to keyboard-mode)
onScan: function (sCode, iQty) { // Alternative to document.addEventListener('scan')
console.log('Scanned: ' + iQty + 'x ' + sCode);
if(sCode!=undefined){
this.itemInfoFg.controls.barCode.patchValue(sCode);
this.onChangeBardCode();
}
},
onKeyDetect: function (iKeyCode) { // output all potentially relevant key events - great for debugging!
console.log('Pressed: ' + iKeyCode);
},
});