Check if a key or mouse is pressed

At the moment we can check only if a key or mouse button is down, to check if a key or mouse button is only pressed and run an action only once when it pressed, we have to play around.
It would be great if we have separated option to check key\mouse is down and key\mouse is pressed.

We can use “down” to check if a key is down any time and run (repeat) action as long as a key or mouse is down.
We can use “pressed” to check if a key or mouse is pressed at any one time so even if the player hold down the button or key, the action runs only one time and stop until the player release the specified button or key and press it again.

TyFive’s recent question is a great example of when key\mouse pressed feature can be extremely useful:
viewtopic.php?f=19&t=4716

Maybe I could add an optional parameter to choose if the condition must be testing as long as the key is down or only when it is just pressed.

Yeah, that’d be good idea.