How to make a feature where you must hold a key to do something

I am attempting to make a feature where a player can exit the game with the escape key, but I want to make it so you must hold it in case it is pressed on accident.

Condition
INVERTED escape key is pressed
Time of “Esc” timer is HIGHER than 0.5 sec

Action
Start/Reset “Esc” timer

Condition
Escape key is pressed
Action
Start/Reset “Esc” timer
SUB EVENT
Condition
Time of “Esc” timer is HIGHER than 1 sec

Action
Exit Game

Would it not be better to just hook into when the ESC was pressed rather then constantly checking when it’s not pressed?

I was thinking something along the lines of the below.

1 Like

Then put a hold buttom condition.