jQuery-Scanner-Detection icon indicating copy to clipboard operation
jQuery-Scanner-Detection copied to clipboard

Use keydown isntead of keypress

Open mareeo opened this issue 7 years ago • 4 comments

The keypress event is deprecated according to the DOM Level 3 Spec. In my testing, newer Android devices running Chrome are no longer triggering the keypress, only keydown and keyup. My fork modifies this library to rely only on keydown. The existing code relied both on the keypress and keydown events to handle special button presses, and with my modification this is no longer necessary.

Also updated are code formatting changes, updating various things to conform to jQuery plugin best practices, and fixing formatting issues in the documentation. The library's API was not affected by any of these changes.

mareeo avatar Apr 24 '17 15:04 mareeo

@kabachello this looks like a good fix/improvement from @mareeo , you should merge it imo :)

twf-nikhila avatar Jun 25 '19 11:06 twf-nikhila

@mareeo @kabachello Want to know few things:

  1. Will this also detect non-alphanumeric symbols like hash (#) or dollar ($) etc?
  2. What if a carriage return is disabled in barcode scanner? Will this also detect a barcode if disabled and/or enabled?

twf-nikhila avatar Jun 25 '19 11:06 twf-nikhila

Yeah, as long as it is a keycode it recognizes here. A special end key like keycode 13 (enter) isn't required for it to detect a scan, as long as it meets the minLength and avgTimeByChar requirements set.

mareeo avatar Jun 25 '19 12:06 mareeo

I do one concept of autoscan ,I want to scan the auto scan in the stage, but in stage there are many input box , So the focus will automatically focus the input box, So I cant scan the autoscan module,So what can i do for that? I want to Scan that stage. So i want to block the stage textbox focus in that particular scan time and

Aashik30 avatar Feb 10 '21 14:02 Aashik30