cancel
Showing results for 
Search instead for 
Did you mean: 

how to connect keyboard buffer and Textarea Wildcard buffer?

ikassma
Senior

hi.

I implemented the numeric custom Keyboard through the Keyboard example.

However, I can not connect the buffer used for input with the buffer used for TextArea. How can I connect?

And I want to be able to input it directly to the keyboard when I touch the TextArea. Can I detect the touch of the TextArea?

thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ikassma​,

Yes you need to know the wildcard buffer from the beginning (During initialzation of your View you can simply initialize the keyboard with this buffer, or have the keyboard know the buffer itself).

We are actually developing a more complete keyboard widget, not just an example, so if you could specify what you're looking for in such a widget that may be input to the development.

Do you mean you want to clear the input field?

View solution in original post

7 REPLIES 7
Martin KJELDSEN
Chief III

Hi @ikassma​,

Please check out this post - It discusses how to print print something to a wildcard buffer using Unicode::strncpy(). To connect a keyboard to a textarea you'd maybe return a char from your keyboard depending on what is being pressed and then you can pass that directly to strncpy. (Special keys are another matter: e.g. delete a char from the current wildcard buffer).

https://community.st.com/s/question/0D50X0000AROgoVSQT/how-to-print-a-dot-in-touchgfx

hi. @Martin KJELDSEN​ 

I am always grateful for your reply to my article

Do I need to know the location of the wildcard buffer from the beginning even if I use Unicode :: strncpy () ???

How should that be treated ??? The keyboard example looks perfect, but it is not perfect for application.

One problem I am having right now is to clear the currently generated keyboard from the screen using the callback function on the keyboard.

Hi @ikassma​,

Yes you need to know the wildcard buffer from the beginning (During initialzation of your View you can simply initialize the keyboard with this buffer, or have the keyboard know the buffer itself).

We are actually developing a more complete keyboard widget, not just an example, so if you could specify what you're looking for in such a widget that may be input to the development.

Do you mean you want to clear the input field?

If this is the case you would simply reset your buffer (set every entry to 0) , invalidate your input field text area and then move your cursor (if you have one) to the start of the input field.

/Martin

@Martin KJELDSEN​ thnaks for your answer.

i sloved all of problems. i use to touchGFX callback and mixins.

I am free to use the buffer address and textarea address when clicking with the mixins function and the callback. This worked perfectly and included all the features I wanted. It was a difficult process because I was not familiar with C ++.

I think that your answers helped me to produce better code. Thanks again once again.

Happy you made it work! Good job.

/Martin

can you post your code