I have a very simple Yii2 input field where I will enter data from a keyboard or from a barcode scanner.
I need to know how to detect if the device used is the keyboard or the barcode scanner.
Maybe I will use a jQuery plugin that can detect it.
I have a very simple Yii2 input field where I will enter data from a keyboard or from a barcode scanner.
I need to know how to detect if the device used is the keyboard or the barcode scanner.
Maybe I will use a jQuery plugin that can detect it.
with javascript, You can use a "onkeyup" event on the input box. If the event has triggered then you can consider as input from keyboard
or you can try this jQuery plugin https://plugins.jquery.com/scannerdetection/