The KeyState API is used to display small icons to the user indicating the current shifted state of the hardware keyboard. The KeyState indicator will display icons for Shift, Alt, Control, Function, Caps, Num lock and Orange key states, growing from the right as necessary if more than one key state is set at once. This API is only supported on a subset of Symbol Technologies' Windows Mobile / CE / Embedded handheld devices (see remarks).
In order to use this API you must include the following extension in your build.yml
.
:::ruby
extensions: [“indicators”]
The indicators
extension is also included automatically if you specify the following in your build.yml
.
:::ruby
app_type: “rhoelements”
If you are building a Windows Mobile or Windows CE app with this API, you must set your app_type as “rhoelements” in your build.yml as shown here. |
Be sure to review the JavaScript API Usage guide for important information about using this API in JavaScript.
Be sure to review the Ruby API Usage guide for important information about using this API in Ruby.
Stops showing keystate icons representing the shifted state of the hardware keyboard.
Synchronous Return:
Method Access:
Rho.KeyState.hideStates()
Rho::KeyState.hideStates()
Display keystate icons representing the shifted state of the hardware keyboard.
Parameters
The properties associated with the keystate indicator, its size and position.
Not specifying any properties will display the keystate indicators at the bottom right hand corner of the screen.
The absolute horizontal position of the keystate indicators in pixels. This is the rightmost edge of the rightmost indicator, where multiple indicators are displayed simultaneously they will grow from right to left.
The absolute vertical position of the keystate indicators in pixels.
The width of each keystate indicator in pixels.
The width of each keystate indicator in pixels.
Synchronous Return:
Method Access:
Rho.KeyState.showStates(HASH propertyMap)
Rho::KeyState.showStates(HASH propertyMap)
If you just want to display the keystate indicators in their default positions with size 25x25 pixels then call as follows.
function show_keystates(){ Rho.Keystate.showStates({width:25;height:25}); }
def show_keystates Rho::Keystate.showStates({width:25;height:25}) end
Due to platform limitations this API is not available on the following Zebra Technologies devices:
The keystate indicator positions are absolute and so when rotating the screen you should also reposition the keystate accordingly to accommodate the new screen layout.