View Full Version : Double Click Key

9th February 2011, 16:48
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.


9th February 2011, 18:54
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).

9th February 2011, 19:04
thanks for your reply. i was also thinking on similar line.