Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Using a virtual keypad in an application

The virtual keypad allows user input when a physical keypad or keyboard is not available, though it can also co-exist with such hardware. The virtual keypad is a graphical representation of a keypad or keyboard that is displayed on the screen. The virtual keypad responds to touch events to simulate key presses.

Brew MP provides a virtual input manager that is responsible for creating and maintaining the virtual keypad, as well as facilitating the interaction between an application and the virtual keypad. Brew MP also provides a default virtual keypad.

Manufacturers can implement their own virtual keypad widget. For more information, see Implementing a virtual keypad.

To use the virtual keypad, an application must do the following:

  • Enable touch on the root container.
  • Create a virtual input aware widget.

    Currently, only the text widget supports virtual input.

For example code showing how to use the virtual keypad, see Enabling virtual input.

To be notified of the state of the virtual input, an application can add a listener to the Virtual Input Manager's status model by calling IController_GetStatusModel(). The application can receive notification that keypad is displayed and can take action, such as updating the content layout to prevent critical items such as the target being hidden by the keypad.