How to implement Long press and double tap on a button ?

  • Hi,

    The parent window of the buttons window receives notification codes WM_NOTIFICATION_CLICKED and WM_NOTIFICATION_RELEASED from the buttons. To implement long press a timer could be used. If it is expired and no release has been detected in the meantime a long press occurs, if a button is pressed twice within a short period a double tap is detected.

    Regards, Jörg

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Hi Jörg,
    Thanks for your reply. Yes, i was thinking the same logic. I was just curious if there is any special implementation for this event, but looks like there is not. Thank you so much :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!