HTML5 plugin keyboard input

I have a plugin (html5 builds) that has a html input, but all keypresses, keydowns, and keyups are caught somewhere in Corona and do not propagate down. Thus no characters are added to my plugin’s input field on a keypress.

Is there a way to override this in Corona, even temporarily?

Sincerely,

Michael Wickey

Try to attach ‘onfocus’ and ‘onblur’ event handlers to html input:

// disable SDL keyboard handler and enable native JS handler 

myInputText.onfocus = function (e) {

  var jsEnableKeyboard = Module.cwrap(‘jsEnableKeyboard’, ‘null’, [‘number’]); jsEnableKeyboard(0);

}

// enable SDL keyboard handler and disable native JS handler

myInputText.onblur = function (e) {

  var jsEnableKeyboard = Module.cwrap(‘jsEnableKeyboard’, ‘null’, [‘number’]); jsEnableKeyboard(1);

}

Thank-you for your quick response. That worked!

Sincerely,

Michael Wickey

Try to attach ‘onfocus’ and ‘onblur’ event handlers to html input:

// disable SDL keyboard handler and enable native JS handler 

myInputText.onfocus = function (e) {

  var jsEnableKeyboard = Module.cwrap(‘jsEnableKeyboard’, ‘null’, [‘number’]); jsEnableKeyboard(0);

}

// enable SDL keyboard handler and disable native JS handler

myInputText.onblur = function (e) {

  var jsEnableKeyboard = Module.cwrap(‘jsEnableKeyboard’, ‘null’, [‘number’]); jsEnableKeyboard(1);

}

Thank-you for your quick response. That worked!

Sincerely,

Michael Wickey