Yes I'm able to type on qwerty keyboard with touch and its displaying on the screen.
As a start I went through that document also and I also integrated the physical button, now I am not getting how to make qwerty keyboard to react to the hardware button as i want to operate the qwerty keyboard using joystick buttons not with touch.
You will find enclosed a quick implementation of the keyboard using buttons.
I haven't tested it with the actual board but the simulator is working. To link each physical button to a certain value, you should create a ButtonController class as follows (also explained in the documentation) :
class CustomButtonController : public touchgfx::ButtonController
{
virtual void init() { previousState = JOY_NONE; }
virtual bool sample(uint8_t& key)
{
JOYState_TypeDef state = BSP_JOY_GetState();
if (state == previousState)
{
return false;
}
previousState = state;
switch(state)
{
case JOY_SEL:
key = '5';
return true;
case JOY_DOWN:
key = '2';
return true;
case JOY_UP:
key = '8';
return true;
case JOY_LEFT:
key = '4';
return true;
case JOY_RIGHT:
key = '6';
return true;
}
return false;
}
private:
JOYState_TypeDef previousState;
};
Here are the keys used for the keyboard (you can change the code as you like) :
'5' select the highlighted key and print the corresponding letter
'6' and '4' are used to navigate among the different keys
'8' allows you to select capslock, numbers/special characters and delete.
You will find the main function making what you want possible void KeyboardJoystick::externalKeyPressed(uint8_t c) in KeyboardJoystick.cpp (gui\src\common\KeyboardJoystick.cpp)