I wrote a key driver for dealing with common click, double-click, long press operation, button automatically disappear, extensible combination keys and matrix keyboard, detailed instructions can see my blog:
I use this app # CSDN# found have technical content of the blog and friends to seek common to "flexible button handler FlexibleButton, C programming, seamless compatible with any processor, support arbitrary OS and non - OS", gathered together at https://blog.csdn.net/u012349679/article/details/84993596