cancel
Showing results for 
Search instead for 
Did you mean: 

Interact with the keyboard of TouchGFX from code

DCajigal
Associate III

I have developed a custom keyboard in TouchGFX and it is working fine, but now i would need to change the alpha property of some keys, and also press the keys, all from the code. In order to press a button widget from code i do the following:

x=button->getX();

y=button->getY();

x+=5;

y+=5;

evnt = ClickEvent::PRESSED;

ClickEvent click1(evnt, x, y);

button->handleClickEvent(click1);

button-> invalidate();

evnt = ClickEvent::RELEASED;

ClickEvent click2(evnt, x, y);

button->handleClickEvent(click2);

button-> invalidate();

In the case of the keyboard i have tried to do something similar with the method "virtual void handleClickEvent(const ClickEvent& evt);" of the keyboard class, but anything happened. I would really appreciate any help. Thanks in advance.

3 REPLIES 3
Romain DIELEMAN
ST Employee

Hi,

Were you able to fix your issue ? If not could you provide more context to your code?

Would it be possible to share your custom keyboard ? It may greatly help other users.

/Romain

DCajigal
Associate III

Hi,

In the end i was not able to use it in that way, i had no time so i did my own keyboard with buttons. Besides, tha RAM used with the keyboard widget was huge, so i prefer this option.. Anyway, just in case it could be useful for someone i attach the files of the keyboard widget. I can not attach the whole project so i just upload the keyboard files.

The keyboard widget is quite old and needs some update/redesign (planned if I remember correctly). So thank you for sharing yours.

/Romain