Undocumented asl.showKeyboard method returns wrong callback data



I've discovered an undocumented Keyboard Services method in the ASL API. It's called 'asl.showKeyboard'.


Here is its stub:


asl.showKeyboard = function(params, callback) {


    asl.prv.inputs[params.inputId] = {

        callback: callback



From my understanding, it can receive an array of parameters and a callback function. It returns a value from an input field, defined by inputId (from the parameters array) to the callback function.


I've done the following:

asl.showKeyboard( {

     inputId: 'item_code',

     title : 'Please scan an item',

     type : 'text',

     scanner: true,

     back: false







However, inside my callback function the local parameter scanned_item_code's value is always scanned_item_code, instead of the scanned value.


Any suggestions on what might be wrong?