Code to detect single or double click

No no no.

Do not delay giving me the single click outcome of a user interaction while you sit around waiting to see if there’s another click.

I remind you (not my words, 17 seconds of googling):

Typically, a single click initiates a user interface action and a double-click extends the action. For example, one click usually selects an item, and a double-click edits the selected item.

That this basic brilliant principle is violated all over the place is no excuse. It is bad user interface design. Bad.

Give me the single click instantly the switch is closed. Or as soon as I check to see if.

The fact that another click comes in time for the first (already doing something!) and the second to be handled as a double click is a future event, which may cause me to extend the action initiated by what turns out to have not been a single click.

Tog on Interface.

a7