Virtual keyboards

Functions to control the virtual keyboard.

This file defines the virtual keyboard service, which controls the on-screen virtual keyboard. The virtual keyboard service allows an application to show and hide the on-screen keyboard, and receive notifications when the keyboard is displayed or hidden. You can use the virtual keyboard service to configure various keyboard options. You can also obtain the dynamic keyboard height.

To change the keyboard options, call the virtualkeyboard_change_options() function and specify the keyboard layout and Enter key text. The enumeration virtualkeyboard_layout_t lists the keyboard layouts, and the enumeration virtualkeyboard_enter_t lists the options for Enter key text. The Enter key text is automatically updated to the correct language if you change the language of the keyboard.

BlackBerry 10 OS virtual keyboard layouts

There are several different keyboard layouts available for the BlackBerry 10 devices, giving you the flexibility to choose the layout that works best with your application. The English version of each keyboard layout is shown below. Each language has its own version of these layouts, so you don't need to do anything programatically to show a different language keyboard. When the user selects a different language, the correct keyboard layout for that language appears.

In each example, a different text option is shown for the Enter key. To change to a different keyboard layout or modify the text on the Enter key, call the function virtualkeyboard_change_options() and specify the appropriate values for the layout and enter arguments. If the selected text option is too long to be displayed on the Enter key, then the default return symbol () will be displayed instead.

The default keyboard layout (corresponding to the VIRTUALKEYBOARD_LAYOUT_DEFAULT member of the virtualkeyboard_layout_t enumeration set), with the default Enter key (corresponding to the VIRTUALKEYBOARD_ENTER_DEFAULT member of the virtualkeyboard_enter_t enumeration set):

The email keyboard layout (VIRTUALKEYBOARD_LAYOUT_EMAIL), with the text "Send" on the Enter key (VIRTUALKEYBOARD_ENTER_SEND):

The numeric keyboard layout (VIRTUALKEYBOARD_LAYOUT_NUM_PUNC), with the default Enter key (VIRTUALKEYBOARD_ENTER_DEFAULT):

The phone keyboard layout (VIRTUALKEYBOARD_LAYOUT_PHONE), with the text "Connect" on the Enter key (VIRTUALKEYBOARD_ENTER_CONNECT):

The PIN keyboard layout (VIRTUALKEYBOARD_LAYOUT_PIN), with the text "Next" on the Enter key (VIRTUALKEYBOARD_ENTER_NEXT):

The symbol keyboard layout (VIRTUALKEYBOARD_LAYOUT_SYMBOL), with the text "Done" on the Enter key (VIRTUALKEYBOARD_ENTER_DONE):

The dial pad keyboard layout (VIRTUALKEYBOARD_LAYOUT_DIAL_PAD), with the default return key (VIRTUALKEYBOARD_ENTER_DEFAULT):

The URL keyboard layout (VIRTUALKEYBOARD_LAYOUT_URL), with the text "Go" on the Enter key (VIRTUALKEYBOARD_ENTER_GO):

The web keyboard layout (VIRTUALKEYBOARD_LAYOUT_WEB), with the text "Search" on the Enter key (VIRTUALKEYBOARD_ENTER_SEARCH):

The password keyboard layout (VIRTUALKEYBOARD_LAYOUT_PASSWORD), with the default the Enter key (VIRTUALKEYBOARD_ENTER_DEFAULT):