Keyboard Object



 
The Keyboard object allows you to modify the settings for the touch screen keyboard.


Members Table

    The following table lists the members provided by the Keyboard object.

    Members

    Properties Description
    CurLayout Gets/sets the keyboard layout.
    Docked Current docked status.
    Floating Current floating status.
    Full Current full-size status.
    Height Gets the keyboard height.
    Initialized Initialization status.
    Left Gets the left offset.
    Small Current small-size status.
    Top Gets the top offset.
    Visible Current visibility status.
    Width Gets the keyboard width.

    Methods Description
    GetOutOfBoundsCorrection Returns whether the keyboard is currently correcting its position.
    MoveTo Moves the keyboard to a specified position.

    Events Description
    OnFullKeyboard Fires when the touch screen keyboard is maximized.
    OnNewLayout Fires when the touch screen keyboard language is changed.
    OnSmallKeyboard Fires when the touch screen keyboard is minimized.
    OnVisibilityChange Fires when the visibility is changed.

Remarks
    This object is available through the main object SiteKiosk. Use the Keyboard object to show, hide, or change the touch screen keyboard.

    Note that the path of a file using SiteKiosk objects must be allowed in the
    SiteKiosk configuration (Security -> Access -> URL's With Script Permission)
    if it is not a browser skin file.
Examples
    The following example shows information about the touchscreen keyboard.

    <html>
    <body>
    <table border="0" bgcolor="#ebebeb" width="600" cellspacing="5"
    cellpadding="5" style="font-family:verdana;font-size:8pt;"
    align="center">
    <tr><td bgcolor="f8f8f8">
    Click the links to pull the touchscreen keyboard in / out or
    to hide / show it.
    </td></tr>
    <tr><td style="font-family:verdana;font-size:8pt;">
    <pre>
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    if (SiteKiosk.Keyboard.Initialized)
    {
       kbstatus = "Touchscreen keyboard is active";
       if (SiteKiosk.Keyboard.Docked) {kbtype = "Docked";}
       else {kbtype = "Floating";}
       if (SiteKiosk.Keyboard.Small) {kbsize = "Pulled in";}
       else {kbsize = "Pulled out";}
       if (SiteKiosk.Keyboard.Visible) {kbvisible = "Visible";}
       else {kbvisible = "Hidden";}
       SiteKiosk.Keyboard.OnFullKeyboard = OnFullKeyboard;
       SiteKiosk.Keyboard.OnSmallKeyboard = OnSmallKeyboard;
       SiteKiosk.Keyboard.OnVisibilityChange = OnVisibilityChange;
       function OnFullKeyboard()
       {
          id_kbsize.innerHTML = "Size: Pulled out";
          if (SiteKiosk.Keyboard.Docked) {kbtype = "Docked";}
          else {kbtype = "Floating";}
          id_kbtype.innerHTML = "Type: " + kbtype;
       }
       function OnSmallKeyboard()
       {
          id_kbsize.innerHTML = "Size: Pulled in";
          if (SiteKiosk.Keyboard.Docked) {kbtype = "Docked";}
          else {kbtype = "Floating";}
          id_kbtype.innerHTML = "Type: " + kbtype;
       }
       function OnVisibilityChange(visibility)
       {
          if (visibility) {kbvisible = "Visible";}
          else {kbvisible = "Hidden";}
          id_kbvisible.innerHTML = "Visibility: " + kbvisible;
       }
       function kbpullswitch()
       {
          if (SiteKiosk.Keyboard.Initialized)
          {SiteKiosk.Keyboard.Full = !SiteKiosk.Keyboard.Full;}
          else alert("No touchscreen has been configured");
       }
       function kbshowswitch()
       {
          if (SiteKiosk.Keyboard.Initialized)
          SiteKiosk.Keyboard.Visible = !SiteKiosk.Keyboard.Visible;
          else alert("No touchscreen has been configured");
       }
    }
    else
    {
       kbstatus = "No touchscreen has been configured";
       kbtype = "-";
       kbsize = "-";
       kbvisible = "-";
    }
    document.writeln("<span id='id_kbstatus'>Status: " + kbstatus +
    "</span>");
    document.writeln("<span id='id_kbtype'>Type: " + kbtype +
    "</span>");
    document.writeln("<span id='id_kbsize'>Size: " + kbsize +
    "</span>");
    document.write("<span id='id_kbvisible'>Visibility: " +
    kbvisible + "</span>");
    </SCRIPT>
    </pre>
    </td></tr>
    </table>
    <br><br>
    <div align="center">
    <a href="javascript:kbpullswitch()">
    Pull in / out
    </a>
    &nbsp;
    <a href="javascript:kbshowswitch()">
    Show / Hide
    </a>
    </div>
    </body>
    </html>
    

Applies to
    SiteKiosk v5.0 (and later versions).

Back to top