Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

how to change between virtual keyboard and real keyboard? #144

soyeoneone opened this Issue Feb 28, 2013 · 2 comments


None yet
2 participants

When used "lockInput: true" , I can only input throw virtual keyboard. Is there a button or such a similar method that can change to real keyboard?


Mottie commented Feb 28, 2013

Hi soyeoneone!

There isn't anything built into the keyboard to do that, but you can include the code below to add a lock/unlock button (demo):

    // Prevents direct input in the preview window when true
    lockInput: true,

    visible: function (e, kb, el) {
        if (!kb.$keyboard.find('.ui-keyboard-lock').length) {
            kb.$keyboard.append('<button class="ui-keyboard-button ui-keyboard-lock ui-state-default ui-corner-all"><span class="ui-icon-locked ui-icon"></span></button>');
                var locked = !kb.options.lockInput;
                kb.options.lockInput = locked;
                    .toggleClass('ui-keyboard-lockedinput', locked)
                    .prop('readonly', locked);
                    .toggleClass('ui-icon-locked', locked)
                    .toggleClass('ui-icon-unlocked', !locked);


Mottie commented May 6, 2013

I'm guessing this issue has been resolved, so I'm closing it.

I did have to update the above demo & code - I changed:

if (!kb.$keyboard.find('.unlock').length) {


if (!kb.$keyboard.find('.ui-keyboard-lock').length) {

I also added it to the list of more demos.

@Mottie Mottie closed this May 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment