How to listen to doubleClick and longPress for a GUI Button?

Link to related Feature Request: Add doubleClick and longPress for a GUI Button