Disable button on keyboard

Hi everyone, I am looking for a way to disable a button on the keyboard. I want to disable the validation button on the keyboard if a condition isn’t met. Ideally, I’d also like to change its color when the condition is fulfilled.
Thanks in advance.

Up.
Is any way to achieve this by using the buttonMatrix of the keyboard ?

You can disable a button using
lv_buttonmatrix_set_button_ctrl(keyboard, button_id, LV_BUTTONMATRIX_CTRL_DISABLED);
and enable using
lv_buttonmatrix_clear_button_ctrl(keyboard, button_id, LV_BUTTONMATRIX_CTRL_DISABLED);

To style it, you would need a custom draw event. Can you share some sample code of your use case so I can guide you?