iPhoneKeyboard Manual     Reference     Scripting  
Scripting > Runtime Classes > iPhoneKeyboard
iPhoneKeyboard

Interface into iPhone native on screen keyboard. This interface allows to display different types of the keyboard: ASCII, Numbers, URL, Email, and others.

Because the appearance of the keyboard has the potential to obscure portions of your user interface, it is up to you to make sure that parts of your user interface are not obscured when the keyboard is being displayed.

iPhoneKeyboard.visible and iPhoneKeyboard.area should be used to determine if the keyboard is being shown (activated) and what portion of the screen is using.

Apple's API does not allow to explicitly control the orientation of the keyboard. Instead you can define iPhoneKeyboard.autorotateToPortrait, iPhoneKeyboard.autorotateToPortraitUpsideDown, iPhoneKeyboard.autorotateToLandscapeLeft, iPhoneKeyboard.autorotateToLandscapeRight if the keyboard needs to be automatically rotated to match a specific orientation of the device.

Instance of this class can be used as a yield instruction. It waits until keyboard becomes inactive that is disappears from the screen.

Variables
text

Returns the text displayed by the input field of the keyboard. This value can be accessed at any moment, even if user has not yet finished input process.

active

Specifies if the keyboard is visible or is sliding into the position on the screen.

done

Specifies if input process was finished (Read Only)

Class Variables
hideInput

Specifies if text input field above the keyboard will be hidden when the keyboard is on screen.

autorotateToPortrait

Specifies whether the keyboard should be automatically rotated to Portrait orientation to match orientation of the device.

autorotateToPortraitUpsideDown

Specifies whether the keyboard should be automatically rotated to PortraitUpsideDown orientation to match orientation of the device.

autorotateToLandscapeLeft

Specifies whether the keyboard should be automatically rotated to LandscapeLeft orientation to match orientation of the device.

autorotateToLandscapeRight

Specifies whether the keyboard should be automatically rotated to LandscapeRight orientation to match orientation of the device.

area

Returns portion of the screen which is covered by the keyboard.

visible

Returns true whenever any keyboard is completely visible on the screen.

Class Functions
Open

Opens the native iPhone keyboard on the screen.