Double click & long button press
Loboris provides a great threading template. Perhaps we ought to provide a similar GUI template for the M5Stack over here. That would speed up M5Stack MicroPython adoption & projects.
The threading template is awesome. Had not seen it before. Full fledged GUI framework is a project by itself. However templates for basic interactions (click, double click etc) might be a good idea.
Any ideas how a long button press would be best implemented? Obviously, it should involve a button pressed depressed timer. I have a project at hand that might make good use of that.
Boris is working on it.
I also made some publicity for your M5Stack Kitchen Sink.
I think for double clicks and long presses you would need uasyncio library. I remember seeing a discussion about it in MicroPython forums.
https://github.com/peterhinch/micropython-async/blob/master/aswitch.py
Here is button code in c which handles double clicks and long presses.
https://github.com/espressif/esp-iot-solution/blob/master/components/general/button/button/button.c
It seems Loboris fork now has improved support for buttons. Will look into this.