Mottie / Keyboard

Virtual Keyboard using jQuery ~

Home Page:http://mottie.github.io/Keyboard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

again: Open Keyboard programmatically

xalexbo opened this issue · comments

key_alfa.txt

Hi Mottie, long post: I have a web page with a text field which is usually filled by a barcode reader, but I want to give choice to use a custom alpha keyboard, to be shown on request clicking a button.
Keyboard layout javascript lies on a .js file which is loaded on top of webpage - see attached file.
Following event doesn't work:
$('#icon').click(function() {
var kb = $('#alfa).getkeyboard();
kb.reveal();
});
debugger says "kb is undefined" and thus keyboard does not appear, looking at source page I saw keyboard layout js script is properly loaded and available. Where am I wrong?
Can you help me to make it work?
Another acceptable solution could be having both keyboard shown and text field being editable to allow barcode reader filling the field: do you have any clue on this matter?
Thanks !
Alex

Hi @xalexbo!

Using getkeyboard only works after the keyboard has been initialized. Please make sure to initialize it, and set the openOn option to an empty string - this prevents the keyboard from opening on focus.