How to trigger a button press action when multiple buttons are pressed at the same time?

Thanks for the great library! I have found it easy to use and customize to my application needs.

Our device has a limited number of hardware buttons (which are working wonderfully with this library so far). I’d like to have some special actions that trigger when the user holds down 2 buttons at the same time and releases them, similar to taking a screen shot on an android or ios device. Is there a simple way to do this with the library as it is? If not, would it be difficult to add it? Can you provide some guidance on how to add it? Thanks.

Hi,

So do you use LV_INDEV_TYPE_BUTTON, right?
If so what about catching the simultaneous press in indev_read?

The library will keep track of one pressed object / input device at a time. If you want to really press the objects then you need to create an input device for every button. In this case, you can get the state of the other buttons with lv_btn_get_state and see if another is being pressed.

Thank you for the suggestion, I implemented your first idea. It seems to work well.