opened 03:10AM - 17 Mar 21 UTC
closed 11:01AM - 24 Mar 21 UTC
### This issue...
...relates specifically to the button matrix but was found us…ing the keyboard. When a key is pressed the whole of the `btnm` is invalidated in addition to/instead of, just the region of the key. This results in a very sluggish keyboard experience. This is due to the signal handler `lv_btnmatrix_signal` making a call to the "base class" `ancestor_signal(btnm, sign, param)` where it passes in the `btnm`. If you drill down this results in a `lv_obj_invalidate` operating on the whole button matrix, i.e. half the screen for a keyboard.
Note: This issue relates to this [inquiry](https://forum.lvgl.io/t/keyboard-input-slow/4276?u=jupeos).
### To Reproduce
Simulator or real v7.11.0 and earlier.
Take any example that has a button matrix and place a bp on ln:852 of `lv_btnmatrix.c`. Press a button and drill down until you get to `lv_obj_invalidate_area` and check the region size.
### Expected behavior
Only the region of the key that is pressed should be invalidated.
As a hack to fix this for a demo that I have, I added ` if(sign != LV_SIGNAL_PRESSED) {` around the call to `ancestor_signal` which did work but is probably not the correct solution.