diff --git a/jquery.console.js b/jquery.console.js index 794fc23..f05c7b6 100644 --- a/jquery.console.js +++ b/jquery.console.js @@ -293,6 +293,25 @@ }, 0); }); + + //////////////////////////////////////////////////////////////////////// + // Handle Android text input. + + typer.on('textInput', e => { + var data = e.originalEvent.data; + if (acceptInput) { + if ( typeof config.charInsertTrigger == 'undefined' || + typeof config.charInsertTrigger == 'function'){ + for(var i = 0; i < data.length; i++) { + if(!config.charInsertTrigger(data.charCodeAt(i))) { + return; + } + } + + typer.consoleInsert(data); + } + } + }); //////////////////////////////////////////////////////////////////////// // Handle key hit before translation // For picking up control characters like up/left/down/right