Hot News!

Not Available

Click Like or share to support us!

Nov 11, 2010

Khmer Unicode Google Virtual Keyboard

  1. Visit : http://code.google.com
  2. Find and Click
  3. Find and Click Google Language API
Or Type in URL Address Bar
http://code.google.com/apis/language/
  1. Find and Click Virtual Keyboard
  2. Find and Click Getting Started (JS)

You will see:

Introduction

This developer's guide provides a basic model for using the Google Virtual Keyboard API, along with granular explanations of the API's configurable JavaScript components. You can use this guide to enable Virtual Keyboard on your webpage or application.

Scope

This document describes how to use the functions and properties specific to the Virtual Keyboard API.

Browser compatibility

The Virtual Keyboard API supports Firefox 1.5+, IE6+, Safari, Opera 9+, and Chrome.

Audience

This documentation is intended for developers who wish to add Google Virtual Keyboard functionality to their pages or applications.

The "Hello World" of Virtual Keyboard

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <script type="text/javascript" src="https://www.google.com/jsapi=INSERT-YOUR-KEY"> </script>

    <script type="text/javascript">

      // Load the Google Onscreen Keyboard API
      google.load("elements", "1", { packages: "keyboard" });
      function onLoad() {

      var content = document.getElementById('content');
// Create the HTML for out text area
      content.innerHTML = '<div><i>(Scroll down)</i> ' +
                          'You can click the buttons on the onscreen ' +
                          'keyboard to type Khmer. You can also type Khmer '+
                          'with your keyboard. When you need to type English, ' +
                          'please click the [-] button to minimize the keyboard.'+
'</div><textarea id="t1" cols="100" rows="5"></textarea> ';
var kbd = new google.elements.keyboard.Keyboard( [google.elements.keyboard.LayoutCode.KHMER],'t1']); } google.setOnLoadCallback(onLoad); </script> </head> <body style="font-family: Arial;border: 0 none;"> <div id="content">Loading...</div> </body> </html>    
Visit the code playground to play with this sample.

e.g. <script src="http://www.google.com/jsapi?key=AIzaSyA5m1Nc8ws2BbmPRwKu5gFradvD_hgq6G0" type="text/javascript"></script>


Click here to see this result.

    No comments:

    Post a Comment