Help on webix + mobile+ barcode scanners

Hi all,
I develop with webix+cordova on mobile devices, recently I got an handheld pda device with barcode scanner. Since I do not have the specific cordova plugin, I have decided to use it in keyboard emulation mode. I have tried to catch keyboard input with a global keypress listener but it seems that webix captures the keyboard events and do not let me to analyze the input, but maybe I’m wrong.

So I created an input element at the top of the html body and moved it to an invisible position

input style=‘position: absolute; top: -1000px; left: -1000px; opacity: 0’ type=“text” id=“elemID”

and then I made three listener to force the input element focus and hide the soft keyboard when necessary:

var _DO_BLUR_ = false;
document.getElementById('elemID').onblur = function (event) {
  if (!_DO_BLUR_)
    return;
  var me = this;
  setTimeout(function () {
    me.focus()
  }, 10);
};
document.getElementById('elemID').onfocus = function () {
  window.setTimeout(function () {
    cordova.plugins.Keyboard.close();
  }, 20);
};
document.getElementById('elemID').onkeypress = function (event) {
  if (event.charCode = 13) {
    if ($$('x_scan').isVisible() && _DO_BLUR_ )
      get_bar(document.getElementById("elemID").value, 1);
    document.getElementById("elemID").value = "";
  }

Everything works fine, but the cons is that every webix focused input can receive the scanned code.

So I need to have a global keypress event to check the start e stop scanner characters to avoid the above cons.

Any help?

Thanks

webix really attaches a global key handler, so it will catch any key, still events are not blocked, so any other handler on the page will be able to process the same event.

The only exception - if for some key combination there is a specific handler ( like tab handling in the table ), webix will prevent default key processing ( block normal tab navigation for example )

You can try to use webix_debug.js and comment the next line there

webix.event(document, "keydown", webix.bind(this._keypress, this));

if it helps, then issue was really caused by webix.ui