cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Custom Keyboard

Shirish
Associate II

Hello,

I am fairly new to the TouchGFX designer and am trying to build an application where I can copy the contents typed using the keyboard on a screen(Custom Keyboard application provided with the designer) to a TextArea on another screen. I would really appreciate any help regarding this problem.

I am using a STM32F746G-DISCO Board.

Thanks in advance.

13 REPLIES 13
Martin KJELDSEN
Chief III

Hi @Shirish​,

Could you try checking out the keyboard example we have in the list of UI templates in the designer and then get back to me? Thanks

/Martin

Shirish
Associate II

Hi @Martin KJELDSEN​ ,

Thank you for the quick response.

In my project I have used the keyboard example that has been provided in the templates. But I am experiencing some trouble trying to copy the contents typed through that keyboard to another screen that i added. the new screen had a textarea with a wildcard. and I wish to copy the typed numbers/text to this TextArea on the new screen.

Thanks.

Martin KJELDSEN
Chief III

You can use Unicode::strncpy() from the Unicode class we provide to copy from one buffer to another.

Shirish
Associate II

Hi @Martin KJELDSEN​ ,

I tried the solution you suggested. I managed to copy keyboard buffer to the text area buffer on the same screen. Unfortunately, the function is copying only one character to the textArea. It does not display the rest of the content only the FIRST number that is typed through the keyboard.

I also have been trying to copy the text to a different screen containing a textArea. But this fails. Could you please help me out again?

Thanks.

-Shirish

Martin KJELDSEN
Chief III

I think you may have to provide me with a project, Shirish.

Thanks!

Shirish
Associate II

Hi @Martin KJELDSEN​ ,

Sure. could you please check your messages, I have shared a link to the project.

Thank you.

-Shirish

Martin KJELDSEN
Chief III

I've received it, thanks. Will check as soon as i can.

Martin KJELDSEN
Chief III

Without trying your project yet, i just did a test where i have two TextAreas with wildcards. I copy the content of one to the other with the following code and that works fine.

Unicode::strncpy(textArea2Buffer, textArea1Buffer, 10);
textArea2.invalidate();

Can you maybe check the output buffer you get from the Keyboard? Debug and look at the contents and see if it's what you expect.

@Martin KJELDSEN​ 

It does work if the TextAreas are on the same screen. and in my project I need to copy the keyboard buffer to the textarea buffer on any other screen other than the keyboard screen itself. In addition, the textarea with wildcard needs as many initial values as I would type on the keyboard eg. 000000 for 123456 number on keyboard. eg. if i want to type 12345 on the keyboard but have only 0000 initial value in the textarea with wildcard, it prints 1234 and skips 5. I hope I am explaining the problem properly and it is easy to understand.