Search code examples
google-apivirtual-keyboard

How to re-size and re-position Google's virtual keyboard?


after putting virtual keyboard in view, I am facing difficulty in re-sizing the keyboard and its appearing position.

My code:

<script type="text/javascript">
            // Load the Google Onscreen Keyboard API
            google.load("elements", "1", {
                packages: "keyboard"
            });
    function onLoad() {
                var kbd = new google.elements.keyboard.Keyboard(
                  [google.elements.keyboard.LayoutCode.URDU],
                  ['urd']);
            }
    function addOption(selectbox, text, value) {
                var optn = document.createElement("OPTION");
                optn.text = text;
                optn.value = value;
                selectbox.options.add(optn);
            }
    google.setOnLoadCallback(onLoad);
        </script>


 <div class="form-group">Urdu
            <div class="col-md-offset-2 col-md-10">
                <textarea id="urd" style="width: 600px; height: 200px;"></textarea>
            </div>
        </div>

Can any one please help or any reference would be much appreciated.


Solution

  • I find this usefull, thought it might help...

      Important: The Google Virtual Keyboard API has been officially deprecated 
    as of May 26, 2011. It will continue to work as per our deprecation policy.
    

    See