2025-09-03 4:37 AM
Hi,
I,m looking for a way to remove or hide the keychar of the keyboard's keys or button, i'm using the custom keyboard from TouchGFX demo or examples, and i have a new asset that already have the keychar or key label. For this reason, i need to remove the keychar and prevent the keyboard class from drawing them.
How i can do that?
Best regards.
Solved! Go to Solution.
2025-09-03 6:06 AM - edited 2025-09-03 6:10 AM
Hi,
I have found a work around, I don't like it, but it works, until i find the correct way to do this.
the work around is to use a typography that display nothing, make sure all wildcards are empty to avoid displaying anything and just in case use a very small size (1).
in your custom keyboard layout in
static const Keyboard::Layout layout =
{
BITMAP_KEYBOARD_BACKGROUND_ID,
keyboardArray,
30,
keyboardcallbackAreas,
3,
Rect(x, y, w, h),
TypedText(T_ENTEREDTEXT),
color_id,
Typography::the_work_around_typography_name,
any_color_for_keychar
};
Any other idea is welcome, if someone have a good solution or know the right solution, please share.
BR
2025-09-03 5:03 AM - edited 2025-09-03 5:04 AM
Hello @H_Drx,
I think this post can help you to hide the text : Solved: TouchGFX keyboard with password
2025-09-03 5:24 AM - edited 2025-09-03 6:06 AM
Hi, @Imen.D,
Thank you for your help, but i believe that post is talking about how to hide the text inside the text area, my question is how to remove the char on the button itself. for example the backspace button has no label or keychar, it's just image of a button with icon, and because that key has a callback, it will not be inserted in the key map, so it will have no keychar or label.
i believe in keyboard.cpp widged they have a draw function that will add a text area and display what every char is assigned and added in key map list.
maybe i will need to overwrite the draw function and prevent it from adding labels or char to keys.
BR
2025-09-03 6:06 AM - edited 2025-09-03 6:10 AM
Hi,
I have found a work around, I don't like it, but it works, until i find the correct way to do this.
the work around is to use a typography that display nothing, make sure all wildcards are empty to avoid displaying anything and just in case use a very small size (1).
in your custom keyboard layout in
static const Keyboard::Layout layout =
{
BITMAP_KEYBOARD_BACKGROUND_ID,
keyboardArray,
30,
keyboardcallbackAreas,
3,
Rect(x, y, w, h),
TypedText(T_ENTEREDTEXT),
color_id,
Typography::the_work_around_typography_name,
any_color_for_keychar
};
Any other idea is welcome, if someone have a good solution or know the right solution, please share.
BR