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

onScan not firing on device with built-in scanner #22

Open
ilmazzi opened this issue Nov 30, 2020 · 2 comments
Open

onScan not firing on device with built-in scanner #22

ilmazzi opened this issue Nov 30, 2020 · 2 comments

Comments

@ilmazzi
Copy link

ilmazzi commented Nov 30, 2020

Hi,
i have a problem with an MT65 device.
this is my basic installation:

`	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); 
	    },
	    onKeyDetect: function(iKeyCode){ // output all potentially relevant key events - great for debugging!
	        console.log('Pressed: ' + iKeyCode);
	    }
	});
	// Simulate a scan programmatically - e.g. to test event handlers
	onScan.simulate(document, '1234567890123');
	`

the console shows the code of simulation but when i scan with device i see only "key pressed: 13" .
what is my mistake?

thanks a lot

@mkutyba
Copy link

mkutyba commented Oct 29, 2021

Hello,
I have the same issue with my device which is tablet Senter ST927 with built-in scanner Zebra SE470. Senter ST927 is a device running on Android 9. Onscan doesn't seem to catch any onScan event when testing in playground. Does anyone overpassed such issue?

@sherifzanaty
Copy link

Hello,
You can solve this issue by Enableing “Send Characters as Events” option at the built-in scanner device.
For Zebra Devices you can found this option at "Keystroke output plugin → Key event options → Send Characters
as Events (checkbox)" Reference

hope it helps,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants