Is there a way to detect if space is pressed twice?

Hi l don’t know how to detect if the space key is pressed twice. Any ideas?

The number in the repeat block is the amount of time allowed between each space pressed to count as a double space.

FWIW, here's a general wait [so many] seconds or until [condition] block I wrote some time ago:

A complicating factor may be that a different key was pressed in the meantime. So test for key pressedfirst, then if the key pressed is actually space (not 100% waterproof either).