-
Double Click Key
Hi All,
I am trying to figure out how handle double click event on Button. For example: while the app is play music on you mobile and you want to pause the music for whatever reason, then the user must double click a hot key, lets say 7 and to unpause, double click 9.
Reason for double click is basically to avoid accidental clicks. I can do this with single KeyPress event but dont know how to register double click.
Please help any direction would be great.
Regards,
Javed
-
Re: Double Click Key
My solution would be to start a timer after the keypressevent is fired. Then set a boolean to true. If the timer times out then set the boolean to false again. If the keypresevent fires again and the boolean is true then do your thing (and setting the boolean to false again).
-
Re: Double Click Key
thanks for your reply. i was also thinking on similar line.