Configuring Text Input with the Virtual Keyboard

A visualization is usually configured so that it calls a virtual keyboard for a text input event when an input device is not available. For this purpose, the follow-up action Write variable is preset accordingly in the user input: The value Standard is selected for the Input type setting.

However, you can also configure especially how text is input. For this purpose, more input types are available in the user input, such as Text input or the listed visualizations. These visualizations have the visualization type Numpad/Keypad and display virtual keyboards or numeric keypads.

In the Settings for default text input setting of the visualization manager you can preset a keyboard visualization that is called from all visualizations in the application when required. This is possible without having to customize the user inputs of the visualizations.

See also

Configuring text input especially for virtual keyboards

  1. Declare an input variable in the PLC_PRG program.

    VAR_INPUT stInput : STRING; VAR_END

  2. Add a button to the visualization and select the element.

  3. Configure the property Texts ‣ Text with Text input: %s.

  4. Configure the property Text variables ‣ Text variable with PLC_PRG.stInput.

  5. Click auf Configure in the property Input configuration ‣ OnMouseClick.

    The Input Configuration dialog box opens. The selected input event is printed below the caption.

  6. Select the Write variable action.

  7. Select the visualization Visudialogs.Keypad in Input type of the implementation of the action.

    The virtual keyboard Visudialogs.Keypad is selected as the input device.

  8. Compile, download, and start the application.

    The visualization opens.

  9. Click the button as a visualization user.

    The virtual keyboard appears and allows text input by means of the mouse.

    ../_images/a27e4a58c5717ab0c0a8640e01574bc5

See also

Configuring numeric input especially for virtual numeric keypads

  1. Declare an input variable in the PLC_PRG program.

    VAR_INPUT iInput : INT; VAR_END

  2. Open the visualization and added a Rectangle element.

  3. Select the element in the editor.

    The properties are visible in the Properties view.

  4. Configure the property Texts ‣ Text with Number input: %i.

  5. Configure the property Text variables ‣ Text variable with PLC_PRG.iInput.

  6. In the Input configuration property, click the Configure button in the OnMouseClick line.

    The Input Configuration dialog box opens. The selected input event is printed below the caption.

  7. Select the Write variable action from the list of possible actions and click the 915c18979b592dd7c0a8640e01fe0f06_8dff02aaec111252c0a8640e01c28002 symbol.

    The action appears in the list of actions to be executed. The blank implementation of the action appears in the window area to the right of the list.

  8. Select the following settings:

    Input type set to VisuDialogs.Numpad.

    Choose variable to edit set to Use text output variable.

    Dialog title set to 'My virtual numpad'.

  9. Click OK to close the dialog box.

    The user input is configured.

  10. Compile, download, and start the application.

    The application runs. The visualization opens. When a user clicks the rectangle, the numeric keypad opens.

    ../_images/ea2fa9e1c57de8c8c0a8640e003f0fbc

Defining standard text input

  1. Double-click the visualization manager.

  2. Click in the default text input in the Settings tab (Default text input group) and assign visualizations.

    These visualizations are defined as default text input. If a display variant does not have a keyboard, then these visualizations are called without you having to adapt the user input.