I have a button that needs to perform two events, this button is a toggle button when clicked, and switches pages when long pressed. The problem encountered is that when you press and hold, the clicked event is also triggered. How to avoid it?
What MCU/Processor/Board and compiler are you using?