I have setup a feedback_cb
on my keypad indev
to catch a “global” BACK
button press, which I have mapped to LV_KEY_ESC
.
However, every time I press the ESC
key, my feedback_cb
gets called twice.
I enabled tracing and I can see that it is being called twice, but that the param
is different (see output below – the lines starting with feedback
are from my feedback_cb
). This value is not passed in though, so I have no way to differentiate the two events passed to feedback_cb
.
[Trace] (16.153, +9) event_send_core: Sending event 13 to 2401d620 with 2407f92c param (in lv_event.c line #416)
feedback: 13
feedback(): key=27 pressed
feedback(): ESC pressed
[Trace] (16.169, +16) event_send_core: Sending event 13 to 2401d760 with 2407f8b4 param (in lv_event.c line #416)
feedback: 13
feedback(): key=27 pressed
feedback(): ESC pressed
This doesn’t appear to be specific to MicroPython, so I’m posting here in General.
Any ideas what I can do so it only gets called once? I’d rather not just ignore every other event, as that is pretty hacky (and who knows if it might get called only once in some cases or 3 times in another case in the future).
Thanks for any insights.