Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

KeyState Module

The KeyState Module is used to set the parameters of the KeyState indicator. The KeyState indicator will display icons for Shift, Alt, Control, Function, Caps, Num lock and Orange key states. It grows from the right as necessary if more than one key state is set at once.

Syntax

keyState (Module) <META> Syntax

<META HTTP-Equiv="KeyState" content="[parameter]">

KeyState JavaScript Object Syntax:
By default the JavaScript Object 'keyState' will exist on the current page and can be used to interact directly with the keyState.
To Set keyState parameters via JavaScript use the following syntax: keystate.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. keyState.right = 'value';
To set multiple EMML parameters / events on a single line use the following syntax: keystate.setEMML("[Your EMML Tags]");

e.g. keyState.setEMML("right:value");
KeyState Ruby Object Syntax:
By default the Ruby Object 'KeyState' will exist on the current page and can be used to interact directly with the KeyState. All Methods, Parameters and Events are the same as JavaScript, however, notice 'KeyState' needs to start with an uppercase letter. Another difference in Ruby is that methods do not end in '()'
To Set KeyState parameters via Ruby use the following syntax: KeyState.parameter = 'value' remembering to enclose your value in quotes where appropriate.

e.g. KeyState.right = 'value'

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description Default Value
right:[Value] Positive number, representing pixels Sets the X position of the right-hand edge of the KeyState indicators. Indicators start at the bottom right of the screen.
left:[Value] Positive number, representing pixels The same as Right, included for backward compatibility. Indicators start at the bottom right of the screen.
top:[Value] Positive number, representing pixels Sets the Y position of the KeyState indicators. Indicators start at the bottom right of the screen.
height:[Value] Positive number, representing pixels Sets the height of the KeyState Indicators. Dependant on screen resolution
width:[Value] Positive number, representing pixels Sets the width of each KeyState indicator. Dependant on screen resolution
visibility:[Value] Visible, Hidden Sets the visibility of the keystate indicators. Hidden.

Remarks

Switching to Other Applications

All controls are designed to be shown on top of RhoElements. If you require to switch to an application other than RhoElements you should minimize RhoElements to ensure the buttons do not remain shown. (Not applicable to Enterprise Tablet)

Screen Orientation

When the screen orientation changes, either using the ScreenOrientation tag or by rotating a device with hardware support, the command areas will automatically move and resize to fit the new layout. However the buttons themselves are not moved and in some cases this may result in them being off the screen or not in the expected position. If so they must be moved manually by detecting the ScreenOrientationEvent.

Requirements

RhoElements Version 1.0.0 or above
Supported Devices All supported devices except Enterprise Tablet.
Minimum Requirements None.
Persistence Persistent - Changes to this module will persist when navigating to a new page.

HTML/JavaScript Examples

The following example shows the KeyState indicators and sets the right and top coordinates to 50.

<META HTTP-Equiv="KeyState" Content="Visibility:Visible">
<META HTTP-Equiv="KeyState" Content="Right:50">
<META HTTP-Equiv="KeyState" Content="Top:50">

The following example shows the KeyState and sets the right and top coordinates to 20.

<META HTTP-Equiv="KeyState" Content="Visibility:Visible; Right:20; Top:20">
Back to Top