166 views
in GUI Development by
Hello,

I wan to implement a pop up keyboard that modifies a string, i'm looking at example "VirutalKeyBoard" but i'm missing how the keyboard passes the inputs to the string.

Thanks.

1 Answer

0 votes
by

Hello Riccardo,

Similar to a physical keyboard, the Virtual Keyboard does not passes strings. It limits to send events when the user presses or releases a key. Nothing else.

The composition of the key events to a string is another aspect. In the simplest case you could use a Key Handler to react to the keyboard events. With each new event you could append the just received character to the end of a string. In this manner you get a string composed of the characters. The consequence of this approach is, the user can't modify the once entered characters. This is exact what the Virtual Keyboard example does. See the method onPressKey1 within the Application::Application component:

If this behavior is not sufficient, you can improve it by using a Text Editor component template. As its name indicates it allows the user to edit text. The current content of the Editor can be queried. The example Editor demonstrates the usage of this component template.

I hope it helps you further.

Best regards

Paul Banach

by

Yes, thanks Paul.

I'm taking some hints on the example code.

i don't undestand where that "VirtualKeyboard" comes from.

thanks

by

i don't undestand where that "VirtualKeyboard" comes from.

It is component template - a ready to use component, you can add to your project, modify and enhance according to your needs. Please see the chapter: Virtual Keyboard. As explained in this chapter, usually you:

Step 1: Add a new component based on the template.

Step 2: Add an instance of the component to e.g. Application component.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...